titanium Posted August 14, 2014 Share Posted August 14, 2014 Dear ProcessWire experts, I would like to add some configuration options to CKEditor, like "config.startupOutlineBlocks = true;" Its easy to add that to /wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.4.3/config.js. But how do I keep it upgradeable? I suppose the next time the module is upgraded my custom config.js will be gone, right? TIA Link to comment Share on other sites More sharing options...
kongondo Posted August 14, 2014 Share Posted August 14, 2014 Custom configurations are now in /site/modules/InputfieldCKEditor/. I am guessing you know that now CKEditor is the default editor in PW (see dev branch) I am guessing but not sure that you could also add your custom config.js to that directory instead? Have a read here: http://www.flamingruby.com/blog/processwire-weekly-13/ [see Upgrades to CKEditor] https://github.com/ryancramerdesign/ProcessWire/tree/dev/site-default/modules/InputfieldCKEditor Link to comment Share on other sites More sharing options...
titanium Posted August 14, 2014 Author Share Posted August 14, 2014 Yes, I'm using the latest dev (2.4.12 at times). I've thrown my custom config.js in /site/modules/InputfieldCKEditor, but unfortunately this does not work. Then I tried to copy the whole "ckeditor-4.4.3" subdirectory to /site/modules/InputfieldCKEditor and put my custom config.js in it (overwriting the one from /wire...), but this doesn't work either. Link to comment Share on other sites More sharing options...
kongondo Posted August 14, 2014 Share Posted August 14, 2014 OK, let's hear what the experts say ....I agree it would be nice to have a custom config.js Link to comment Share on other sites More sharing options...
teppo Posted August 14, 2014 Share Posted August 14, 2014 This isn't currently supported and needs a new option for CKEditor module to work. CKEditor itself has support for custom config file. So far I can't see why this wouldn't be doable, either. This is how config load order is explained in the CKEditor docs: An editor instance is created. At this point all its default configuration options are set. If the customConfig setting has been set "in-page", that file is loaded, otherwise the default config.js file is loaded. All settings in the custom configuration file override current instance settings. If the settings loaded in step 2 also define a new customConfig value, another custom configuration file is loaded and its settings override current instance settings. This happens recursively for all files until no customConfig is defined. Finally the settings defined "in-page" override current instance settings (except customConfig, which has been used in step 1). I'll also have to agree that this is very important option to have. Config.js (in one form or another) is meant to be customised. 3 Link to comment Share on other sites More sharing options...
kongondo Posted August 14, 2014 Share Posted August 14, 2014 Titanium, mind creating a feature request to Ryan on GitHub? Thanks. Link to comment Share on other sites More sharing options...
titanium Posted August 14, 2014 Author Share Posted August 14, 2014 Titanium, mind creating a feature request to Ryan on GitHub? Thanks. Done 3 Link to comment Share on other sites More sharing options...
kongondo Posted August 15, 2014 Share Posted August 15, 2014 Nice! Ryan has added this to the dev branch Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now