|
|
|
@ -6,21 +6,23 @@ |
|
|
|
|
|
|
|
### Properties |
|
|
|
|
|
|
|
* `label` **[String][1]?** Block label, eg. `My block` |
|
|
|
* `activate` **[Boolean][2]?** If true, triggers an the 'active' event on dropped component |
|
|
|
* `select` **[Boolean][2]?** If true, the dropped component will be selected |
|
|
|
* `resetId` **[Boolean][2]?** If true, all IDs of dropped components and their styles will be changed |
|
|
|
* `disable` **[Boolean][2]?** Disable the drag of the block |
|
|
|
* `label` **[String][1]** Block label, eg. `My block` |
|
|
|
* `content` **([String][1] | [Object][2])** The content of the block. Might be an HTML string or a [Component Defintion][3] |
|
|
|
* `media` **[String][1]?** HTML string for the media/icon of the block, eg. `<svg ...`, `<img ...`, etc. |
|
|
|
(**WARNING:** In order to support HTML strings, this property is not escaped) |
|
|
|
* `content` **([String][1] | [Object][3])** The content of the block. Might be an HTML string or a [Component Defintion][4] |
|
|
|
* `category` **[String][1]?** Block category |
|
|
|
* `attributes` **[Object][3]?** Block attributes to apply in the view element |
|
|
|
* `activate` **[Boolean][4]?** If true, triggers an the `active` event on dropped component |
|
|
|
* `select` **[Boolean][4]?** If true, the dropped component will be selected |
|
|
|
* `resetId` **[Boolean][4]?** If true, all IDs of dropped components and their styles will be changed |
|
|
|
* `disable` **[Boolean][4]?** Disable the block from being interacted |
|
|
|
* `onClick` **[Function][5]?** Custom behavior on click, eg. `(block, editor) => editor.getWrapper().append(block.get('content'))` |
|
|
|
* `attributes` **[Object][2]?** Block attributes to apply in the view element |
|
|
|
|
|
|
|
[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String |
|
|
|
|
|
|
|
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean |
|
|
|
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object |
|
|
|
|
|
|
|
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object |
|
|
|
[3]: /modules/Components.html#component-definition |
|
|
|
|
|
|
|
[4]: /modules/Components.html#component-definition |
|
|
|
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean |
|
|
|
|
|
|
|
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function |
|
|
|
|