egeloen / IvoryCKEditorBundle

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

Wrong path when loading skin in Symfony 3 #263

Closed m-radzikowski closed 7 years ago

m-radzikowski commented 7 years ago

I can confirm issue mentioned here: https://github.com/egeloen/IvoryCKEditorBundle/issues/261#issuecomment-262058483

In Symfony 3 IvoryCKEditorBundle 4.0.6 with this config:

ivory_ck_editor:
    configs:
        my_cnf:
            skin: 'moono-lisa,blog/ckeditor/skins/moono-lisa/'

tries to load assets from web/bundles/ivoryckeditor/blog/ckeditor/skins/moono-lisa/ instead of web/bundles/blog/ckeditor/skins/moono-lisa/.

Simple workaround is to set path as:

            skin: 'moono-lisa,../blog/ckeditor/skins/moono-lisa/'
egeloen commented 7 years ago

Thanks for your report! Let me some time to debug and find the cause...

egeloen commented 7 years ago

@m-radzikowski I just give a try to your issue and it sems the doc is wrong... Given I put a custom theme in the web directory under /web/bundles/blog/ckeditor/skins/moono-lisa/, then, using the following config works for me:

ivory_ck_editor:
    configs:
        my_cnf:
            skin: 'moono-lisa,/bundles/blog/ckeditor/skins/moono-lisa/'

Basically, the skin path must be an absolute one relative to the web directory.

eved42 commented 5 years ago

Hi,

sorry to open back this ticket but I try to add the "minimalist" skin and I can't manage to make it work. The path is correct, the skin is found (I can see the response of the request in the web developer toolbar) but my editor don't apply it, it's still the default ugly one... I don't understand.

I have a Symfony 3.2 project with wamp server 3.0 at : www/symfony/myproject/ My ckeditor is installed at /web/bundles/ivoryckeditor/ My skin is at : /web/bundles/ivoryckeditor/skins/minimalist/

My config :

ivory_ck_editor:
    jquery: true
    default_config: "myconf"
    configs:
        myconf:
           height: '350px'
           language: 'en'
           toolbar: [ ['Undo','Redo'], ['Format','Font','FontSize'], ['Source','Preview'], ['Bold','Italic','Underline','Superscript','TextColor'], ['Table','HorizontalRule','SpecialChar'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], ['BulletedList','NumberedList'] ]
           skin: 'minimalist,skins/minimalist/'

I try to change the path but nothing works.

skin: 'minimalist,bundles/ivoryckeditor/skins/minimalist/'
skin: 'minimalist,/bundles/ivoryckeditor/skins/minimalist/'
skin: 'minimalist,/symfony/myproject/web/bundles/ivoryckeditor/skins/minimalist/'
skin: 'minimalist,%kernel.root_dir%/../web/bundles/ivoryckeditor/skins/minimalist/'
skin: 'minimalist,../ivoryckeditor/skins/minimalist/'

I'm completely desperate, I spent hours on that problem. Please help.