filament-editorjs
filament-editorjs copied to clipboard
Alpine Expression Error: editorjs is not defined
Hello, I am getting the above error.
Alpine.start() is called in my app.js
It seems that the listener
document.addEventListener("alpine:init", () => { Alpine.data( "editorjs",
Only gets set after that so it does not get triggered and as a result editorjs is not available...? Grateful for any assistance.
"filament/filament": "^2.16", "filament/forms": "^2.0", "livewire/livewire": "^2.10", "laravel/framework": "^9.19",
In case useful, from @rhmrms on Discord:
- Publish assets
php artisan vendor:publish --provider="FilamentEditorJs\FilamentEditorJsServiceProvider" --tag="filament-editorjs-assets"
- Add style in layout
<link href="{{ asset('vendor/filament-editorjs/css/editor.css') }}" rel="stylesheet">
- Add scripts before Alpine
<script src="{{ asset('vendor/filament-editorjs/js/editor.js') }}"></script>