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 4:04PM
    Can you try updating using the develop branch of FUEL. There was a bug fix made to help with the CKEditor configuration and will be rolled out in the next release:
    https://github.com/daylightstudio/FUEL-CMS/tree/develop
  • edited 4:04PM
    Let me try~~~! Thanks a lot.
  • edited 4:04PM
    Hi Admin,

    Just running the following to updating to develop branch?

    // migrates to a specific version. Must be in a dev mode environment
    php index.php fuel/migrate/version/2

    Please advise.
  • edited 4:04PM
    To update the develop branch, I'd recommend using GIT. You can set up the FUEL GitHub repo as a remote source (https://github.com/daylightstudio/FUEL-CMS.git) and merge in the develop branch into a branch of your site. There may be a few conflicts that you'll need to resolve with things in your fuel/application folder. There is also a sql update in fuel/install/upgrades/fuel_1.3_schema_changes.sql that will need to be run.
Sign In or Register to comment.