Search code examples
phpfckeditor

FCKEditor toolbar configuration in PHP


I am working on an application where I'm using FCKEditor but I need to modify the toolbar options. I searched for this and got the answer that I need to change the array defined in toolbar JS file. But I didn't find that toolbar plugin in my plugins directory.


Solution

  • It has nothing to do with PHP
    Take a look at the fckconfig.js file to see these two sample toolbarsets definitions:

    FCKConfig.ToolbarSets["Default"] = [
    ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
    ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
    ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
    ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
    '/',
    ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
    ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
    ['Link','Unlink','Anchor'],
    ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
    '/',
    ['Style','FontFormat','FontName','FontSize'],
    ['TextColor','BGColor'],
    ['FitWindow','ShowBlocks','-','About'] // No comma for the last row.
    ] ;
    
    FCKConfig.ToolbarSets["Basic"] = [
    ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
    ] ;
    

    Edit
    read this: http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Toolbar