HTMLContainer extends Element
The API model used to edit the HTMLContainer.
Methods
remove()
Removes the Element itself.
IF ALL ELEMENTS ARE REMOVED, ERRORS MAY OCCUR IN SUBSEQUENT OPERATIONS.
var container = editor.getAPIModelById('id'); container.remove();
replace(html)
- html <String> The HTML String to replace.
Replaces the element itself with the HTML String passed as an argument.
var container = editor.getAPIModelById('id'); container.replace('<span>HTMLContainer replaced</span>');
setHeight(value[, unit = 'px'])
- value<Number> Height
- unit <String> Unit of height ('px', '%'). default 'px'.
Set the height of the HTML Container.
var container = editor.getAPIModelById('id'); container.setHeight(200); container.setHeight(200, 'px');
setWidth(value[, unit = 'px'])
- value<Number> Width
- unit <String> Unit of width ('px', '%'). default 'px'.
Set the width of the HTML Container.
var container = editor.getAPIModelById('id'); container.setWidth(400); container.setWidth(100, '%');