emilianotisato / nova-tinymce

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

not found issue #72

Closed adityadees closed 2 years ago

adityadees commented 2 years ago

this my depedency

"require": {
        "php": "^8.0.2",
        "emilianotisato/nova-tinymce": "^1.2",
        "guzzlehttp/guzzle": "^7.2",
        "laravel/framework": "^9.2",
        "laravel/nova": "~4.0",
        "laravel/sanctum": "^2.14.1",
        "laravel/tinker": "^2.7",
        "unisharp/laravel-filemanager": "^2.4"
    },

image

  1. http://localhost:8000/nova-api/scripts/plugins/print%20preview%20powerpaste%20casechange%20importcss%20tinydrive%20searchreplace%20autolink%20autosave%20save%20directionality%20advcode%20visualblocks%20visualchars%20fullscreen%20image%20link%20media%20mediaembed%20template%20codesample%20table%20charmap%20hr%20pagebreak%20nonbreaking%20anchor%20toc%20insertdatetime%20advlist%20lists%20checklist%20wordcount%20tinymcespellchecker%20a11ychecker%20imagetools%20textpattern%20noneditable%20help%20formatpainter%20permanentpen%20pageembed%20charmap%20tinycomments%20mentions%20quickbars%20linkchecker%20emoticons%20advtable%20export/plugin.js net::ERR_ABORTED 404 (Not Found)

  2. Failed to load plugin: print preview powerpaste casechange importcss tinydrive searchreplace autolink autosave save directionality advcode visualblocks visualchars fullscreen image link media mediaembed template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists checklist wordcount tinymcespellchecker a11ychecker imagetools textpattern noneditable help formatpainter permanentpen pageembed charmap tinycomments mentions quickbars linkchecker emoticons advtable export from url plugins/print preview powerpaste casechange importcss tinydrive searchreplace autolink autosave save directionality advcode visualblocks visualchars fullscreen image link media mediaembed template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists checklist wordcount tinymcespellchecker a11ychecker imagetools textpattern noneditable help formatpainter permanentpen pageembed charmap tinycomments mentions quickbars linkchecker emoticons advtable export/plugin.js

  3. cannot use lfm file manager

my configurations like this

'default_options' => [
        'content_css' => '/vendor/tinymce/skins/ui/oxide/content.min.css',
        'skin_url' => '/vendor/tinymce/skins/ui/oxide',
        'path_absolute' => '/',
        'plugins' => [
            'print preview powerpaste casechange importcss tinydrive searchreplace autolink autosave save directionality advcode visualblocks visualchars fullscreen image link media mediaembed template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists checklist wordcount tinymcespellchecker a11ychecker imagetools textpattern noneditable help formatpainter permanentpen pageembed charmap tinycomments mentions quickbars linkchecker emoticons advtable export',
        ],
        'toolbar' =>
        'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent |  numlist bullist checklist | forecolor backcolor casechange permanentpen formatpainter removeformat | pagebreak | charmap emoticons | fullscreen  preview save print | insertfile image media pageembed template link anchor codesample | a11ycheck ltr rtl | showcomments addcomment',
        'relative_urls' => false,
        'use_lfm' => true,
        'lfm_url' => 'laravel-filemanager',
        'image_caption' => true,
        'quickbars_selection_toolbar' => 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
        'noneditable_noneditable_class' => 'mceNonEditable',
        'toolbar_mode' => 'sliding',
        'spellchecker_ignore_list' => ['Ephox', 'Moxiecode'],
        'tinycomments_mode' => 'embedded',
        'content_style' => '.mymention{ color=> gray; }',
        'contextmenu' => 'link image imagetools table configurepermanentpen',
        'a11y_advanced_options' => true,
    ],
gvinson commented 2 years ago

I can confirm this issue is present on "emilianotisato/nova-tinymce": "^2.0" and Nova v4 as well.

If there are more than 2 items in the plugins array, it throws a 404. If there is only one item, it does not. I dug through the code but was unable to locate where plugins get loaded. Could it be a parsing error?

gvinson commented 2 years ago

I was able to fix this by moving the string outside of the array

Change:

'plugins' => [
    'plugin1 plugin2 ....',
],

to:

'plugins' => 'plugin1 plugin2 ....',
adityadees commented 2 years ago

I was able to fix this by moving the string outside of the array

Change:

'plugins' => [
    'plugin1 plugin2 ....',
],

to:

'plugins' => 'plugin1 plugin2 ....',

yes, you right, I'm already fix it a few days ago following tinymce doc

this my configuration 'plugins' => 'preview importcss searchreplace autolink autosave save directionality visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount charmap',

image