IFrame extends Element
The API model used to edit the IFrame.
Methods
remove()
Removes the Element itself.
IF ALL ELEMENTS ARE REMOVED, ERRORS MAY OCCUR IN SUBSEQUENT OPERATIONS.
var iframe = editor.getAPIModelById('id'); iframe.remove();
replace(html)
- html <String> The HTML String to replace.
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'])
- value<Number> Height
- unit <String> Unit of height ('px', '%'). default 'px'.
Sets the height of the IFrame.
var iframe = editor.getAPIModelById('id'); iframe.setHeight(200); iframe.setHeight(200, 'px');
setWidth(value[, unit = 'px'])
- value<Number> Width
- unit <String> Unit of width ('px', '%'). default 'px'.
Sets the width of the IFrame.
var iframe = editor.getAPIModelById('id'); iframe.setWidth(400); iframe.setWidth(100, '%');