mirror of
https://github.com/codex-team/editor.js
synced 2026-03-15 07:05:48 +01:00
renderFromHTML API method (#654)
* renderFromHTML API method * Fix case when currentBlock is undefined * Clear editor before render * Handle single block processing * Update paragraph
This commit is contained in:
parent
6bd857d4f6
commit
a47ffcce44
7 changed files with 77 additions and 45 deletions
|
|
@ -22,6 +22,10 @@ export interface API {
|
|||
|
||||
Methods that working with Blocks
|
||||
|
||||
`render(data)` - render passed JSON data
|
||||
|
||||
`renderFromHTML(data)` - parse and render passed HTML string (*not for production use*)
|
||||
|
||||
`swap(fromIndex, toIndex)` - swaps two Blocks by their positions
|
||||
|
||||
`delete(blockIndex?: Number)` - deletes Block with passed index
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue