The API model used to edit the Body area. In Synap Editor, the body area is composed of <div class='se-contents'></div>.
The HTML String passed as an argument is added as a child at the back of the Element.
var body = editor.getAPIModels('.se-contents')[0]; body.append('<p><span>APPEND TEXT</span></p>'); |
The HTML String passed as an argument is added as a child to the front of the Element.
var body = editor.getAPIModels('.se-contents')[0]; body.prepend('<p><span>PREPEND TEXT</span></p>'); |
Replaces the element itself with the HTML String passed as an argument.
var body = editor.getAPIModels('.se-contents')[0]; body.replace('<p><span>Body replaced</span></p>'); |
Sets the HTML string value passed as an argument to the body's internal HTML.
var body = editor.getAPIModels('.se-contents')[0]; body.setHTML('<p><span>Add HTML to the body. All previously entered information will be erased.</span></p>'); |
Set the text string value passed as an argument to the internal text of the body.
var body = editor.getAPIModels('.se-contents')[0]; body.setText('Add text to the body. All previously entered information will be erased.'); |