From 3b1b7a9078f17c7c09ee9123506536c34d27fba4 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 25 Aug 2021 21:22:42 +0200 Subject: [PATCH] Build docs --- docs/api/block.md | 24 +++++++++++++----------- docs/api/editor.md | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/api/block.md b/docs/api/block.md index 377b4acae..76e8443b9 100644 --- a/docs/api/block.md +++ b/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. ` 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 diff --git a/docs/api/editor.md b/docs/api/editor.md index a772c059d..03e39cc14 100644 --- a/docs/api/editor.md +++ b/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' } }); ```