HTMLContainer extends Element

The API model used to edit the HTMLContainer.

Methods

remove()

Removes the Element itself.

var container = editor.getAPIModelById('id');
container.remove();

replace(html)

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'])

Set the height of the HTML Container.

var container = editor.getAPIModelById('id');
container.setHeight(200);
container.setHeight(200, 'px');

setWidth(value[, unit = 'px'])

Set the width of the HTML Container.

var container = editor.getAPIModelById('id');
container.setWidth(400);
container.setWidth(100, '%');