Documentation

Content

parse #

Arguments
html String
convertPlainText (optional) Boolean

Converts HTML to content for the editor. Conversion is to set technical classes and attributes for editing.

When specifying convertPlainText replaces paragraphs with a text block.

var content = this.app.create('content');
var html = content.parse(html);

unparse #

Arguments
html String

Converts editor content into plain HTML. Conversion is to remove technical classes and editing attributes.

var content = this.app.create('content');
var html = content.unparse(html);