substance
Version:
Substance is a JavaScript library for web-based content editing. It provides building blocks for realizing custom text editors and web-based publishing systems.
23 lines (19 loc) • 465 B
JavaScript
import { AbstractEditor, ContainerEditor } from 'substance'
class TestEditor extends AbstractEditor {
constructor(...args) {
super(...args)
this.handleActions({
domSelectionRendered: function() {}
})
}
render($$) {
let doc = this.editorSession.getDocument()
let el = $$('div')
let body = $$(ContainerEditor, {
node: doc.get('body')
}).ref('surface')
el.append(body)
return el
}
}
export default TestEditor