FuelCMS v1.2 ckeditor - adding fonts color, resize, Underline, Subscript & Superscript

edited March 2015 in Modules
Hi,

I am trying to add fonts color, resize, Underline, Subscript & Superscript function control button into the ckeditor but not success.

Can anyone get me a hits of it? Below is what I did but not success.

fuel/application/config/My_fuel.php
$config['text_editor'] = 'ckeditor'; // ck editor specific settings... if you use a PHP array, it will use json_encode $config['ck_editor_settings'] = "{ toolbar:[ ['Source'], ['Bold','Italic','Strike','Subscript','Superscript','Underline'], ['Format','Resize','Colors'], ['FUELImage','HorizontalRule'], ['NumberedList','BulletedList'], ['FUELLink','FUELUnlink'], ['Undo','Redo','RemoveFormat'], ['PasteFromWord','PasteText'], ['Preview'], ['Maximize'] ], contentsCss: '".WEB_PATH."assets/css/main.css', htmlEncodeOutput: false, entities: false, bodyClass: 'ckeditor', protectedSource: [/\{fuel_\w+\(.+\)\}/g, /<\?[\s\S]*?\?>/g], toolbarCanCollapse: false, extraPlugins: 'fuellink,fuelimage', removePlugins: 'link,image', allowedContent: true }";

fuel/modules/fuel/assests/js/editors/ckeditor/config.js
CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. // For complete reference see: // http://docs.ckeditor.com/#!/api/CKEDITOR.config // The toolbar groups arrangement, optimized for two toolbar rows. config.toolbarGroups = [ { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] }, { name: 'links' }, { name: 'insert' }, { name: 'forms' }, { name: 'tools' }, { name: 'document', groups: [ 'mode', 'document', 'doctools' ] }, { name: 'others' }, '/', { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] }, { name: 'styles' }, { name: 'colors' }, { name: 'about' } ]; // Remove some buttons provided by the standard plugins, which are // not needed in the Standard(s) toolbar. config.removeButtons = ''; // Set the most common block elements. config.format_tags = 'p;h1;h2;h3;pre'; // Simplify the dialog windows. config.removeDialogTabs = 'image:advanced;link:advanced'; };

Comments

  • edited 6:44PM
    i Have the same problem but no response i tried to replace ckeditor.js and it is works but css of editor not working correctly .
  • The current version of Fuel has it's editor config information in editors.php rather than MY_Fuel.php.

    Use 'contentsCss' => WEB_PATH.'assets/css/ckeditor.css' to change the way the editor's content looks.
  • edited 6:44PM
    There was a bug in the fuel/application/config/editor.php config where it was using 'contentCss' instead of 'contentsCss'. This has been addressed in the most recent version 1.3.1 that was released last week.
  • edited 6:44PM
    Okay, I've double checked that contentCss is now contentsCss but I still can't add items to the ['ckeditor']['default'] array for the toolbar.

    Any other thoughts?
Sign In or Register to comment.