emilianotisato / nova-tinymce

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

Customize the LFM Route #11

Closed adrian-schnell closed 5 years ago

adrian-schnell commented 5 years ago

When changing the LFM route I'm getting a 404 in backend.

emilianotisato commented 5 years ago

@adrian-schnell Please explain a little bit more.

adrian-schnell commented 5 years ago

I tried to change the default route from LFM from laravel-filemanager to files. I also setup all the routes like documented - but the in the nova backend I got an 404. I think the routes are hardcoded to the filemanager?

emilianotisato commented 5 years ago

Ohhh, but you have the option to pase the new URL as a key in the options array, like this:

NovaTinyMCE::make('body')->options([
                'plugins' => [
                    'advlist autolink lists link image charmap print preview hr anchor pagebreak',
                    'searchreplace wordcount visualblocks visualchars code fullscreen',
                    'insertdatetime media nonbreaking save table contextmenu directionality',
                    'emoticons template paste textcolor colorpicker textpattern'
                ],
                'toolbar' => 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media',
                'use_lfm' => true,
                'lfm_url' => 'new-laravel-filemanager-url'
                ]),

Sorry that is not documented in the readme...

adrian-schnell commented 5 years ago

ah perfect! That's what I was looking for! Thanks a lot!