glFusion Advanced Editor

glFusion utilizes the robust FCKeditor and can be easily customized to meet your specific needs.

Editor Menus

glFusion comes with 4 pre-configured menus for the advanced editor:

Basic Toolbar - used for comment entry.


User Toolbar - used for user submitted stories.


Advanced Toolbar - used for story / static page edits.


Full Featured Toolbar - not used by default, but available to site admins in the toolbar dropdown menu.

Configuring the Default Toolbar

The toolbars listed above have internal names that are used in the configuration files to control which one is used and how they look. They map out like this:

Common Name Configuration Name
Basic Toolbar editor-toolbar1
Common Toolbar editor-toolbar2
Advanced Toolbar editor-toolbar3
User Toolbar editor-toolbar4
Full Featured Toolbar Default
Forum Toolbar forum-toolbar

You can configure which toolbar is used for Story Edits (Admins), Story Edits (User), and Comments.

User Submitted Stories

To change the toolbar used for User Submitted Stories, you will need to edit the submitstory_fckeditor.js file located in the public_html/js/ directory. You will see the following line in the submitstory_fckeditor.js file:

oFCKeditor1.ToolbarSet = 'editor-toolbar4' ;

You can change editor-toolbar4 to one of the toolbars listed above. A little further down the submitstory_fckeditor.js file you will see another toolbar definition, this one is used for the body text entry. You should change it as well:

oFCKeditor2.ToolbarSet = 'editor-toolbar4' ;

Modifying the Editor Toolbar

The toolbars are defined in the public_html/fckeditor/myconfig.js file.

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','mediagallery','video','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
    '/',
    ['Style','FontFormat','FontName','FontSize'],
    ['TextColor','BGColor'],
    ['FitWindow','ShowBlocks','-','About']		// No comma for the last row.
] ;
Editor Property Button Description
Source View Page Source
DocProps View Document Properties
Save Save
NewPage New Page
Preview Preview
Templates Templates
Cut Cut highlighted text
Copy Copy highlighted text
Paste Paste from clipboard
PasteText Paste as plain text
PasteWord Paste from Word - Attempts to clean up some of the MS Word formatting
Print Print document
SpellCheck Spellcheck document
Undo Undo
Redo Undo the undo (or redo…)
Find Search within the editor
Replace Replace text
SelectAll Select All
RemoveFormat Remove all formatting
HTML Forms
Form Insert an HTML form
Checkbox Insert a checkbox
Radio Insert a radio button
TextField Insert a text field
Textarea Insert a textarea
Select Insert a drop down select box
Button Insert a button
ImageButton Upload or insert an image
HiddenField Insert a hidden input
Formatting Features
Bold Bold highlighted text
Italic Italicize highlighted text
Underline Underline highlighted text
StrikeThrough Strikethrough the highlighted text
Subscript Make text a sub script
Superscript Make text a super script
OrderedList Ordered list
UnorderedList Bullet List
Outdent Move text to the left
Indent Move text to the right
Blockquote Block quote
JustifyLeft Left justify text
JustifyCenter Center justify text
JustifyRight Right justify text
JustifyFull   Full justification of text
Link Insert a hyperlink
Unlink Remove link from highlighted text
Anchor Insert an HTML anchor
Image Insert or upload an image
MediaGallery Insert a Media Gallery auto tag
Video Insert an embedded video (from YouTube or other video hosting sites)
Flash Insert a Flash video
Table Insert a table
Rule Insert a horizontal rule
Smiley Insert a smiley face icon
SpecialChar Insert a special character
PageBreak Insert a page break
Style Select from a set of pre-configured styles (from theme stylesheet)
FontFormat Select the font attribute
FontName Select font family
FontSize Select font size
TextColor Select the text color
BGColor Select the background color
FitWindow Expand editor window to full screen
ShowBlocks Mark the blocks in the document (shows content divs - not related to the glFusion block system
About About FCKeditor

Toolbar Bands

Every ToolBarSet is composed of a series of “toolbar bands” that are grouped in the final toolbar layout. The bands items move together on new rows when resizing the editor.

As you can see in the above toolbarsets definitions, every toolbar band is defined as a separated JavaScript array of strings. Every string corresponds to an available toolbar item defined in the editor code or in a plugin. If the toolbar item doesn't exist, a message is displayed when loading the editor.

You can also include a separator in the toolbar band by including the ”-” string on it.

Forcing Row Break

Looking at the “Default” ToolBarSet you will note that in one of the rows you have a ”/” string instead of an array. This slash can be used to tell the editor that you want to force the next bands to be rendered in a new row and not following the previous one.

glfusion/editor.txt · Last modified: 2010/02/18 04:31 by Mark
 
Except where otherwise noted, content on this wiki is licensed under the following license: GNU Free Documentation License 1.3