add export

This commit is contained in:
Philipp Kühn
2018-08-28 09:31:08 +02:00
parent ce2bc68853
commit 02cee263b2
13 changed files with 224 additions and 48 deletions

View File

@@ -202,9 +202,22 @@ export default {
dispatchTransaction(transaction) {
this.state = this.state.apply(transaction)
this.view.updateState(this.state)
this.$emit('update', this.state)
this.$emit('update', {
getHTML: this.getHTML,
getJSON: this.getJSON,
state: this.state,
})
this.updateMenuActions()
},
getHTML() {
return this.contentNode.elm.innerHTML
},
getJSON() {
return this.state.doc.toJSON()
},
},
mounted() {