glFusion Wiki

Site Tools


glfusion:editor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Previous revision
glfusion:editor [2010/02/17 22:31]
glfusion:editor [2016/07/27 16:24] (current)
LeeG [glFusion Advanced Editor]
Line 1: Line 1:
 +====== glFusion Advanced Editor ======
 +glFusion supports multiple WYIWYG advanced editors. ​ Out of the box, it comes with CKEditor.  ​
 +
 +CKEditor can be customized to meet your specific needs.
 +
 +If you prefer, there is a TinyMCE plugin available as well. 
 +
 +===== CKEditor Toolbars =====
 +
 +glFusion comes with 2 pre-configured toolbars for the advanced editor:
 +
 +{{:​glfusion:​editor:​toolbar-basic.png|}}
 +
 +Basic Toolbar - used for comment entry, contact users, and other simple editing tasks. ​
 +
 +----
 +{{:​glfusion:​editor:​toolbar-standard.png?​300|}}
 +
 +Standard Toolbar - used for story entry or static page edits. ​
 +
 +===== CKEditor Configuration =====
 +The main CKEditor configuration file is located in the public_html/​ckeditor/​ directory and is called config.js. ​ This is where the 2 default toolbars are defined.
 +
 +Each edit operation (i.e.; enter a story, enter a comment, etc.) has a template file (located in private/​plugins/​ckeditor/​templates) that controls the CKEditor functions for that operation.
 +
 +For example, when entering a story, the ckeditor_story.thtml template is used. In this template, is the configuration for the operation of entering a story. ​ In this example, the following line:
 +
 +                     ​toolbar:​ '​standard',​
 +                     
 +defines which tool bar to use for this operation.
 +
 +You can completely override the standard configuration and define a new tool bar.  Here is an example from the Forum plugin'​s CKEditor template:
 +
 +        function loadEditor(id) {
 +            var instance = CKEDITOR.replace( id, {
 +            toolbar: [
 +            { name: '​document',​ items: [ '​Source'​ ] },
 +            [ '​Cut',​ '​Copy',​ '​Paste',​ '​-',​ '​Undo',​ '​Redo'​ ],
 +            { name: '​basicstyles',​ items: [ '​Bold',​ '​Italic',​ '​Underline'​ ] },
 +            { name: '​forum',​ items : [ '​Smiley','​NumberedList',​ '​BulletedList',​ '​Image','​SpecialChar'​ ] },
 +            ],
 +                contentsCss:​ '​{site_url}/​css.php?​t={theme}',​
 +                bodyClass: '​forumpost',​
 +                removePlugins:​ '​elementspath',​
 +                resize_enabled:​ false,
 +             } );
 +             ​return instance;
 +        }
 +
 +In this example, we define a new toolbar, with the specific menu items we want for the Forum plugin.