isEmpty

Returns whether the editor content is empty.

Returns

TypeDescription
Booleantrue if content exists, false if empty

Example

var html;
if (!editor.isEmpty()) {
  // only fetch HTML when there is content
  html = editor.getPublishingHtml();
}