Forum
CKEditor - multiple configs
Hi,
I've added the ckeditor to Perch via:
<perch:content id="text" type="textarea" label="Text" markdown="true" editor="ckeditor" html="true" imagewidth="640" imageheight="480" />
I'd like to specify a different config file for certain editable regions to add/remove features relevant to the content region.
I'm fully up to speed with how to update the ckeditor config settings. However, I cannot see how and where to integrate this with perch as there does not seem to be any mechanism for specifying alternative config files?
Thanks for your help.
Sure there is. In your
_config.inc
you can use the stringPERCH_EDITOR_CONFIG
This will be replaced with the value of the
editor-config
attribute on your tag.So in your
_config.inc
you could do something like:and then in your template
This is great I have been looking for a way of doing this. I am trying to set some of the styles in ckeditor and I can't seem to get it working. Can you point me in the right direction? This is the code I have but doesn't work so I must be doing something wrong.
Hi Guys, further to this I don't actually need to specify a different config for each text area. I wanted to set the drop down style options in the editor.
However when I add the following code to the config.js only one text area appears when editing a region. Instead of the 4 that should appear.
The error says my_styles already registered.
The above works for the first text area that shows. Then doesn't display any more text areas.