Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpine Expression Error: editorjs is not defined #19

Open
Rudston opened this issue Feb 22, 2023 · 1 comment
Open

Alpine Expression Error: editorjs is not defined #19

Rudston opened this issue Feb 22, 2023 · 1 comment

Comments

@Rudston
Copy link

Rudston commented Feb 22, 2023

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",

@CeriseGoutPelican
Copy link

In case useful, from @rhmrms on Discord:

  1. Publish assets
php artisan vendor:publish --provider="FilamentEditorJs\FilamentEditorJsServiceProvider" --tag="filament-editorjs-assets"
  1. Add style in layout
<link href="{{ asset('vendor/filament-editorjs/css/editor.css') }}" rel="stylesheet">
  1. Add scripts before Alpine
<script src="{{ asset('vendor/filament-editorjs/js/editor.js') }}"></script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants