fix export example

This commit is contained in:
Philipp Kühn
2018-10-23 23:05:15 +02:00
parent b7e915015c
commit 0c9d481cd2
2 changed files with 49 additions and 48 deletions

View File

@@ -29,9 +29,7 @@ export default class Editor {
const defaultOptions = {
editable: true,
content: '',
on: {
update: () => {},
},
onUpdate: () => {},
}
this.options = {
@@ -189,9 +187,9 @@ export default class Editor {
}
emitUpdate() {
this.emit('update', {
getHTML: this.getHTML,
getJSON: this.getJSON,
this.options.onUpdate({
getHTML: this.getHTML.bind(this),
getJSON: this.getJSON.bind(this),
state: this.state,
})
}