Project

General

Profile

1
/*
2
 #########################################################################################
3
 # Configure FCKEditor according your needs
4
 # ---------------------------------------------------------------------------------------
5
 #  Purpose of this file is to define all settings of FCKEditor without changing the FCK
6
 #  Javascript core file fckconfig.js. Doing so allows to upgrade to a newer version of
7
 #  FCKEditor while keeping all your customisations (styles, toolbars...)
8
 #  
9
 #  Author: Christian Sommer, (doc)
10
 #
11
 #  Follow this link for more information:
12
 #  http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Configurations_Settings
13
 #  
14
 #########################################################################################
15
*/
16

    
17
// required settings to make FCKEditor work with Website Baker (do not change them)
18
   FCKConfig.Plugins.Add( 'WBModules', 'en,nl,de' ) ;
19

    
20
// #########################################################################################
21
// # FCKEditor: General settings
22
// # ---------------------------------------------------------------------------------------
23
// #  Here you can modify all the options available in the /fckeditor/editor/fckconfig.js
24
// #  Settings defined here will overrule the ones defined in fckconfig.js without touching
25
// #  the Javascript core files of FCK.
26
// #
27
// #  If you are missing some options, have a look into fckconfig.js and copy the required
28
// #  code lines here
29
// #########################################################################################
30

    
31
// set doctype as used in your template to prevent code mix up (example XHTML 1.0 Transitional)
32
   FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ;
33

    
34
// define FCK default language
35
   FCKConfig.AutoDetectLanguage		= true ;	// could be turned off, if all users speek same language
36
   FCKConfig.DefaultLanguage		= 'en' ;	// could be switched to de for German
37
   FCKConfig.ContentLangDirection	= 'ltr' ;	// left to right
38

    
39
// specify HTML tag used for ENTER and SHIFT+ENTER key
40
   FCKConfig.EnterMode 			= 'p' ;		// allowed tags: p | div | br
41
   FCKConfig.ShiftEnterMode 		= 'br' ;	// allowed tags: p | div | br
