Classes
AbstractEditorAnnotationCommandCommandComponentConfiguratorContainerEditorContainerSelectionDOMImporterDocumentDocumentNodeEditAnnotationCommandEditingEventEmitterInsertInlineNodeCommandNodeIndexPropertyAnnotationPropertySelectionProseEditorScrollPaneSelectionSpellCheckCommandSurfaceTextNodeTransactionDocumentVirtualElement
Components
Modules
HTMLImporter
Class defined in model/HTMLImporter.js#11 inherits from
new HTMLImporter()
Constructor defined in model/HTMLImporter.js#13
this.convertDocument(documentEl)
Method defined in model/HTMLImporter.js#60
Orchestrates conversion of a whole document.
This method should be overridden by custom importers to reflect the structure of a custom HTML document or fragment, and to control where things go to within the document.
Parameters
documentEl | DOMElement | the document element. |
Example
When a fragment <h1>Foo</h1><p></Bar</p>
is imported the implementation
looks like this.
convertDocument(els) {
this.convertContainer(els, 'body')
}
If a full document <html><body><p>A</p><p>B</p></body></html>
is imported
you get the <html>
element instead of a node array.
convertDocument(htmlEl) {
var bodyEl = htmlEl.find('body')
this.convertContainer(bodyEl.children, 'body')
}