SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    382
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    CKEDITOR config file woe

    Hi there,

    I've been banging my head against this for about 3 hours now, so I thought I'd just put it out there before I actually do my self some long-term damage.

    So I downloaded ckeditor and installed it, and it works great, but the toolbar is far too advanced for the end user of this project, so I thought I'd take out some of the buttons.

    I've tried doing this in the config.js file, but nothing happens. By default the config file is like this:

    Code:
    /*
    Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
    For licensing, see LICENSE.html or http://ckeditor.com/license
    */
    
    CKEDITOR.editorConfig = function( config )
    {
      //Define changes to default configuration here. For example:
      //config.language = 'fr';
      //config.uiColor = '#AADC6E';
    };
    Cool, so I just deleted everything in between the curly-braces and added the line:
    Code:
    config.toolbar = 'Basic';
    Nothing. So I reverted to the default file and uncommented the language and uiColor settings, expecting a french instance of ckeditor to appear...

    Nothing. It's just the same. In fact whatever I do to the config.js file, the instance of ckeditor remains unaffected, silently mocking me with its smug-over-complicated toolbar.

    I'm at a total loss. I've tried adding the command in-page, nothing... I've tried describing the basic toolbar in an array like so:
    Code:
    config.toolbar = 'MyBasic';
    config.toolbar_MyBasic =
    [
        ['Maximize','-','PasteText','PasteFromWord','-','SpellChecker','Scayt','-','Styles'],
        '/',
        ['Bold','Italic','Underline','-','NumberedList','BulletedList','-','Link','Unlink','Anchor']
    ] ;
    And yup, you guessed it nothing, nada, zip, rien. The instance remains steadfast, refusing to bend to my will.

    config.js is located in the root of the ckeditor directory, which itself is in the root directory of my server.

    Has anyone else experienced this kind of behaviour, and if so did you manage to work out what was going on?

    Many thanks,
    Mike

  2. #2
    SitePoint Addict
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    382
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Well, I dunno what happened, but I looked at it today and it just worked straight away.

    *meh*

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,161
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    My guess is you needed to stop-start/restart for the changes to take.

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,702
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    And failing that, it could be that the machine is caching a previous version of the config files.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Addict
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    382
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yeah, one of the two (or both) I'm sure... Anyways its all good. My next mission is to try and turn of all the inline styles it keeps dropping in everywhere.

    Grr...

  6. #6
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is happening due to browser caching. It happened the same to be and while searching on ckeditor forums I've discovered that. Every time you change anything on .js you need to clear browser cache.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •