forward editor events to store

This commit is contained in:
ojack
2022-02-11 15:09:41 +01:00
parent a743109f7a
commit a5afa7d816
2 changed files with 8 additions and 0 deletions

View File

@@ -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) {