This is the API model used to edit the area of the shape.
The HTML String passed as an argument is added as a child at the back of the Element.
var shape = editor.getAPIModelById('id'); shape.append('<span>TEXT</span>'); |
The HTML String passed as an argument is added as a child to the front of the Element.
var shape = editor.getAPIModelById('id'); shape.prepend('<span>TEXT</span>'); |
Removes the Element itself.
var shape = editor.getAPIModelById('id'); shape.remove(); |
Replaces the element itself with the HTML String passed as an argument.
var shape = editor.getAPIModelById('id'); shape.replace('<span>Shape replaced</span>'); |
Set the HTML string value passed as an argument to the internal HTML of the figure.
var shape = editor.getAPIModelById('id'); shape.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 figure.
var shape = editor.getAPIModelById('id'); shape.setText('Sample text.'); |