Anyone tried patching in CKEditor 4.4.x to replace the existing CKEditor ?
The current version in production (Fuel 1.1) is 3.x and v4.0 is in the development branch on Git. I need 4.4.x so I can use the widget plugin. Unfortunately, 4.4.x breaks the Fuel image plugin (in custom_field.js). Anyone come across this?
Cheers
Comments
1. An additional configuration setting is required for the plugins to work called "allowedContent" which can be added in the MY_fuel.php $config['ck_editor_settings'] array and set to "true":
http://ckeditor.com/forums/Support/editor.insertHtml-doesnt-work-properly-anymore
2. In custom_fields.js change around line 198 or so:
var src = element.attributes['src']; // v4.4 fix // TO var src = element.attributes['data-cke-saved-src']; // v4.4 fix
Please test out on your end and report back. I can push this to the develop branch after a little more testing is done.
I needed to edit the fuelimage and fuellink plugins though (see below).
So, using Fuel 1.1 production version, what I did:
1. Rename ./editors/ckeditor
2. Downloaded the latest ckeditor (4.4.3) making sure it had the same standard plugins bundled. (I also needed "widget" for my project so included that too)
4. Copied fuelimage and fuellink plugins from development branch to ckeditor plugins
5. Copied in custom_fields.php from development branch
6. Edited custom_fields.php per request above ('data-cke-saved-src')
7. Edited MY_fuel.php to account for the new fuelimage and fuellink plugin names
I found that the image and links icons on the toolbar were corrupt when running CKeditor - it seems the CSS was looking for '*_fuelimage', '*_fuellink' and '*_fuelunlink' classes rather than image, link and unlink. To fix it, I edited the plugin.js for both plugins:
...at the bottom:
editor.ui.addButton( 'FUELImage', { label: 'Insert an Image', command: 'fuelimage', toolbar: 'image', /** +++ **/ icon: 'image' /* and 'link' and 'unlink' for fuellink plugin*/ });