constructor([content])
Class: DocumentEditor.
Description:
DocumentEditor constructor. Check usage examples below
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
string |
Initial content. |
Examples:
let content = "<html><body><h1>This is a header</h1><p>This is a new paragraph</p></body></html>";
const editor1 = new DocumentEditor(content).html(true); // creates editor and sets content in constructor
const editor2 = new DocumentEditor().html(true).text(content); // creates editor and then sets content
