Closed MrMooky closed 2 years ago
I'm probably doing something wrong, but can't figure it out. ._.
In order to be able to create my own plugins, I opted for option two regarding the assets.
I ended up with errors so I removed everything to a bare minimum:
import EditorJS from '@editorjs/editorjs'; window.editorInstance = function(dataProperty, editorId, readOnly, placeholder, logLevel) { return { instance: null, data: null, initEditor() { this.data = this.$wire.get(dataProperty); this.instance = new EditorJS({ holder: editorId, readOnly, placeholder, logLevel, data: this.data, onChange: () => { this.instance.save().then((outputData) => { this.$wire.set(dataProperty, outputData); this.$wire.call('save'); }).catch((error) => { console.log('Saving failed: ', error) }); } }); } } }
But I'm still getting errors:
Really not sure what I'm doing wrong. Any help is much appreciated.
Ah, never mind. Had to include the script before Alpine.js is initialised.
I'm probably doing something wrong, but can't figure it out. ._.
In order to be able to create my own plugins, I opted for option two regarding the assets.
I ended up with errors so I removed everything to a bare minimum:
But I'm still getting errors:
Really not sure what I'm doing wrong. Any help is much appreciated.