emilianotisato / nova-tinymce

Laravel Nova TinyMCE editor (with images upload capabilities!)
MIT License
116 stars 38 forks source link

On Laravel Vapor, CSS files are not found #59

Closed conantp closed 1 year ago

conantp commented 3 years ago

When deploying via Laravel Vapor, the CSS / skin files don't reference the assets URL, and return a 404 (breaking the editor).

I believe it would be resolved if you run those assets through the "asset" function.

bessa3301 commented 2 years ago

have you checked the issue #53 ? As it does not exactly solves the problem, it maybe can help you out.

egantz commented 2 years ago

@conantp Serving the files via external CDN does the trick!

Set your config/nova-tinymce.php to be:

'content_css' => 'https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.4.2/skins/ui/oxide/content.min.css',
'skin_url' => 'https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.4.2/skins/ui/oxide',
'content_css_dark' => 'https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.4.2/skins/ui/oxide-dark/content.min.css',
'skin_url_dark' => 'https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.4.2/skins/ui/oxide-dark',

And you're good!

conantp commented 1 year ago

@egantz - thanks for the heads up! I'm not sure where I found the solution months ago but yes, I can confirm using the CDN did fix the issue for me as well!