The API model used to edit images.
Replaces the element itself with the HTML String passed as an argument.
var image = editor.getAPIModelById('id'); image.replace('<span>Image replaced</span>'); |
Removes the Element itself.
var image = editor.getAPIModelById('id'); image.remove(); |
Set the src attribute of the image to the url passed as an argument.
var image = editor.getAPIModelById('id'); image.setSrc('/images/test.png'); |
Sets the width of the image.
var image = editor.getAPIModelById('id'); image.setWidth(200); image.setWidth(100, '%'); |
Sets the height of the image.
var image = editor.getAPIModelById('id'); image.setHeight(200); image.setHeight(100, 'px'); |