GetSimple Support Forum
Customization of CKEditor - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Feature Requests (http://get-simple.info/forums/forumdisplay.php?fid=7)
+--- Thread: Customization of CKEditor (/showthread.php?tid=466)



Customization of CKEditor - yxcvbnm - 2010-03-04

In admin/edit.php, line 275-283, the settings for the admin CKeditor are set. i'd like to customize the editor settings, e.g. using Image, ...
Code:
if ($EDTOOL == 'advanced') {
    $toolbar = "
        ['Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList', 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock', 'Table', 'TextColor', 'BGColor', 'Link', 'Unlink', 'RemoveFormat', 'Source'],
        '/',
        ['Styles','Format','Font','FontSize']
    ";
} else {
    $toolbar = "['Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList', 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock', 'Link', 'Unlink', 'RemoveFormat', 'Source']";
}



Customization of CKEditor - yxcvbnm - 2010-04-24

1. is it possible to have an update safe and less 'complicated' solution for the customization of ckeditor?

2. if someone uses get simple in a subdirectory of root, ckeditor does not show the images. after editing of admin/template/js/ckeditor/config.js as follows, it worked. the solution is not update safe and complicated solution. in the settings, the website url is defined and that would be the baseHref, ckeditor needs.

Code:
CKEDITOR.editorConfig = function( config )
{
    // Define changes to default configuration here. For example:
    // config.language = 'fr';
    // config.uiColor = '#AADC6E';
    config.baseHref = 'http://www.example.com/path/to/getsimple/';
};



Customization of CKEditor - ccagle8 - 2010-04-24

r157 now allows you to define a custom configuration inside gsconfig.php. This will be part of the upcoming 2.02 release.

As for problem #2 - try reverting back to the original code in admin/template/js/ckeditor/config.js and in edit.php, add this middle line in between the two other lines shown:

Code:
height: '<?php echo $EDHEIGHT; ?>',
baseHref : '<?php echo GSROOTPATH; ?>',
toolbar :



Customization of CKEditor - yxcvbnm - 2010-04-25

sounds good, thanks chris

problem #2: there seems to be a problem cause ckeditor expects an url not a file path, i used $SITEURL... and that works Smile. i hope, this will be fixed in 2.02 ?
edit.php, line 293
Code:
baseHref : '<?php echo $SITEURL; ?>',



Customization of CKEditor - Zegnåt - 2010-04-25

yxcvbnm Wrote:I hope, this will be fixed in 2.02?
Yes it will, the development build (r158 that is) over at the SVN now contains a baseHref setting using $SITEURL as per your idea!


Customization of CKEditor - yxcvbnm - 2010-04-25

perfect... thanks Smile