isEdited

Release 2.8.0+

Returns whether content has been edited in Synap Editor.

Note: isEdited() uses the undo stack for a quick check. It may return true even when there is no net change (e.g. typing and then pressing Backspace).

Returns

TypeDescription
Booleantrue if edits exist, false otherwise

Example

var html;
if (!editor.isEdited()) {
  // only fetch the HTML when the editor has no edits
  html = editor.getPublishingHtml();
}