Browse Source

Update docs

pull/3092/head v0.16.27
Artur Arseniev 5 years ago
parent
commit
3120e84a0c
  1. 8
      docs/api/block_manager.md
  2. 9
      docs/api/component.md
  3. 19
      docs/api/editor.md
  4. 1
      docs/api/modal_dialog.md

8
docs/api/block_manager.md

@ -114,6 +114,14 @@ Remove a block by id
- `id` **[string][12]** Block id
### Examples
```javascript
// Id of the block which need to be removed
const id = 'button';
blockManager.remove(id);
```
Returns **Block** Removed block
## getCategories

9
docs/api/component.md

@ -548,6 +548,14 @@ component.toHTML({
Returns **[String][1]** HTML string
## getChangedProps
Return an object containing only changed props
### Parameters
- `res`
## getId
Return the component id
@ -632,6 +640,7 @@ This method is used in Components.js just after the parsing
- `components`
- `styles` (optional, default `[]`)
- `list` (optional, default `{}`)
- `opts` (optional, default `{}`)
[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

19
docs/api/editor.md

@ -111,6 +111,11 @@ editor.on('EVENT-NAME', (some, argument) => {
- `modal:open` - Modal is opened
- `modal:close` - Modal is closed
### Parser
- `parse:html` - On HTML parse, an object containing the input and the output of the parser is passed as an argument
- `parse:css` - On CSS parse, an object containing the input and the output of the parser is passed as an argument
### Commands
- `run:{commandName}` - Triggered when some command is called to run (eg. editor.runCommand('preview'))
@ -446,6 +451,20 @@ This count resets at any `store()`
Returns **[number][10]**
## refresh
Update editor dimension offsets
This method could be useful when you update, for example, some position
of the editor element (eg. canvas, panels, etc.) with CSS, where without
refresh you'll get misleading position of tools
### Parameters
- `opts`
- `options` **[Object][3]?** Options
- `options.tools` **[Boolean][4]** Update the position of tools (eg. rich text editor, component highlighter, etc.) (optional, default `false`)
## setCustomRte
Replace the built-in Rich Text Editor with a custom one.

1
docs/api/modal_dialog.md

@ -37,6 +37,7 @@ Open the modal window
- `opts` **[Object][11]** Options (optional, default `{}`)
- `opts.title` **([String][12] \| [HTMLElement][13])?** Title to set for the modal
- `opts.content` **([String][12] \| [HTMLElement][13])?** Content to set for the modal
- `opts.attributes` **[Object][11]?** Updates the modal wrapper with custom attributes
Returns **this**

Loading…
Cancel
Save