The API model used to edit the DIV.
The HTML String passed as an argument is added as a child at the back of the Element.
var div = editor.getAPIModelById('id'); div.append('<span>TEXT</span>'); |
The HTML String passed as an argument is added as a child to the front of the Element.
var div = editor.getAPIModelById('id'); div.prepend('<span>TEXT</span>'); |
Removes the Element itself.
var div = editor.getAPIModelById('id'); div.remove(); |
Replaces the element itself with the HTML String passed as an argument.
var div = editor.getAPIModelById('id'); div.replace('<div><p><span>Div replaced</span></p></div>'); |
Set the HTML string value passed as an argument to the internal HTML of the DIV.
var div = editor.getAPIModelById('id'); div.setHTML('<p><span>Add HTML. All previously entered information will be erased.</span></p>'); |
Set the text string value passed as an argument to the internal Text of the DIV.
var div = editor.getAPIModelById('id'); div.setText('Sample Text.'); |
Sets the height of the DIV.
var div = editor.getAPIModelById('id'); div.setHeight(200); div.setHeight(200, 'px'); |
Sets the width of the DIV.
var div = editor.getAPIModelById('id'); div.setWidth(400); div.setWidth(100, '%'); |