egeloen/IvoryCKEditorBundle

'imagesPath' of undefined

Closed this issue · 2 comments

blump commented

I can not run the plugin templates provided by default with the bundle.
I have a javascript error that I can not resolve

Can not read property 'imagesPath' of undefined. for google chrome
TypeError: e is undefined. for Firefox

Bundle version: latest

Has someone already had this problem ? Thank you for your reply

ivory_ck_editor:
    input_sync: true
    default_config: default
    plugins:
        videodetector:
            path:     "/bundles/yooqecontentclient/embed/videodetector/"
            filename: "plugin.js"
        widget:
            path:     "/bundles/yooqecontentclient/embed/widget/"
            filename: "plugin.js"
        lineutils:
            path:     "/bundles/yooqecontentclient/embed/lineutils/"
            filename: "plugin.js"
        image2:
            path:     "/bundles/yooqecontentclient/embed/image2/"
            filename: "plugin.js"
        btgrid:
            path:     "/bundles/yooqecontentclient/embed/btgrid/"
            filename: "plugin.js"
        chart:
            path:     "/bundles/yooqecontentclient/embed/chart/"
            filename: "plugin.js"
        dialogui:
            path:     "/bundles/yooqecontentclient/embed/dialogui/"
            filename: "plugin.js"

    configs:
        default:
            extraPlugins: 'videodetector,widget,lineutils,image2,btgrid,chart,dialog,dialogui,templates'
            filebrowserBrowseRoute: elfinder
            filebrowserBrowseRouteParameters: []
            templates:    "my_templates"
        templates:
            my_templates:
                imagesPath: "/bundles/yooqecontentclient/embed/templates/"
                templates:
                    -
                        title:       "My Template"
                        image:       "image.jpg"
                        description: "My awesome template"
                        html:        "<p>Crazy template :)</p>"

EDIT 1 :

If I remove templates: "my_templates", I have default templates. But no way to put my own templates

Hey @blump

Your issue is that you put the templates node in the configs node whereas the templates node should be on the same level as configs (not in it). Basically, with your config, you have created a config named "templates".

blump commented

Thanks Egoloen,
Work too late is never good ...