ck editor config
ck editor config
probably simple, but how do i configure the toolbar on the ckeditor editor plugin?
i have a config.js file but changing it doesn't seem to make any difference.
Cant seem to find an example
can i do this directly with ...
type: "ckeditor",
opts: "{}"
can i point to a js file within opts, or key in the values ?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The
opts
parameter given (which should be an object, not a string) is just passed to the CKEditor constructor:If that accepts a js file in the second parameter, then it would work, but the CKEditor documentation doesn't seem to suggest it does.
Can you not just load your js file as normal (assuming it assigns the config to a variable) and then pass that config in?
Allan
looking at the ckeditor help, it appears that i can do this...
using this and the example above, I assume that replacing the 'editor1' with the div id of the text area (in my case DTE_Field_tblcmscontent-ContentValue) would be it
so is it just a case then of using a modified version of this line as my option ?
or am I missing the point ?
If you can pass a
customConfig
option have you tried doing so as follows?:Allan
to be honest, nothing seems to work.
I can't even enforce the slightest change from the default setting, whether trying a custom config option, or simply to add/remove sections of the toolbar
Can you give me a link to the page?
Allan
in this example, i tried just setting the toolbar to basic in my editor instance
Looks like you need to update your CKEditor plug-in for Editor. Specifically in the version you have:
needs to be:
Allan
Ok, thanks for pointing that out.
Updated js file in place
i tried the following, and it works
so now I will look at using a config file. ;-)
OK, in order to use a config file, here is a basic example of what i did.
Added a js file to the page with my custom settings
in this case i made it a wacky colour and used french
then in the editor instance
use the name of the config group as the option, in this case, i called it toolbarGroups
that should do it.