42

    
43
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
44
// Note: If you miss some options, have a look into fckconfig.js and add the lines below
45
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
46

    
47

    
48
// #########################################################################################
49
// # FCKEditor: Customised FCKEditor tool bar
50
// # ---------------------------------------------------------------------------------------
51
// #  Here you can modify the FCKEditor tool bar to your needs.
52
// #  A collection of example layouts are provided below.
53
// #
54
// #  Note: Per default the tool bar named: "WBToolbar" will be used within FCKEditor.
55
// #########################################################################################
56

    
57
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
58
//  Default toolbar set used by Website Baker
59
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
60
   FCKConfig.ToolbarSets["WBToolbar"] = [
61
	['Source'],
62
	['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck'],
63
	['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
64
	['Smiley','SpecialChar'],
65
	['FitWindow','-','About'],
66
	'/',
67
	['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
68
	['OrderedList','UnorderedList','-','Outdent','Indent'],
69
	['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
70
	['WBModules','Link','Unlink','Anchor'],
71
	['Image','Flash','Table','Rule'],
72
	'/',
73
	['Style','FontFormat','FontName','FontSize'],
74
	['TextColor','BGColor']
75
] ;
76

    
77
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
78
//  original FCKEditor toolbar
79
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
80
   FCKConfig.ToolbarSets["Original"] = [
81
	['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
82
	['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
83
	['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
84
	['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
85
	'/',
86
	['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
87
	['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
88
	['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
89
	['Link','Unlink','Anchor'],
90
	['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
91
	'/',
92
	['Style','FontFormat','FontName','FontSize'],
93
	['TextColor','BGColor'],
94
	['FitWindow','ShowBlocks','-','About']		// No comma for the last row.
95
] ;
96

    
97

    
98
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
99
//  simple toolbar (only basic functions)
100
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
101
   FCKConfig.ToolbarSets["Simple"] = [
102
	['Preview',"Print"],
103
	['Cut','Copy','Paste','PasteText'],
104
	['Undo','Redo'],
105
	['Bold','Italic','Underline'],
106
	['OrderedList','UnorderedList','-','Table'],
107
	['WBModules','Link','Unlink','Anchor'],
108
	['RemoveFormat','Image','-','Source'],
109
	'/',
110
	['FontFormat','Style']
111
] ;
112

    
113

    
114
// #########################################################################################
115
// # FCKEditor: CSS / XML / TEMPLATES
116
// # ---------------------------------------------------------------------------------------
117
// #  Here you can tweak the layout of the FCKEditor according your needs.
118
// #  Specify HTML elements shown in the dropdown menu and the XML file which defines your
119
// #  CSS styles available in the FCKEditor style menu.
120
// #########################################################################################
121

    
122
// define HTML elements which appear in the FCK "Format" toolbar menu
123
   FCKConfig.FontFormats	= 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ;
124

    
125
// define font colors which can be set by the user (HEXADECIMAL)
126
   FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ;
127

    
128
// define fonts style and sizes which can be set by the user
129
   FCKConfig.FontNames	= 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
130
   FCKConfig.FontSizes	= 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ;
131

    
132
// make the offic2003 skin the default skin
133
   FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/office2003/'
134

    
135
// Do not add, rename or remove styles here. Only apply definition changes.
136
FCKConfig.CoreStyles = 
137
{
138
	// Basic Inline Styles.
139
	'Bold'			: { Element : 'strong', Overrides : 'b' },
140
	'Italic'		: { Element : 'em', Overrides : 'i' },
141
	'Underline'		: { Element : 'u' },
142
	'StrikeThrough'		: { Element : 'strike' },
143
	'Subscript'		: { Element : 'sub' },
144
	'Superscript'		: { Element : 'sup' },
145
	
146
	// Basic Block Styles (Font Format Combo).
147
	'p'			: { Element : 'p' },
148
	'div'			: { Element : 'div' },
149
	'pre'			: { Element : 'pre' },
150
	'address'		: { Element : 'address' },
151
	'h1'			: { Element : 'h1' },
152
	'h2'			: { Element : 'h2' },
153
	'h3'			: { Element : 'h3' },
154
	'h4'			: { Element : 'h4' },
155
	'h5'			: { Element : 'h5' },
156
	'h6'			: { Element : 'h6' },
157
	
158
	// Other formatting features.
159
	'FontFace' : 
160
	{ 
161
		Element		: 'span', 
162
		Styles		: { 'font-family' : '#("Font")' }, 
163
		Overrides	: [ { Element : 'font', Attributes : { 'face' : null } } ]
164
	},
165
	
166
	'Size' :
167
	{ 
168
		Element		: 'span', 
169
		Styles		: { 'font-size' : '#("Size","fontSize")' }, 
170
		Overrides	: [ { Element : 'font', Attributes : { 'size' : null } } ]
171
	},
172
	
173
	'Color' :
174
	{ 
175
		Element		: 'span', 
176
		Styles		: { 'color' : '#("Color","color")' }, 
177
		Overrides	: [ { Element : 'font', Attributes : { 'color' : null } } ]
178
	},
179
	
180
	'BackColor'		: { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } }
181
};
182

    
183

    
184

    
185
/*
186
   -----------------------------------------------------------------------------------------
187
   Note: GENERAL HINTS ON CSS FORMATS AND XML FILES
188
   -----------------------------------------------------------------------------------------
189
   Easiest way to display all CSS definitions used in your template is to make a copy of your
190
   CSS definition file and place it as "editor.css" in your template folder.
191
   All styles will automatically be updated and used with the FCK editor.
192

    
193
   If you don?t want to put custom "editor.css" files into your templates folder, you can
194
   try the other approach introduced below:
195
   
196
   copy all CSS definitions of your template into file: /my_config/my_fckeditorarea.css
197
    o Default HTML elements like (h1, p) will appear in the format you have specified via CSS.
198
    o additional HTML elements like (.title) will appear in the "Styles" toolbar menu of FCK
199
   
200
   Via file (/my_config/my_fckstyles.xml) you can define additional styles for default
201
   elements. Use this option, if you want to display conditional styles only if a special
202
   HTML element is selected (e.g. after selecting an <img> element, the style menu will
203
   provide additional elements like align=left, align=right, which don?t show up for other
204
   elements like <p>
205

    
206
   CSS definitions declared in the XML file are realised as INLINE styles. If you want avoid
207
   INLINE elements, but the CSS definitions into the /my_config_my_fckeditorarea.css and
208
   references only the class or ID in the XML file.
209

    
210
   Use /my_config/my_template.xls to define custom Editor templates (e.g. 2 or 3 column).
211
   This option is usefull if you have several side layouts (e.g. Level 1, Level 2...)
212
*/
213

    
214

    
215
// #########################################################################################
216
// # FCK Editor: PLUGINS (Link, Image, Flash)
217
// # ---------------------------------------------------------------------------------------
218
// #  Plugin Link:   create internal or external links and URL
219
// #  Plugin Image:  insert images to your WYSIWYG text area form the WB media directory
220
// #  Plugin Flash:  insert flash elements including upload Option
221
// #  
222
// #  Note: 
223
// #  You need to integrate the plugins into the menu bar so you can use them
224
// #    FCKConfig.ToolbarSets["MyToolbar"] = [
225
// #      ['Image',Link','Flash'], ...
226
// #    ];
227
// #########################################################################################
228

    
229
// configure the image plugin
230
   FCKConfig.ImageUpload = false ;		// display/hides image upload tab (allow/disable users to upload images from FCK)
231
   FCKConfig.ImageBrowser = true ;		// enables/disables the file browser to search for uploaded files in /media folder
232

    
233
// configure the link plugin
234
   FCKConfig.LinkUpload = false ;		// display/hides link upload tab (allow/disable users to upload files from FCK)
235
   FCKConfig.LinkBrowser = true ;		// enables/disables the file browser to search for uploaded files in /media folder
236

    
237
// configure the flash plugin
238
   FCKConfig.FlashUpload = false ;		// display/hides upload tab (allow/disable users to upload flash movies from FCK)
239
   FCKConfig.FlashBrowser = true;		// enables/disables the file browser to search for uploaded files in /media folder
(2-2/5)