1.4.1 • Published 3 years ago
@negentropy/editor v1.4.1
Usage
init
const editor = new Editor({
editor: HTMLDivElement
onChange?: MutationCallback
shiftKeyEnter?: boolean // should newline by Shift+Enter
})
editor.insert(node: Node) // insert a Node(ELEMENT_NODE or TEXT_NODE)
editor.destroy() // destroy instance
editor.setMutationOberver(fn: MutationCallback) // reset MutationOberver