newhck / php-form-builder-class

Automatically exported from code.google.com/p/php-form-builder-class
GNU General Public License v3.0
0 stars 0 forks source link

ckeditor - edit toolbar #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I want to load a custom toolbar for the CKeditor. 

So I created a custom config for the CKeditor in the Config.js file from 
CKeditor. But I'm not able to get it loaded.

Original issue reported on code.google.com by sven.lar...@gmail.com on 23 Jun 2010 at 2:01

GoogleCodeExporter commented 8 years ago
Hi, sven,

I'm having no trouble using a custom config with the latest version of 
php-form-builder-class

Here is an example of how to use it...

Set the custom config file in the attributes setAttributes array:

$form->setAttributes(array(
"ckeditorCustomConfig" => "/js/small_config.js"
));

In my small_config.js I have:

CKEDITOR.editorConfig = function( config )
{

    CKEDITOR.config.resize_minWidth = 500;
    CKEDITOR.config.resize_maxWidth = 690;
    CKEDITOR.config.height = 200;

    // Define changes to default configuration here. For example:
    CKEDITOR.config.toolbar = [
        ['Source','-','Templates'], ['Paste','PasteText','PasteFromWord'],['Bold','Italic','Underline'],['Link','Unlink','Anchor'],['NumberedList','BulletedList'],['Format','FontSize'], ['RemoveFormat'],
    ];

};

Hopefully thats enough to get you going, unless there is actually a 
bug/problem, im marking this closed.

Original comment by moncojhr@gmail.com on 24 Jun 2010 at 3:21