emilianotisato / nova-tinymce

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

How to use with laravel vapor? #53

Closed andresilvagomez closed 3 years ago

andresilvagomez commented 3 years ago

Hey, Do you know how can I use it with Laravel vapor?

Currently, this is failing

Screen Shot 2021-02-28 at 10 49 09 PM
andresilvagomez commented 3 years ago

I Think I need to modify the URL from where resources are getting, but how can I do?

martin-ro commented 3 years ago

I found for use with Vapor using the CDN is working just fine.

NovaTinyMCE::make('Content')->options([
                '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/',
                'use_lfm' => true,
                'height' => '700',
                'plugins' => [
                    'lists preview hr anchor link pagebreak image wordcount fullscreen directionality paste textpattern code'
                ],
                'toolbar' => 'undo redo | styleselect | bold italic forecolor backcolor | alignleft aligncenter alignright alignjustify | image | bullist numlist outdent indent | link | code',
                'relative_urls' => false,
            ])->stacked(),
egantz commented 2 years ago

@martin-ro thank you so much! The fix works perfectly - serving the files via external CDN does the trick!