Page tree
Skip to end of metadata
Go to start of metadata

Datalist extends Element

The API model used to edit the Datalist.

Methods

remove()

Removes the Element itself.

IF ALL ELEMENTS ARE REMOVED, ERRORS MAY OCCUR IN SUBSEQUENT OPERATIONS.

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

replace(html)

  • html <String> The HTML String to replace.

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

var datalist = editor.getAPIModelById('animals');
datalist.replace("<datalist id='animals'><option value='Dog'><option value='Cat'><option value='Chick'></datalist>");
  • No labels