Plugins not loaded from correct folder
Closed this issue · 4 comments
Hello,
I'm trying to install a plugin (wordcount) like shown in the documentation but i got a trouble. When i put the plugin in config.yml, ckeditor try to load plugin.js from "/bundles/ivoryckeditor/plugins/wordcount/plugin.js" instead of "/ckeditor/wordcount/plugin.js"
ivory_ck_editor:
default_config: my_config
configs:
my_config:
extraPlugins: "wordcount"
filebrowserBrowseRoute: elfinder
filebrowserBrowseRouteParameters:
instance: my_default
height: 500
plugins:
wordcount:
path: "/ckeditor/wordcount/"
filename: "plugin.js"
However, if I put the configuration directy in the Form class it works perfectly and load the plugin from "/ckeditor/wordcount/plugin.js"
$builder->add('content', CKEditorType::class, array(
'plugins' => array(
'wordcount' => array(
'path' => '/ckeditor/wordcount/',
'filename' => 'plugin.js',
),
),
));
Thanks
Can confirm, after adding the configuration in the Formbuilder instead of the config.yml it works.
+1
The issue is in your YAML indentation. The plugins node is a dedicated node and not an embed node of the config one. Basically, you register a plugin in CKEditor with the plugins node and with the extraPlugins node, you use it in a config.
The following config works fine:
ivory_ck_editor:
default_config: my_config
configs:
my_config:
extraPlugins: "wordcount"
filebrowserBrowseRoute: elfinder
filebrowserBrowseRouteParameters:
instance: my_default
height: 500
plugins:
wordcount:
path: "/ckeditor/wordcount/"
filename: "plugin.js"
Oups my bad sorry tkank you for your help