RELEASE 2.11.0 OR ABOVE
Returns an APIModel for editing via the API.
Parameters:
Name | Type | Attribute | Description |
---|---|---|---|
id | String | ||
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. |
Return:
Type | Description |
---|---|
Element | API model for editing |
Example:
var table = editor.getAPIModelById('ID'); table.insertCol(1); table.insertRow(1); table.setWidth(400);
skipUndoRedo : true
var table = editor.getAPIModelById('ID', { skipUndoRedo : true }); table.insertCol(1); table.insertRow(1); table.setWidth(400);
skipRendering : true
var table = editor.getAPIModelById('ID', { skipRendering : true }); table.insertCol(1); table.insertRow(1); table.setWidth(400); editor.render();