diff --git a/frontend/web-editor/public/bundle.js b/frontend/web-editor/public/bundle.js index 93c83d4..a51a414 100644 --- a/frontend/web-editor/public/bundle.js +++ b/frontend/web-editor/public/bundle.js @@ -15307,10 +15307,14 @@ module.exports = class Editor extends Component { constructor (id, state, emit) { super(id) this.local = state.components[id] = {} + this.emit = emit } load (element) { this.editor = new HydraEditor(this.textEl) + this.editor.on("*", (e, t) => { + this.emit(e) + }) } update (center) { diff --git a/frontend/web-editor/src/views/EditorComponent.js b/frontend/web-editor/src/views/EditorComponent.js index f6e4461..8805683 100644 --- a/frontend/web-editor/src/views/EditorComponent.js +++ b/frontend/web-editor/src/views/EditorComponent.js @@ -6,10 +6,14 @@ module.exports = class Editor extends Component { constructor (id, state, emit) { super(id) this.local = state.components[id] = {} + this.emit = emit } load (element) { this.editor = new HydraEditor(this.textEl) + this.editor.on("*", (e, t) => { + this.emit(e) + }) } update (center) {