RELEASE 2.11.0 OR ABOVE
Updates the editing model based on .se-contents DOM.
Parameters:
Name | Type | Attribute | Description |
---|---|---|---|
options | Object | { skipUndoRedo: false, skipRendering: false } | Set options for APIModel. skipUndoRedo : If this value is true, the result of editing through the model is not undo/redo. Also the old undo/redo stack is initialized. skipRendering : If this value is true, the results of editing through the model are reflected only in the model and not rendered on the screen. After all edits are done, you need to render them separately via editor.render() method. |
Example:
var paragraphs = document.querySelectorAll('.se-contents p'); paragraphs.forEach(function(para, index){ para.innerText = index + 'test'; }); editor.updateBodyModel();