36 Replies
Error:
GET http://localhost:8000/js/thethunderturner/filament-latex/components/filament-latex.js?v=dev-main net::ERR_ABORTED 404 (Not Found)
Anyone?php artisan filament:assets
Registering plugin scripts will publish them to the public folder when someone installs your plugin. During development though you need to manually publish it anytime you make changes.Ah yess, I forgot about that. I will try as soon as I get home
Thx
I have another question.
I get an error in my blade file that cpeEditor isnt recognized. Why is that the case?
Probably because your script it getting loaded after alpine has initialized so theirs no reference to it.
See https://filamentphp.com/docs/3.x/support/assets#asynchronous-alpinejs-components if you want to use asynchronous alpine components.
yeah I managed to fix it with:
I cant use
state
as input param to codeEditor() function though
like here
Check the editor docs I’m sure it has events you can use to tie the state back. That’s what I have to do with Tiptap.
It supports the path to a view file. You could just put your svg icon in there.
This is what I did when I was working on a codemirror plugin.
like this?
It doesnt work
or should I maybe move the svg to public?
ah, I see... I will definitely give this a try!
No, have to crate a blade file then just put the svg code in that blade file. And point to the blade file.
Ah, I see now. I cant just download the svgs from composer and then point to them
You can also create a custom set that uses blade-icons and inject them that way.
That’s what I’m doing in my next version of Tiptap editor.
like this:
But its still not found
Hmm. I would expect that to work.
i have an idea
I tried adding this
But its still not seen
Yea. I can try some things tomorrow. And it’s probably overkill for your need but you can source dive this to see how to tap into blade icons to create a custom set and inject it. https://github.com/awcodes/scribble
Start in the register method of the service provider.
return 'fileicon-latex';
actuallylike this?
Still not found
Svg by name "fileicon-latex" from set "default" not found.
I figured it out 💀. You return the view, not just the path
did you run
composer require codeat3/blade-file-icons
?
Because if you are using this package, I think you should be able to use fileicon-latex
yep, I had it installed
It didnt work though
let me try it.. one sec
that works
huuuuuuuuuuuuuuuuh?
From a fresh plugin?
ahh no, it is a Resource
bug report 👀
Hey, I just tried it on a resource, and it doesnt work :/
Currently I have this:
but then github actions give me this error
which I dont understand because the parent function is
Sounds like your icons aren’t getting registered with blade ui icons.
Do I have to do anything in my plugin's service provider?
Honestly not sure. Check the blade ui icon docs to make sure.
If the icon package is included and registered correctly then you should just be able to use the icon name in the getNavigationIcon() override.
This is from the PackageServiveProvider
As you can see, its missing the
resources/svg
I think thats why it doesnt work on plugins...
I tried on my dev app and it works, so 🤷