Forum

Thread tagged as: Problem, Addons, Third-party

Need assistance with ckeditor plug-in

HI all,

I've managed to install and get ckeditor appearing in Perch as I have normally with other sites recently, however, I've noticed that the config.js file has changed recently.

For some reason, the colour palette is missing and I can't get custom colours to appear at all using code that has worked previously. Can anyone assist?

New config.js file looks like this:

/**
 * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/license
 */

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here.
    // For complete reference see:
    // https://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 = 'Underline,Subscript,Superscript';

    // Set the most common block elements.
    config.format_tags = 'p;h2;h3;h4;h5;pre';

    // Simplify the dialog windows.
    config.removeDialogTabs = 'image:advanced;link:advanced';

};

All I want to do is ensure the colour palette appears and to be able to add custom colours. I always used to do this using the following (which is still being suggested as a solution) - I'm sure I've missed something simple here but unsure what I've done wrong - any help appreciated:

    config.colorButton_colors = '948054,9D9D9C,231F20'; 

Important info from diagnostics:

SUMMARY INFORMATION

Perch: 2.8.30, PHP: 5.5.30, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.30), assets (2.8.30), categories (2.8.30), perch_blog (5.0), perch_forms (1.8.3) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms' ); PERCH_LOGINPATH: /admin Image manipulation: GD Imagick PHP limits: Max upload 64M, Max POST 64M, Memory: 320M, Total max file upload: 64M F1: 2edba60ed1f613d6dd804feb202456a2

Gary Ward

Gary Ward 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I'll leave this here in case anyone happens to know about configuring CKEditor, but your best bet might be to ask in the forum for that product.

No problem - thanks Drew. I was asking on the off chance in case anyone works with these regularly. I've found part of the problem and that is that groups are currently empty, however, I still can't seem to get them appearing within the editor.

e.g. after the following:

{ name: 'colors' },

this needs to be added.

{ name: 'colors', items: [ 'TextColor', 'BGColor' ] 

Still no joy though - hopefully someone may be able to assist.

Part of the confusion is that I've always used:

config.toolbar

and not:

config.toolbarGroups
Simon Clay

Simon Clay 127 points

Hi, I think the latest version of CKEditor has changed, but I can't see where.

So I created a version for Perch with the color button enabled here: https://www.sly-design.co.uk/perch-cms/