Legend extends Element

The API model used to edit the Legend.

Methods

remove()

Removes the Element itself.

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

replace(html)

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

var legend = editor.getAPIModelById('id');
legend.replace('<span>Legend replaced</span>');