Parent Class of all APIModel Elements. It provides the necessary properties and methods to manipulate the model.
Element ID
Element Type
Current index
Parent APIModel
Next Sibling APIModel
Previous Sibling APIModel
First child APIModel
Last child APIModel
Child APIModels (array)
Sibling APIModels (array)
Next sibling APIModels (array)
Previous sibling APIModels (array)
Options object
편집시 undo, redo를 생략할지 여부
Whether to omit undo and redo when editing
Returns the API model that meets the criteria among the parent API models.
var run = editor.getAPIModelById('id'); var body = run.closest(function(apiModel){ return apiModel.type === 'Body'; }); |
Set ID.
var element = editor.getAPIModelById('id'); element.setId('test_setId'); |
Set style.
var element = editor.getAPIModelById('id'); element.setStyle('background-color: red;') |
Remove all child elements.
var element = editor.getAPIModelById('id'); element.empty(); |