Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

릴리즈 2.11.0 이상

Returns an APIModel for editing via the API.


Parameters:

Name

Type

Attribute

Description

id

String

optionsObject

{

    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:

TypeDescription
ElementAPI 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();
  • No labels