Fieldset extends Element

The API model used to edit fieldsets.

Methods

append(html)

The HTML String passed as an argument is added as a child at the back of the Element.

var fieldset = editor.getAPIModelById('id');
fieldset.append("<input type='radio' id='mothman' name='monster'><label for='mothman'>Mothman</label>");

prepend(html)

The HTML String passed as an argument is added as a child to the front of the Element.

var fieldset = editor.getAPIModelById('id');
fieldset.prepend("<input type='radio' id='mothman' name='monster'><label for='mothman'>Mothman</label>");

remove()

Removes the Element itself.

var fieldset = editor.getAPIModelById('id');
fieldset.remove();

replace(html)

Replaces the element itself with the HTML String passed as an argument.

var fieldset = editor.getAPIModelById('id');
fieldset.replace('<p><span>Fieldset replaced</span></p>');

setHTML(html)

Set the HTML string value passed as an argument to the internal HTML of Fieldset.

var fieldset = editor.getAPIModelById('id');
fieldset.setHTML('<p><span>Add HTML. All previously entered information will be erased.</span></p>');

setText(text)

Set the text string value passed as an argument to the internal Text of the Fieldset.

var fieldset = editor.getAPIModelById('id');
fieldset.setText('Sample Text.');