Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hello, everyone!
Need help with adding custom CKEditor plugins to inline editing mode.
I have developed several custom CKEditor plugins which work absolutely fine when editing pages from admin panel.
Now I want to be able to use those plugins when editing inline on a website itself.
I see that ckeditor 'config.js' with custom plugins defined is loaded properly for on page editing. Remaining issue that custom toolbar for inline editor does not list those buttons as available to use. I've tried adding them to 'inline.php' just for testing purposes but still no luck. Even if it worked it would be not the best idea in case I'll need to update CouchCMS in the future but even that would be a minor issue if I got them working.
Would be very glad If anybody knows how to extended default behavior.
Thank you in advance!
I am not sure, which inline mode you have in mind. But perhaps this is the solution, you are looking for:

https://simonwpt.github.io/CouchDocs/co ... ditor.html
Thank you but I'm talking about "cms:inline_edit". This tag has set of predefined buttons(default ckeditor addons). I've developed new "button" which makes a new block level element with some markup and editable regions within it(all according to CKEditor plugin development docs). This addon works absolutely fine when used inside admin panel WYSIWYG but I do not understand how do I add it when editing on client side with inline edit mode
It seems I've found a minor issue in existing couch codebase.

In 'scripts.php' for inline editor add-on there is a JS line which overwrites "extraPlugins" provided in config.js file used inside admin view.

Changed:
Code: Select all
if( inline ){
            editor.on( 'configLoaded', function(){
                editor.config.extraPlugins = 'inlinesave';
...


To:
Code: Select all
var currentPlugins = editor.config.extraPlugins;
editor.config.extraPlugins = currentPlugins ? currentPlugins + ',' + 'inlinesave' : 'inlinesave';


Don't know if it needs to be like that as a fail-safe mechanics from KK?
Also, still wondering if there is a better way to extend available custom buttons list besides modifying 'inline.php'
4 posts Page 1 of 1
cron