The API model used to edit paragraphs.
The HTML String passed as an argument is added as a child at the back of the Element.
var paragraph = editor.getAPIModelById('id'); paragraph.append('<span>TEXT</span>'); |
The HTML String passed as an argument is added as a child to the front of the Element.
var paragraph = editor.getAPIModelById('id'); paragraph.prepend('<span>TEXT</span>'); |
Removes the Element itself.
var paragraph = editor.getAPIModelById('id'); paragraph.remove(); |
Replaces the element itself with the HTML String passed as an argument.
var paragraph = editor.getAPIModelById('id'); paragraph.replace('<p><span>Paragraph replaced</span></p>'); |
Set tagName to display paragraph.
ex) 'P', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6'
If a paragraph set as P tag is set to 'H1', it is changed to <H1> tag.
var paragraph = editor.getAPIModelById('id'); paragraph.setHeading('H1'); |
Set the text string value passed as an argument to the paragraph to Text.
var paragraph = editor.getAPIModelById('id'); paragraph.setText('This is what goes into the paragraph.'); |