IFrame extends Element

The API model used to edit the IFrame.

Methods

remove()

Removes the Element itself.

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

replace(html)

Replaces the element itself with the HTML String passed as an argument.

var iframe = editor.getAPIModelById('id');
iframe.replace('<span>Iframe replaced</span>');

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

Sets the height of the IFrame.

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

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

Sets the width of the IFrame.

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