Browse Source

Build docs

pull/3725/head v0.17.25
Artur Arseniev 5 years ago
parent
commit
3b1b7a9078
  1. 24
      docs/api/block.md
  2. 2
      docs/api/editor.md

24
docs/api/block.md

@ -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

2
docs/api/editor.md

@ -276,7 +276,7 @@ Set style inside editor's canvas. This method overrides actual style
editor.setStyle('.cls{color: red}');
//or
editor.setStyle({
selectors: ['cls']
selectors: ['cls'],
style: { color: 'red' }
});
```

Loading…
Cancel
Save