refactoring

This commit is contained in:
Philipp Kühn
2018-11-12 23:00:14 +01:00
parent 8c060d71a5
commit 9755dd3cc1

View File

@@ -39,7 +39,6 @@ export default class Editor {
} }
init() { init() {
this.bus = new Vue()
this.element = document.createElement('div') this.element = document.createElement('div')
this.extensions = this.createExtensions() this.extensions = this.createExtensions()
this.nodes = this.createNodes() this.nodes = this.createNodes()
@@ -261,14 +260,6 @@ export default class Editor {
this.view.focus() this.view.focus()
} }
emit(event, ...data) {
this.bus.$emit(event, ...data)
}
on(event, callback) {
this.bus.$on(event, callback)
}
registerPlugin(plugin = null) { registerPlugin(plugin = null) {
if (plugin) { if (plugin) {
this.state = this.state.reconfigure({ this.state = this.state.reconfigure({
@@ -296,8 +287,6 @@ export default class Editor {
} }
destroy() { destroy() {
this.emit('destroy')
if (this.view) { if (this.view) {
this.view.destroy() this.view.destroy()
} }