updateBodyModel
Release 2.11.0 and above.
Refreshes the edit model based on the .se-contents DOM.
Parameters:
<table> <thead> <tr><th>Name</th><th>Type</th><th>Attribute</th><th>Description</th></tr> </thead> <tbody> <tr> <td><code>options</code></td> <td>Object</td> <td>{
skipUndoRedo: false,
skipRendering: false
}
</td>
<td>
Sets options for the APIModel.
skipUndoRedo: Iftrue, edits made through this model are not added to undo/redo. The previous undo/redo stack is also cleared.skipRendering: Iftrue, edits made through this model are reflected only in the model and are not rendered to the screen. After all edits are completed, you must separately render via theeditor.render()method.
Example:
var paragraphs = document.querySelectorAll('.se-contents p');
paragraphs.forEach(function (para, index) {
para.innerText = index + 'test';
});
editor.updateBodyModel();