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
7
types/api/blocks.d.ts
vendored
7
types/api/blocks.d.ts
vendored
|
|
@ -16,6 +16,13 @@ export interface Blocks {
|
|||
*/
|
||||
render(data: OutputData): Promise<void>;
|
||||
|
||||
/**
|
||||
* Render passed HTML string
|
||||
* @param {string} data
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
renderFromHTML(data: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Removes current Block
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue