egeloen / IvoryCKEditorBundle

Provides a CKEditor integration for your Symfony project.
MIT License
336 stars 114 forks source link

Symfony 3 : error of path to load codesnippet #261

Closed falexis77 closed 7 years ago

falexis77 commented 7 years ago

Hi, i have a problem, i download ivoryckeditor and add a plugin codesnippet with dependencies. I have included the folder ckeditor/plugins in the resource folder of my bundle back

config.yml

ivory_ck_editor:
    default_config: blog
    configs:
        blog:
            uiColor:      "#FCFCFC"
            toolbar:      [ [ 'Preview','-', 'CodeSnippet' ], [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ], [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ], [ 'Source' ], [ "About" ], "/", [ 'Bold','Italic','Underline','Strike', 'Blockquote','Subscript','Superscript','-','RemoveFormat' ], [ 'NumberedList','BulletedList','-','Outdent','Indent','-','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ], [ 'Link','Unlink','Anchor' ], [ 'pbckcode', 'Image', 'Video', 'Table','SpecialChar','Iframe' ], '/', [ 'Styles', 'Format','Font','FontSize' ], [ 'TextColor','BGColor' ], [ 'RemoveFormat' ], [ 'Maximize' ] ]
            extraPlugins: "codesnippet,clipboard,dialog,lineutils,widget,dialogui"
    plugins:
        codesnippet:
            path:     "/bundles/back/ckeditor/plugins/codesnippet/"
            filename: "plugin.js"
        clipboard:
            path:     "/bundles/back/ckeditor/plugins/clipboard/"
            filename: "plugin.js"
        dialog:
            path:     "/bundles/back/ckeditor/plugins/dialog/"
            filename: "plugin.js"
        lineutils:
            path:     "/bundles/back/ckeditor/plugins/lineutils/"
            filename: "plugin.js"
        widget:
            path:     "/bundles/back/ckeditor/plugins/widget/"
            filename: "plugin.js"
        dialogui:
            path:     "/bundles/back/ckeditor/plugins/dialogui/"
            filename: "plugin.js"

but on admin, a error appear on console : NetworkError: 404 Not Found - http://site.fr/bundles/ivoryckeditor/plugins/codesnippet/plugin.js I precise a path for the sources but it continue to search in ivory file!

egeloen commented 7 years ago

Hum, this is weird. I just give a try to this branch: https://github.com/symfony/symfony-standard/compare/master...egeloen:ckeditor-plugin which is mostly the same as your code and it's working. Are you sure you have clear your cache as well as install assets in the web directory on the good path? Additionally, can you copy/paste the generated html?

egeloen commented 7 years ago

@falexis77 Any news?

Titou74 commented 7 years ago

Hello,

I made a little modification to add a skin to ivoryckeditor. Perhaps you have to make the same for plugins.

So, try to replace "/bundles/back/" with "../back/"

egeloen commented 7 years ago

@Titou74 If you need to do this "hack", there is somethign wrong somewhere... Can you open an dedicated issue since it is not the same topic please?

egeloen commented 7 years ago

Closing as the original bug is not reproductible.