Revision 815
Added by doc almost 17 years ago
trunk/CHANGELOG | ||
---|---|---|
14 | 14 |
07-Apr-2008 Matthias Gallas |
15 | 15 |
# fixed error in german laguage file |
16 | 16 |
07-Apr-2008 Christian Sommer |
17 |
- removed the outdated FCKEditor v2.51 |
|
17 | 18 |
! set version from 2.7 (RC3) to 2.7 (RC3a) |
18 | 19 |
07-Apr-2008 Thomas Hornik |
19 | 20 |
! added missing group_id in INSERT-query |
trunk/wb/modules/fckeditor/uninstall.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2008, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
// Must include code to stop this file being access directly |
|
27 |
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); } |
|
28 |
|
|
29 |
// Delete the editor directory |
|
30 |
rm_full_dir(WB_PATH.'/modules/fckeditor/fckeditor'); |
|
31 |
|
|
32 |
?> |
|
33 | 0 |
trunk/wb/modules/fckeditor/include.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2008, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
function reverse_htmlentities($mixed) { |
|
27 |
$mixed = str_replace(array('>','<','"','&'), array('>','<','"','&'), $mixed); |
|
28 |
return $mixed; |
|
29 |
} |
|
30 |
|
|
31 |
function get_template_name() { |
|
32 |
// returns the template name of the current displayed page |
|
33 |
require_once('../../config.php'); |
|
34 |
require_once(WB_PATH. '/framework/class.database.php'); |
|
35 |
|
|
36 |
// work out default editor.css file for FCKEditor |
|
37 |
if(file_exists(WB_PATH .'/templates/' .DEFAULT_TEMPLATE .'/editor.css')) { |
|
38 |
$fck_template_dir = DEFAULT_TEMPLATE; |
|
39 |
} else { |
|
40 |
$fck_template_dir = "none"; |
|
41 |
} |
|
42 |
|
|
43 |
// check if a editor.css file exists in the specified template directory of current page |
|
44 |
if (isset($_GET["page_id"]) && (int) $_GET["page_id"] > 0) { |
|
45 |
$pageid = (int) $_GET["page_id"]; |
|
46 |
|
|
47 |
// obtain template folder of current page from the database |
|
48 |
if(!isset($admin)) { |
|
49 |
$database = new database(); |
|
50 |
} |
|
51 |
$query_page = "SELECT template FROM " .TABLE_PREFIX ."pages WHERE page_id =$pageid"; |
|
52 |
$pagetpl = $database->get_one($query_page); // if empty, default template is used |
|
53 |
|
|
54 |
// check if a specific template is defined for current page |
|
55 |
if(isset($pagetpl) && $pagetpl != '') { |
|
56 |
// check if a specify editor.css file is contained in that folder |
|
57 |
if(file_exists(WB_PATH.'/templates/'.$pagetpl.'/editor.css')) { |
|
58 |
$fck_template_dir = $pagetpl; |
|
59 |
} |
|
60 |
} |
|
61 |
} |
|
62 |
return $fck_template_dir; |
|
63 |
} |
|
64 |
|
|
65 |
function show_wysiwyg_editor($name, $id, $content, $width, $height) { |
|
66 |
// create new FCKEditor instance |
|
67 |
require_once(WB_PATH.'/modules/fckeditor/fckeditor/fckeditor.php'); |
|
68 |
$oFCKeditor = new FCKeditor($name); |
|
69 |
|
|
70 |
// set defaults (Note: custom settings defined in: "/my_config/my_fckconfig.js" instead of "/editor/fckconfig.js") |
|
71 |
$oFCKeditor->BasePath = WB_URL.'/modules/fckeditor/fckeditor/'; |
|
72 |
$oFCKeditor->Config['CustomConfigurationsPath'] = WB_URL .'/modules/fckeditor/wb_config/wb_fckconfig.js'; |
|
73 |
$oFCKeditor->ToolbarSet = 'WBToolbar'; // toolbar defined in my_fckconfig.js |
|
74 |
|
|
75 |
// obtain template name of current page (if empty, no editor.css files exists) |
|
76 |
$template_name = get_template_name(); |
|
77 |
|
|
78 |
// work out default CSS file to be used for FCK textarea |
|
79 |
if($template_name == "none") { |
|
80 |
// no editor.css file exists in default template folder, or template folder of current page |
|
81 |
$css_file = WB_URL .'/modules/fckeditor/wb_config/wb_fckeditorarea.css'; |
|
82 |
} else { |
|
83 |
// editor.css file exists in default template folder or template folder of current page |
|
84 |
$css_file = WB_URL .'/templates/' .$template_name .'/editor.css'; |
|
85 |
} |
|
86 |
// set CSS file depending on $css_file |
|
87 |
$oFCKeditor->Config['EditorAreaCSS'] = $css_file; |
|
88 |
|
|
89 |
// work out settings for the FCK "Style" toolbar |
|
90 |
if ($template_name == "none") { |
|
91 |
// no custom editor.css exists, use default XML definitions |
|
92 |
$oFCKeditor->Config['StylesXmlPath'] = WB_URL.'/modules/fckeditor/wb_config/wb_fckstyles.xml'; |
|
93 |
} else { |
|
94 |
// file editor.css exists in template folder, parse it and create XML definitions |
|
95 |
$oFCKeditor->Config['StylesXmlPath'] = WB_URL.'/modules/fckeditor/css_to_xml.php?template_name=' .$template_name; |
|
96 |
} |
|
97 |
|
|
98 |
// custom templates can be defined via /wb_config/wb_fcktemplates.xml |
|
99 |
if(file_exists(WB_PATH .'/modules/fckeditor/wb_config/wb_fcktemplates.xml')) { |
|
100 |
$oFCKeditor->Config['TemplatesXmlPath'] = WB_URL.'/modules/fckeditor/wb_config/wb_fcktemplates.xml'; |
|
101 |
} |
|
102 |
|
|
103 |
// set required file connectors (overwrite settings which may be made in fckconfig.js or my_fckconfig.js) |
|
104 |
$connectorPath = $oFCKeditor->BasePath.'editor/filemanager/connectors/php/connector.php'; |
|
105 |
$oFCKeditor->Config['LinkBrowserURL'] = $oFCKeditor->BasePath.'editor/filemanager/browser/default/browser.html?Connector=' |
|
106 |
.$connectorPath; |
|
107 |
$oFCKeditor->Config['ImageBrowserURL'] = $oFCKeditor->BasePath.'editor/filemanager/browser/default/browser.html?Connector=' |
|
108 |
.$connectorPath; |
|
109 |
$oFCKeditor->Config['FlashBrowserURL'] = $oFCKeditor->BasePath.'editor/filemanager/browser/default/browser.html?Connector=' |
|
110 |
.$connectorPath; |
|
111 |
|
|
112 |
$oFCKeditor->Value = reverse_htmlentities($content); |
|
113 |
$oFCKeditor->Height = $height; |
|
114 |
$oFCKeditor->Create(); |
|
115 |
} |
|
116 |
|
|
117 |
?> |
|
118 | 0 |
trunk/wb/modules/fckeditor/css_to_xml.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2008, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
*/ |
|
25 |
|
|
26 |
require_once('../../config.php'); |
|
27 |
|
|
28 |
if(isset($_GET['template_name'])) { |
|
29 |
$temp_name = $_GET['template_name']; |
|
30 |
// check if specified template exists |
|
31 |
if(file_exists(WB_PATH .'/templates/' .$temp_name)) { |
|
32 |
// parse the editor.css and write XML output |
|
33 |
require_once(WB_PATH .'/modules/fckeditor/class.cssparser.php'); |
|
34 |
$cssparser = new cssparser(); |
|
35 |
$cssparser->Parse(WB_PATH .'/templates/' .$temp_name .'/editor.css'); |
|
36 |
header('Content-type: text/xml'); |
|
37 |
echo $cssparser->GetXML(); |
|
38 |
} |
|
39 |
} |
|
40 |
?> |
|
41 | 0 |
trunk/wb/modules/fckeditor/fckeditor/fckeditor.js | ||
---|---|---|
1 |
/* |
|
2 |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
|
3 |
* Copyright (C) 2003-2007 Frederico Caldeira Knabben |
|
4 |
* |
|
5 |
* == BEGIN LICENSE == |
|
6 |
* |
|
7 |
* Licensed under the terms of any of the following licenses at your |
|
8 |
* choice: |
|
9 |
* |
|
10 |
* - GNU General Public License Version 2 or later (the "GPL") |
|
11 |
* http://www.gnu.org/licenses/gpl.html |
|
12 |
* |
|
13 |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
|
14 |
* http://www.gnu.org/licenses/lgpl.html |
|
15 |
* |
|
16 |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
|
17 |
* http://www.mozilla.org/MPL/MPL-1.1.html |
|
18 |
* |
|
19 |
* == END LICENSE == |
|
20 |
* |
|
21 |
* This is the integration file for JavaScript. |
|
22 |
* |
|
23 |
* It defines the FCKeditor class that can be used to create editor |
|
24 |
* instances in a HTML page in the client side. For server side |
|
25 |
* operations, use the specific integration system. |
|
26 |
*/ |
|
27 |
|
|
28 |
// FCKeditor Class |
|
29 |
var FCKeditor = function( instanceName, width, height, toolbarSet, value ) |
|
30 |
{ |
|
31 |
// Properties |
|
32 |
this.InstanceName = instanceName ; |
|
33 |
this.Width = width || '100%' ; |
|
34 |
this.Height = height || '200' ; |
|
35 |
this.ToolbarSet = toolbarSet || 'Default' ; |
|
36 |
this.Value = value || '' ; |
|
37 |
this.BasePath = FCKeditor.BasePath ; |
|
38 |
this.CheckBrowser = true ; |
|
39 |
this.DisplayErrors = true ; |
|
40 |
|
|
41 |
this.Config = new Object() ; |
|
42 |
|
|
43 |
// Events |
|
44 |
this.OnError = null ; // function( source, errorNumber, errorDescription ) |
|
45 |
} |
|
46 |
|
|
47 |
/** |
|
48 |
* This is the default BasePath used by all editor instances. |
|
49 |
*/ |
|
50 |
FCKeditor.BasePath = '/fckeditor/' ; |
|
51 |
|
|
52 |
/** |
|
53 |
* The minimum height used when replacing textareas. |
|
54 |
*/ |
|
55 |
FCKeditor.MinHeight = 200 ; |
|
56 |
|
|
57 |
/** |
|
58 |
* The minimum width used when replacing textareas. |
|
59 |
*/ |
|
60 |
FCKeditor.MinWidth = 750 ; |
|
61 |
|
|
62 |
FCKeditor.prototype.Version = '2.5.1' ; |
|
63 |
FCKeditor.prototype.VersionBuild = '17566' ; |
|
64 |
|
|
65 |
FCKeditor.prototype.Create = function() |
|
66 |
{ |
|
67 |
document.write( this.CreateHtml() ) ; |
|
68 |
} |
|
69 |
|
|
70 |
FCKeditor.prototype.CreateHtml = function() |
|
71 |
{ |
|
72 |
// Check for errors |
|
73 |
if ( !this.InstanceName || this.InstanceName.length == 0 ) |
|
74 |
{ |
|
75 |
this._ThrowError( 701, 'You must specify an instance name.' ) ; |
|
76 |
return '' ; |
|
77 |
} |
|
78 |
|
|
79 |
var sHtml = '<div>' ; |
|
80 |
|
|
81 |
if ( !this.CheckBrowser || this._IsCompatibleBrowser() ) |
|
82 |
{ |
|
83 |
sHtml += '<input type="hidden" id="' + this.InstanceName + '" name="' + this.InstanceName + '" value="' + this._HTMLEncode( this.Value ) + '" style="display:none" />' ; |
|
84 |
sHtml += this._GetConfigHtml() ; |
|
85 |
sHtml += this._GetIFrameHtml() ; |
|
86 |
} |
|
87 |
else |
|
88 |
{ |
|
89 |
var sWidth = this.Width.toString().indexOf('%') > 0 ? this.Width : this.Width + 'px' ; |
|
90 |
var sHeight = this.Height.toString().indexOf('%') > 0 ? this.Height : this.Height + 'px' ; |
|
91 |
sHtml += '<textarea name="' + this.InstanceName + '" rows="4" cols="40" style="width:' + sWidth + ';height:' + sHeight + '">' + this._HTMLEncode( this.Value ) + '<\/textarea>' ; |
|
92 |
} |
|
93 |
|
|
94 |
sHtml += '</div>' ; |
|
95 |
|
|
96 |
return sHtml ; |
|
97 |
} |
|
98 |
|
|
99 |
FCKeditor.prototype.ReplaceTextarea = function() |
|
100 |
{ |
|
101 |
if ( !this.CheckBrowser || this._IsCompatibleBrowser() ) |
|
102 |
{ |
|
103 |
// We must check the elements firstly using the Id and then the name. |
|
104 |
var oTextarea = document.getElementById( this.InstanceName ) ; |
|
105 |
var colElementsByName = document.getElementsByName( this.InstanceName ) ; |
|
106 |
var i = 0; |
|
107 |
while ( oTextarea || i == 0 ) |
|
108 |
{ |
|
109 |
if ( oTextarea && oTextarea.tagName.toLowerCase() == 'textarea' ) |
|
110 |
break ; |
|
111 |
oTextarea = colElementsByName[i++] ; |
|
112 |
} |
|
113 |
|
|
114 |
if ( !oTextarea ) |
|
115 |
{ |
|
116 |
alert( 'Error: The TEXTAREA with id or name set to "' + this.InstanceName + '" was not found' ) ; |
|
117 |
return ; |
|
118 |
} |
|
119 |
|
|
120 |
oTextarea.style.display = 'none' ; |
|
121 |
this._InsertHtmlBefore( this._GetConfigHtml(), oTextarea ) ; |
|
122 |
this._InsertHtmlBefore( this._GetIFrameHtml(), oTextarea ) ; |
|
123 |
} |
|
124 |
} |
|
125 |
|
|
126 |
FCKeditor.prototype._InsertHtmlBefore = function( html, element ) |
|
127 |
{ |
|
128 |
if ( element.insertAdjacentHTML ) // IE |
|
129 |
element.insertAdjacentHTML( 'beforeBegin', html ) ; |
|
130 |
else // Gecko |
|
131 |
{ |
|
132 |
var oRange = document.createRange() ; |
|
133 |
oRange.setStartBefore( element ) ; |
|
134 |
var oFragment = oRange.createContextualFragment( html ); |
|
135 |
element.parentNode.insertBefore( oFragment, element ) ; |
|
136 |
} |
|
137 |
} |
|
138 |
|
|
139 |
FCKeditor.prototype._GetConfigHtml = function() |
|
140 |
{ |
|
141 |
var sConfig = '' ; |
|
142 |
for ( var o in this.Config ) |
|
143 |
{ |
|
144 |
if ( sConfig.length > 0 ) sConfig += '&' ; |
|
145 |
sConfig += encodeURIComponent( o ) + '=' + encodeURIComponent( this.Config[o] ) ; |
|
146 |
} |
|
147 |
|
|
148 |
return '<input type="hidden" id="' + this.InstanceName + '___Config" value="' + sConfig + '" style="display:none" />' ; |
|
149 |
} |
|
150 |
|
|
151 |
FCKeditor.prototype._GetIFrameHtml = function() |
|
152 |
{ |
|
153 |
var sFile = 'fckeditor.html' ; |
|
154 |
|
|
155 |
try |
|
156 |
{ |
|
157 |
if ( (/fcksource=true/i).test( window.top.location.search ) ) |
|
158 |
sFile = 'fckeditor.original.html' ; |
|
159 |
} |
|
160 |
catch (e) { /* Ignore it. Much probably we are inside a FRAME where the "top" is in another domain (security error). */ } |
|
161 |
|
|
162 |
var sLink = this.BasePath + 'editor/' + sFile + '?InstanceName=' + encodeURIComponent( this.InstanceName ) ; |
|
163 |
if (this.ToolbarSet) sLink += '&Toolbar=' + this.ToolbarSet ; |
|
164 |
|
|
165 |
return '<iframe id="' + this.InstanceName + '___Frame" src="' + sLink + '" width="' + this.Width + '" height="' + this.Height + '" frameborder="0" scrolling="no"></iframe>' ; |
|
166 |
} |
|
167 |
|
|
168 |
FCKeditor.prototype._IsCompatibleBrowser = function() |
|
169 |
{ |
|
170 |
return FCKeditor_IsCompatibleBrowser() ; |
|
171 |
} |
|
172 |
|
|
173 |
FCKeditor.prototype._ThrowError = function( errorNumber, errorDescription ) |
|
174 |
{ |
|
175 |
this.ErrorNumber = errorNumber ; |
|
176 |
this.ErrorDescription = errorDescription ; |
|
177 |
|
|
178 |
if ( this.DisplayErrors ) |
|
179 |
{ |
|
180 |
document.write( '<div style="COLOR: #ff0000">' ) ; |
|
181 |
document.write( '[ FCKeditor Error ' + this.ErrorNumber + ': ' + this.ErrorDescription + ' ]' ) ; |
|
182 |
document.write( '</div>' ) ; |
|
183 |
} |
|
184 |
|
|
185 |
if ( typeof( this.OnError ) == 'function' ) |
|
186 |
this.OnError( this, errorNumber, errorDescription ) ; |
|
187 |
} |
|
188 |
|
|
189 |
FCKeditor.prototype._HTMLEncode = function( text ) |
|
190 |
{ |
|
191 |
if ( typeof( text ) != "string" ) |
|
192 |
text = text.toString() ; |
|
193 |
|
|
194 |
text = text.replace( |
|
195 |
/&/g, "&").replace( |
|
196 |
/"/g, """).replace( |
|
197 |
/</g, "<").replace( |
|
198 |
/>/g, ">") ; |
|
199 |
|
|
200 |
return text ; |
|
201 |
} |
|
202 |
|
|
203 |
;(function() |
|
204 |
{ |
|
205 |
var textareaToEditor = function( textarea ) |
|
206 |
{ |
|
207 |
var editor = new FCKeditor( textarea.name ) ; |
|
208 |
|
|
209 |
editor.Width = Math.max( textarea.offsetWidth, FCKeditor.MinWidth ) ; |
|
210 |
editor.Height = Math.max( textarea.offsetHeight, FCKeditor.MinHeight ) ; |
|
211 |
|
|
212 |
return editor ; |
|
213 |
} |
|
214 |
|
|
215 |
/** |
|
216 |
* Replace all <textarea> elements available in the document with FCKeditor |
|
217 |
* instances. |
|
218 |
* |
|
219 |
* // Replace all <textarea> elements in the page. |
|
220 |
* FCKeditor.ReplaceAllTextareas() ; |
|
221 |
* |
|
222 |
* // Replace all <textarea class="myClassName"> elements in the page. |
|
223 |
* FCKeditor.ReplaceAllTextareas( 'myClassName' ) ; |
|
224 |
* |
|
225 |
* // Selectively replace <textarea> elements, based on custom assertions. |
|
226 |
* FCKeditor.ReplaceAllTextareas( function( textarea, editor ) |
|
227 |
* { |
|
228 |
* // Custom code to evaluate the replace, returning false if it |
|
229 |
* // must not be done. |
|
230 |
* // It also passes the "editor" parameter, so the developer can |
|
231 |
* // customize the instance. |
|
232 |
* } ) ; |
|
233 |
*/ |
|
234 |
FCKeditor.ReplaceAllTextareas = function() |
|
235 |
{ |
|
236 |
var textareas = document.getElementsByTagName( 'textarea' ) ; |
|
237 |
|
|
238 |
for ( var i = 0 ; i < textareas.length ; i++ ) |
|
239 |
{ |
|
240 |
var editor = null ; |
|
241 |
var textarea = textareas[i] ; |
|
242 |
var name = textarea.name ; |
|
243 |
|
|
244 |
// The "name" attribute must exist. |
|
245 |
if ( !name || name.length == 0 ) |
|
246 |
continue ; |
|
247 |
|
|
248 |
if ( typeof arguments[0] == 'string' ) |
|
249 |
{ |
|
250 |
// The textarea class name could be passed as the function |
|
251 |
// parameter. |
|
252 |
|
|
253 |
var classRegex = new RegExp( '(?:^| )' + arguments[0] + '(?:$| )' ) ; |
|
254 |
|
|
255 |
if ( !classRegex.test( textarea.className ) ) |
|
256 |
continue ; |
|
257 |
} |
|
258 |
else if ( typeof arguments[0] == 'function' ) |
|
259 |
{ |
|
260 |
// An assertion function could be passed as the function parameter. |
|
261 |
// It must explicitly return "false" to ignore a specific <textarea>. |
|
262 |
editor = textareaToEditor( textarea ) ; |
|
263 |
if ( arguments[0]( textarea, editor ) === false ) |
|
264 |
continue ; |
|
265 |
} |
|
266 |
|
|
267 |
if ( !editor ) |
|
268 |
editor = textareaToEditor( textarea ) ; |
|
269 |
|
|
270 |
editor.ReplaceTextarea() ; |
|
271 |
} |
|
272 |
} |
|
273 |
})() ; |
|
274 |
|
|
275 |
function FCKeditor_IsCompatibleBrowser() |
|
276 |
{ |
|
277 |
var sAgent = navigator.userAgent.toLowerCase() ; |
|
278 |
|
|
279 |
// Internet Explorer 5.5+ |
|
280 |
if ( /*@cc_on!@*/false && sAgent.indexOf("mac") == -1 ) |
|
281 |
{ |
|
282 |
var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ; |
|
283 |
return ( sBrowserVersion >= 5.5 ) ; |
|
284 |
} |
|
285 |
|
|
286 |
// Gecko (Opera 9 tries to behave like Gecko at this point). |
|
287 |
if ( navigator.product == "Gecko" && navigator.productSub >= 20030210 && !( typeof(opera) == 'object' && opera.postError ) ) |
|
288 |
return true ; |
|
289 |
|
|
290 |
// Opera 9.50+ |
|
291 |
if ( window.opera && window.opera.version && parseFloat( window.opera.version() ) >= 9.5 ) |
|
292 |
return true ; |
|
293 |
|
|
294 |
// Safari 3+ |
|
295 |
if ( sAgent.indexOf( ' applewebkit/' ) != -1 ) |
|
296 |
return ( sAgent.match( / applewebkit\/(\d+)/ )[1] >= 522 ) ; // Build must be at least 522 (v3) |
|
297 |
|
|
298 |
return false ; |
|
299 |
} |
trunk/wb/modules/fckeditor/fckeditor/fckstyles.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8" ?> |
|
2 |
<!-- |
|
3 |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
|
4 |
* Copyright (C) 2003-2007 Frederico Caldeira Knabben |
|
5 |
* |
|
6 |
* == BEGIN LICENSE == |
|
7 |
* |
|
8 |
* Licensed under the terms of any of the following licenses at your |
|
9 |
* choice: |
|
10 |
* |
|
11 |
* - GNU General Public License Version 2 or later (the "GPL") |
|
12 |
* http://www.gnu.org/licenses/gpl.html |
|
13 |
* |
|
14 |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
|
15 |
* http://www.gnu.org/licenses/lgpl.html |
|
16 |
* |
|
17 |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
|
18 |
* http://www.mozilla.org/MPL/MPL-1.1.html |
|
19 |
* |
|
20 |
* == END LICENSE == |
|
21 |
* |
|
22 |
* This is the sample style definitions file. It makes the styles combo |
|
23 |
* completely customizable. |
|
24 |
* |
|
25 |
* See FCKConfig.StylesXmlPath in the configuration file. |
|
26 |
--> |
|
27 |
<Styles> |
|
28 |
|
|
29 |
<!-- Block Styles --> |
|
30 |
|
|
31 |
<!-- |
|
32 |
# These styles are already available in the "Format" combo, so they are not |
|
33 |
# needed here by default. |
|
34 |
|
|
35 |
<Style name="Heading 1" element="h1" /> |
|
36 |
<Style name="Heading 2" element="h2" /> |
|
37 |
<Style name="Heading 3" element="h3" /> |
|
38 |
<Style name="Heading 4" element="h4" /> |
|
39 |
<Style name="Heading 5" element="h5" /> |
|
40 |
<Style name="Heading 6" element="h6" /> |
|
41 |
<Style name="Paragraph" element="p" /> |
|
42 |
<Style name="Document Block" element="div" /> |
|
43 |
<Style name="Preformatted Text" element="pre" /> |
|
44 |
<Style name="Address" element="address" /> |
|
45 |
--> |
|
46 |
|
|
47 |
<!-- Inline Styles --> |
|
48 |
|
|
49 |
<!-- |
|
50 |
# These are core styles available as toolbar buttons. |
|
51 |
|
|
52 |
<Style name="Bold" element="b"> |
|
53 |
<Override element="strong" /> |
|
54 |
</Style> |
|
55 |
<Style name="Italic" element="i"> |
|
56 |
<Override element="em" /> |
|
57 |
</Style> |
|
58 |
<Style name="Underline" element="u" /> |
|
59 |
<Style name="Strikethrough" element="strike" /> |
|
60 |
<Style name="Subscript" element="sub" /> |
|
61 |
<Style name="Superscript" element="sup" /> |
|
62 |
--> |
|
63 |
|
|
64 |
<Style name="Marker: Yellow" element="span"> |
|
65 |
<Style name="background-color" value="Yellow" /> |
|
66 |
</Style> |
|
67 |
<Style name="Marker: Green" element="span"> |
|
68 |
<Style name="background-color" value="Lime" /> |
|
69 |
</Style> |
|
70 |
|
|
71 |
<Style name="Strong Emphasis" element="strong" /> |
|
72 |
<Style name="Emphasis" element="em" /> |
|
73 |
|
|
74 |
<Style name="Big" element="big" /> |
|
75 |
<Style name="Small" element="small" /> |
|
76 |
<Style name="Typewriter" element="tt" /> |
|
77 |
|
|
78 |
<Style name="Computer Code" element="code" /> |
|
79 |
<Style name="Keyboard Phrase" element="kbd" /> |
|
80 |
<Style name="Sample Text" element="samp" /> |
|
81 |
<Style name="Variable" element="var" /> |
|
82 |
|
|
83 |
<Style name="Deleted Text" element="del" /> |
|
84 |
<Style name="Inserted Text" element="ins" /> |
|
85 |
|
|
86 |
<Style name="Cited Work" element="cite" /> |
|
87 |
<Style name="Inline Quotation" element="q" /> |
|
88 |
|
|
89 |
<Style name="Language: RTL" element="span"> |
|
90 |
<Attribute name="dir" value="rtl" /> |
|
91 |
</Style> |
|
92 |
<Style name="Language: LTR" element="span"> |
|
93 |
<Attribute name="dir" value="ltr" /> |
|
94 |
</Style> |
|
95 |
<Style name="Language: RTL Strong" element="bdo"> |
|
96 |
<Attribute name="dir" value="rtl" /> |
|
97 |
</Style> |
|
98 |
<Style name="Language: LTR Strong" element="bdo"> |
|
99 |
<Attribute name="dir" value="ltr" /> |
|
100 |
</Style> |
|
101 |
|
|
102 |
<!-- Object Styles --> |
|
103 |
|
|
104 |
<Style name="Image on Left" element="img"> |
|
105 |
<Attribute name="style" value="padding: 5px; margin-right: 5px" /> |
|
106 |
<Attribute name="border" value="2" /> |
|
107 |
<Attribute name="align" value="left" /> |
|
108 |
</Style> |
|
109 |
<Style name="Image on Right" element="img"> |
|
110 |
<Attribute name="style" value="padding: 5px; margin-left: 5px" /> |
|
111 |
<Attribute name="border" value="2" /> |
|
112 |
<Attribute name="align" value="right" /> |
|
113 |
</Style> |
|
114 |
</Styles> |
trunk/wb/modules/fckeditor/fckeditor/fckeditor_php4.php | ||
---|---|---|
1 |
<?php |
|
2 |
/* |
|
3 |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
|
4 |
* Copyright (C) 2003-2007 Frederico Caldeira Knabben |
|
5 |
* |
|
6 |
* == BEGIN LICENSE == |
|
7 |
* |
|
8 |
* Licensed under the terms of any of the following licenses at your |
|
9 |
* choice: |
|
10 |
* |
|
11 |
* - GNU General Public License Version 2 or later (the "GPL") |
|
12 |
* http://www.gnu.org/licenses/gpl.html |
|
13 |
* |
|
14 |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
|
15 |
* http://www.gnu.org/licenses/lgpl.html |
|
16 |
* |
|
17 |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
|
18 |
* http://www.mozilla.org/MPL/MPL-1.1.html |
|
19 |
* |
|
20 |
* == END LICENSE == |
|
21 |
* |
|
22 |
* This is the integration file for PHP 4. |
|
23 |
* |
|
24 |
* It defines the FCKeditor class that can be used to create editor |
|
25 |
* instances in PHP pages on server side. |
|
26 |
*/ |
|
27 |
|
|
28 |
class FCKeditor |
|
29 |
{ |
|
30 |
var $InstanceName ; |
|
31 |
var $BasePath ; |
|
32 |
var $Width ; |
|
33 |
var $Height ; |
|
34 |
var $ToolbarSet ; |
|
35 |
var $Value ; |
|
36 |
var $Config ; |
|
37 |
|
|
38 |
// PHP 4 Constructor |
|
39 |
function FCKeditor( $instanceName ) |
|
40 |
{ |
|
41 |
$this->InstanceName = $instanceName ; |
|
42 |
$this->BasePath = '/fckeditor/' ; |
|
43 |
$this->Width = '100%' ; |
|
44 |
$this->Height = '200' ; |
|
45 |
$this->ToolbarSet = 'Default' ; |
|
46 |
$this->Value = '' ; |
|
47 |
|
|
48 |
$this->Config = array() ; |
|
49 |
} |
|
50 |
|
|
51 |
function Create() |
|
52 |
{ |
|
53 |
echo $this->CreateHtml() ; |
|
54 |
} |
|
55 |
|
|
56 |
function CreateHtml() |
|
57 |
{ |
|
58 |
$HtmlValue = htmlspecialchars( $this->Value ) ; |
|
59 |
|
|
60 |
$Html = '<div>' ; |
|
61 |
|
|
62 |
if ( !isset( $_GET ) ) { |
|
63 |
global $HTTP_GET_VARS ; |
|
64 |
$_GET = $HTTP_GET_VARS ; |
|
65 |
} |
|
66 |
|
|
67 |
if ( $this->IsCompatible() ) |
|
68 |
{ |
|
69 |
if ( isset( $_GET['fcksource'] ) && $_GET['fcksource'] == "true" ) |
|
70 |
$File = 'fckeditor.original.html' ; |
|
71 |
else |
|
72 |
$File = 'fckeditor.html' ; |
|
73 |
|
|
74 |
$Link = "{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}" ; |
|
75 |
|
|
76 |
if ( $this->ToolbarSet != '' ) |
|
77 |
$Link .= "&Toolbar={$this->ToolbarSet}" ; |
|
78 |
|
|
79 |
// Render the linked hidden field. |
|
80 |
$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" style=\"display:none\" />" ; |
|
81 |
|
|
82 |
// Render the configurations hidden field. |
|
83 |
$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" style=\"display:none\" />" ; |
|
84 |
|
|
85 |
// Render the editor IFRAME. |
|
86 |
$Html .= "<iframe id=\"{$this->InstanceName}___Frame\" src=\"{$Link}\" width=\"{$this->Width}\" height=\"{$this->Height}\" frameborder=\"0\" scrolling=\"no\"></iframe>" ; |
|
87 |
} |
|
88 |
else |
|
89 |
{ |
|
90 |
if ( strpos( $this->Width, '%' ) === false ) |
|
91 |
$WidthCSS = $this->Width . 'px' ; |
|
92 |
else |
|
93 |
$WidthCSS = $this->Width ; |
|
94 |
|
|
95 |
if ( strpos( $this->Height, '%' ) === false ) |
|
96 |
$HeightCSS = $this->Height . 'px' ; |
|
97 |
else |
|
98 |
$HeightCSS = $this->Height ; |
|
99 |
|
|
100 |
$Html .= "<textarea name=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\">{$HtmlValue}</textarea>" ; |
|
101 |
} |
|
102 |
|
|
103 |
$Html .= '</div>' ; |
|
104 |
|
|
105 |
return $Html ; |
|
106 |
} |
|
107 |
|
|
108 |
function IsCompatible() |
|
109 |
{ |
|
110 |
return FCKeditor_IsCompatibleBrowser() ; |
|
111 |
} |
|
112 |
|
|
113 |
function GetConfigFieldString() |
|
114 |
{ |
|
115 |
$sParams = '' ; |
|
116 |
$bFirst = true ; |
|
117 |
|
|
118 |
foreach ( $this->Config as $sKey => $sValue ) |
|
119 |
{ |
|
120 |
if ( $bFirst == false ) |
|
121 |
$sParams .= '&' ; |
|
122 |
else |
|
123 |
$bFirst = false ; |
|
124 |
|
|
125 |
if ( $sValue === true ) |
|
126 |
$sParams .= $this->EncodeConfig( $sKey ) . '=true' ; |
|
127 |
else if ( $sValue === false ) |
|
128 |
$sParams .= $this->EncodeConfig( $sKey ) . '=false' ; |
|
129 |
else |
|
130 |
$sParams .= $this->EncodeConfig( $sKey ) . '=' . $this->EncodeConfig( $sValue ) ; |
|
131 |
} |
|
132 |
|
|
133 |
return $sParams ; |
|
134 |
} |
|
135 |
|
|
136 |
function EncodeConfig( $valueToEncode ) |
|
137 |
{ |
|
138 |
$chars = array( |
|
139 |
'&' => '%26', |
|
140 |
'=' => '%3D', |
|
141 |
'"' => '%22' ) ; |
|
142 |
|
|
143 |
return strtr( $valueToEncode, $chars ) ; |
|
144 |
} |
|
145 |
} |
|
146 |
|
|
147 |
?> |
trunk/wb/modules/fckeditor/fckeditor/fckeditor_php5.php | ||
---|---|---|
1 |
<?php |
|
2 |
/* |
|
3 |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
|
4 |
* Copyright (C) 2003-2007 Frederico Caldeira Knabben |
|
5 |
* |
|
6 |
* == BEGIN LICENSE == |
|
7 |
* |
|
8 |
* Licensed under the terms of any of the following licenses at your |
|
9 |
* choice: |
|
10 |
* |
|
11 |
* - GNU General Public License Version 2 or later (the "GPL") |
|
12 |
* http://www.gnu.org/licenses/gpl.html |
|
13 |
* |
|
14 |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
|
15 |
* http://www.gnu.org/licenses/lgpl.html |
|
16 |
* |
|
17 |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
|
18 |
* http://www.mozilla.org/MPL/MPL-1.1.html |
|
19 |
* |
|
20 |
* == END LICENSE == |
|
21 |
* |
|
22 |
* This is the integration file for PHP 5. |
|
23 |
* |
|
24 |
* It defines the FCKeditor class that can be used to create editor |
|
25 |
* instances in PHP pages on server side. |
|
26 |
*/ |
|
27 |
|
|
28 |
class FCKeditor |
|
29 |
{ |
|
30 |
var $InstanceName ; |
|
31 |
var $BasePath ; |
|
32 |
var $Width ; |
|
33 |
var $Height ; |
|
34 |
var $ToolbarSet ; |
|
35 |
var $Value ; |
|
36 |
var $Config ; |
|
37 |
|
|
38 |
// PHP 5 Constructor (by Marcus Bointon <coolbru@users.sourceforge.net>) |
|
39 |
function __construct( $instanceName ) |
|
40 |
{ |
|
41 |
$this->InstanceName = $instanceName ; |
|
42 |
$this->BasePath = '/fckeditor/' ; |
|
43 |
$this->Width = '100%' ; |
|
44 |
$this->Height = '200' ; |
|
45 |
$this->ToolbarSet = 'Default' ; |
|
46 |
$this->Value = '' ; |
|
47 |
|
|
48 |
$this->Config = array() ; |
|
49 |
} |
|
50 |
|
|
51 |
function Create() |
|
52 |
{ |
|
53 |
echo $this->CreateHtml() ; |
|
54 |
} |
|
55 |
|
|
56 |
function CreateHtml() |
|
57 |
{ |
|
58 |
$HtmlValue = htmlspecialchars( $this->Value ) ; |
|
59 |
|
|
60 |
$Html = '<div>' ; |
|
61 |
|
|
62 |
if ( $this->IsCompatible() ) |
|
63 |
{ |
|
64 |
if ( isset( $_GET['fcksource'] ) && $_GET['fcksource'] == "true" ) |
|
65 |
$File = 'fckeditor.original.html' ; |
|
66 |
else |
|
67 |
$File = 'fckeditor.html' ; |
|
68 |
|
|
69 |
$Link = "{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}" ; |
|
70 |
|
|
71 |
if ( $this->ToolbarSet != '' ) |
|
72 |
$Link .= "&Toolbar={$this->ToolbarSet}" ; |
|
73 |
|
|
74 |
// Render the linked hidden field. |
|
75 |
$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" style=\"display:none\" />" ; |
|
76 |
|
|
77 |
// Render the configurations hidden field. |
|
78 |
$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" style=\"display:none\" />" ; |
|
79 |
|
|
80 |
// Render the editor IFRAME. |
|
81 |
$Html .= "<iframe id=\"{$this->InstanceName}___Frame\" src=\"{$Link}\" width=\"{$this->Width}\" height=\"{$this->Height}\" frameborder=\"0\" scrolling=\"no\"></iframe>" ; |
|
82 |
} |
|
83 |
else |
|
84 |
{ |
|
85 |
if ( strpos( $this->Width, '%' ) === false ) |
|
86 |
$WidthCSS = $this->Width . 'px' ; |
|
87 |
else |
|
88 |
$WidthCSS = $this->Width ; |
|
89 |
|
|
90 |
if ( strpos( $this->Height, '%' ) === false ) |
|
91 |
$HeightCSS = $this->Height . 'px' ; |
|
92 |
else |
|
93 |
$HeightCSS = $this->Height ; |
|
94 |
|
|
95 |
$Html .= "<textarea name=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\">{$HtmlValue}</textarea>" ; |
|
96 |
} |
|
97 |
|
|
98 |
$Html .= '</div>' ; |
|
99 |
|
|
100 |
return $Html ; |
|
101 |
} |
|
102 |
|
|
103 |
function IsCompatible() |
|
104 |
{ |
|
105 |
return FCKeditor_IsCompatibleBrowser() ; |
|
106 |
} |
|
107 |
|
|
108 |
function GetConfigFieldString() |
|
109 |
{ |
|
110 |
$sParams = '' ; |
|
111 |
$bFirst = true ; |
|
112 |
|
|
113 |
foreach ( $this->Config as $sKey => $sValue ) |
|
114 |
{ |
|
115 |
if ( $bFirst == false ) |
|
116 |
$sParams .= '&' ; |
|
117 |
else |
|
118 |
$bFirst = false ; |
|
119 |
|
|
120 |
if ( $sValue === true ) |
|
121 |
$sParams .= $this->EncodeConfig( $sKey ) . '=true' ; |
|
122 |
else if ( $sValue === false ) |
|
123 |
$sParams .= $this->EncodeConfig( $sKey ) . '=false' ; |
|
124 |
else |
|
125 |
$sParams .= $this->EncodeConfig( $sKey ) . '=' . $this->EncodeConfig( $sValue ) ; |
|
126 |
} |
|
127 |
|
|
128 |
return $sParams ; |
|
129 |
} |
|
130 |
|
|
131 |
function EncodeConfig( $valueToEncode ) |
|
132 |
{ |
|
133 |
$chars = array( |
|
134 |
'&' => '%26', |
|
135 |
'=' => '%3D', |
|
136 |
'"' => '%22' ) ; |
|
137 |
|
|
138 |
return strtr( $valueToEncode, $chars ) ; |
|
139 |
} |
|
140 |
} |
|
141 |
|
|
142 |
?> |
trunk/wb/modules/fckeditor/fckeditor/fckpackager.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8" ?> |
|
2 |
<!-- |
|
3 |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
|
4 |
* Copyright (C) 2003-2007 Frederico Caldeira Knabben |
|
5 |
* |
|
6 |
* == BEGIN LICENSE == |
|
7 |
* |
|
8 |
* Licensed under the terms of any of the following licenses at your |
|
9 |
* choice: |
|
10 |
* |
|
11 |
* - GNU General Public License Version 2 or later (the "GPL") |
|
12 |
* http://www.gnu.org/licenses/gpl.html |
|
13 |
* |
|
14 |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
|
15 |
* http://www.gnu.org/licenses/lgpl.html |
|
16 |
* |
|
17 |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
|
18 |
* http://www.mozilla.org/MPL/MPL-1.1.html |
|
19 |
* |
|
20 |
* == END LICENSE == |
|
21 |
* |
|
22 |
* This is the configuration file to be used with FCKpackager to generate the |
|
23 |
* compressed code files in the "js" folder. |
|
24 |
* |
|
25 |
* Please check http://www.fckeditor.net for more info. |
|
26 |
--> |
|
27 |
<Package> |
|
28 |
<Header><![CDATA[/* |
|
29 |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
|
30 |
* Copyright (C) 2003-2007 Frederico Caldeira Knabben |
|
31 |
* |
|
32 |
* == BEGIN LICENSE == |
|
33 |
* |
|
34 |
* Licensed under the terms of any of the following licenses at your |
|
35 |
* choice: |
|
36 |
* |
|
37 |
* - GNU General Public License Version 2 or later (the "GPL") |
|
38 |
* http://www.gnu.org/licenses/gpl.html |
|
39 |
* |
|
40 |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
|
41 |
* http://www.gnu.org/licenses/lgpl.html |
|
42 |
* |
|
43 |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
|
44 |
* http://www.mozilla.org/MPL/MPL-1.1.html |
|
45 |
* |
|
46 |
* == END LICENSE == |
|
47 |
* |
|
48 |
* This file has been compressed for better performance. The original source |
|
49 |
* can be found at "editor/_source". |
|
50 |
*/ |
|
51 |
]]></Header> |
|
52 |
<Constants removeDeclaration="false"> |
|
53 |
<Constant name="FCK_STATUS_NOTLOADED" value="0" /> |
|
54 |
<Constant name="FCK_STATUS_ACTIVE" value="1" /> |
|
55 |
<Constant name="FCK_STATUS_COMPLETE" value="2" /> |
|
56 |
<Constant name="FCK_TRISTATE_OFF" value="0" /> |
|
57 |
<Constant name="FCK_TRISTATE_ON" value="1" /> |
|
58 |
<Constant name="FCK_TRISTATE_DISABLED" value="-1" /> |
|
59 |
<Constant name="FCK_UNKNOWN" value="-9" /> |
|
60 |
<Constant name="FCK_TOOLBARITEM_ONLYICON" value="0" /> |
|
61 |
<Constant name="FCK_TOOLBARITEM_ONLYTEXT" value="1" /> |
|
62 |
<Constant name="FCK_TOOLBARITEM_ICONTEXT" value="2" /> |
|
63 |
<Constant name="FCK_EDITMODE_WYSIWYG" value="0" /> |
|
64 |
<Constant name="FCK_EDITMODE_SOURCE" value="1" /> |
|
65 |
<Constant name="FCK_STYLE_BLOCK" value="0" /> |
|
66 |
<Constant name="FCK_STYLE_INLINE" value="1" /> |
|
67 |
<Constant name="FCK_STYLE_OBJECT" value="2" /> |
|
68 |
</Constants> |
|
69 |
<PackageFile path="editor/js/fckeditorcode_ie.js"> |
|
70 |
<File path="editor/_source/fckconstants.js" /> |
|
71 |
<File path="editor/_source/fckjscoreextensions.js" /> |
|
72 |
<File path="editor/_source/classes/fckiecleanup.js" /> |
|
73 |
<File path="editor/_source/internals/fckbrowserinfo.js" /> |
|
74 |
<File path="editor/_source/internals/fckurlparams.js" /> |
|
75 |
<File path="editor/_source/classes/fckevents.js" /> |
|
76 |
<File path="editor/_source/classes/fckdataprocessor.js" /> |
|
77 |
<File path="editor/_source/internals/fck.js" /> |
|
78 |
<File path="editor/_source/internals/fck_ie.js" /> |
|
79 |
<File path="editor/_source/internals/fckconfig.js" /> |
|
80 |
<File path="editor/_source/internals/fckdebug.js" /> |
|
81 |
<File path="editor/_source/internals/fckdomtools.js" /> |
|
82 |
<File path="editor/_source/internals/fcktools.js" /> |
|
83 |
<File path="editor/_source/internals/fcktools_ie.js" /> |
|
84 |
<File path="editor/_source/fckeditorapi.js" /> |
|
85 |
<File path="editor/_source/classes/fckimagepreloader.js" /> |
|
86 |
|
|
87 |
<File path="editor/_source/internals/fckregexlib.js" /> |
|
88 |
<File path="editor/_source/internals/fcklistslib.js" /> |
|
89 |
<File path="editor/_source/internals/fcklanguagemanager.js" /> |
|
90 |
<File path="editor/_source/internals/fckxhtmlentities.js" /> |
|
91 |
<File path="editor/_source/internals/fckxhtml.js" /> |
|
92 |
<File path="editor/_source/internals/fckxhtml_ie.js" /> |
|
93 |
<File path="editor/_source/internals/fckcodeformatter.js" /> |
|
94 |
<File path="editor/_source/internals/fckundo.js" /> |
|
95 |
<File path="editor/_source/classes/fckeditingarea.js" /> |
|
96 |
<File path="editor/_source/classes/fckkeystrokehandler.js" /> |
|
97 |
|
|
98 |
<File path="editor/dtd/fck_xhtml10transitional.js" /> |
|
99 |
<File path="editor/_source/classes/fckstyle.js" /> |
|
100 |
<File path="editor/_source/internals/fckstyles.js" /> |
|
101 |
|
|
102 |
<File path="editor/_source/internals/fcklisthandler.js" /> |
|
103 |
<File path="editor/_source/classes/fckelementpath.js" /> |
|
104 |
<File path="editor/_source/classes/fckdomrange.js" /> |
|
105 |
<File path="editor/_source/classes/fckdomrange_ie.js" /> |
|
106 |
<File path="editor/_source/classes/fckdomrangeiterator.js" /> |
|
107 |
<File path="editor/_source/classes/fckdocumentfragment_ie.js" /> |
|
108 |
<File path="editor/_source/classes/fckw3crange.js" /> |
|
109 |
<File path="editor/_source/classes/fckenterkey.js" /> |
|
110 |
|
|
111 |
<File path="editor/_source/internals/fckdocumentprocessor.js" /> |
|
112 |
<File path="editor/_source/internals/fckselection.js" /> |
|
113 |
<File path="editor/_source/internals/fckselection_ie.js" /> |
|
114 |
|
|
115 |
<File path="editor/_source/internals/fcktablehandler.js" /> |
|
116 |
<File path="editor/_source/internals/fcktablehandler_ie.js" /> |
|
117 |
<File path="editor/_source/classes/fckxml.js" /> |
|
118 |
<File path="editor/_source/classes/fckxml_ie.js" /> |
|
119 |
|
|
120 |
<File path="editor/_source/commandclasses/fcknamedcommand.js" /> |
|
121 |
<File path="editor/_source/commandclasses/fckstylecommand.js" /> |
|
122 |
<File path="editor/_source/commandclasses/fck_othercommands.js" /> |
|
123 |
<File path="editor/_source/commandclasses/fckshowblocks.js" /> |
|
124 |
<File path="editor/_source/commandclasses/fckspellcheckcommand_ie.js" /> |
|
125 |
<File path="editor/_source/commandclasses/fcktextcolorcommand.js" /> |
|
126 |
<File path="editor/_source/commandclasses/fckpasteplaintextcommand.js" /> |
|
127 |
<File path="editor/_source/commandclasses/fckpastewordcommand.js" /> |
|
128 |
<File path="editor/_source/commandclasses/fcktablecommand.js" /> |
|
129 |
<File path="editor/_source/commandclasses/fckfitwindow.js" /> |
|
130 |
<File path="editor/_source/commandclasses/fcklistcommands.js" /> |
|
131 |
<File path="editor/_source/commandclasses/fckjustifycommands.js" /> |
|
132 |
<File path="editor/_source/commandclasses/fckindentcommands.js" /> |
|
133 |
<File path="editor/_source/commandclasses/fckblockquotecommand.js" /> |
|
134 |
<File path="editor/_source/commandclasses/fckcorestylecommand.js" /> |
|
135 |
<File path="editor/_source/commandclasses/fckremoveformatcommand.js" /> |
|
136 |
<File path="editor/_source/internals/fckcommands.js" /> |
|
137 |
|
|
138 |
<File path="editor/_source/classes/fckpanel.js" /> |
|
139 |
<File path="editor/_source/classes/fckicon.js" /> |
|
140 |
<File path="editor/_source/classes/fcktoolbarbuttonui.js" /> |
|
141 |
<File path="editor/_source/classes/fcktoolbarbutton.js" /> |
|
142 |
<File path="editor/_source/classes/fckspecialcombo.js" /> |
|
143 |
<File path="editor/_source/classes/fcktoolbarspecialcombo.js" /> |
|
144 |
<File path="editor/_source/classes/fcktoolbarstylecombo.js" /> |
|
145 |
<File path="editor/_source/classes/fcktoolbarfontformatcombo.js" /> |
|
146 |
<File path="editor/_source/classes/fcktoolbarfontscombo.js" /> |
|
147 |
<File path="editor/_source/classes/fcktoolbarfontsizecombo.js" /> |
|
148 |
<File path="editor/_source/classes/fcktoolbarpanelbutton.js" /> |
|
149 |
<File path="editor/_source/internals/fcktoolbaritems.js" /> |
|
150 |
<File path="editor/_source/classes/fcktoolbar.js" /> |
|
151 |
<File path="editor/_source/classes/fcktoolbarbreak_ie.js" /> |
|
152 |
<File path="editor/_source/internals/fcktoolbarset.js" /> |
|
153 |
<File path="editor/_source/internals/fckdialog.js" /> |
|
154 |
<File path="editor/_source/internals/fckdialog_ie.js" /> |
|
155 |
|
|
156 |
<File path="editor/_source/classes/fckmenuitem.js" /> |
|
157 |
<File path="editor/_source/classes/fckmenublock.js" /> |
|
158 |
<File path="editor/_source/classes/fckmenublockpanel.js" /> |
|
159 |
<File path="editor/_source/classes/fckcontextmenu.js" /> |
|
160 |
<File path="editor/_source/internals/fck_contextmenu.js" /> |
|
161 |
|
|
162 |
<File path="editor/_source/classes/fckplugin.js" /> |
|
163 |
<File path="editor/_source/internals/fckplugins.js" /> |
|
164 |
</PackageFile> |
|
165 |
|
|
166 |
<PackageFile path="editor/js/fckeditorcode_gecko.js"> |
|
167 |
<File path="editor/_source/fckconstants.js" /> |
|
168 |
<File path="editor/_source/fckjscoreextensions.js" /> |
|
169 |
<File path="editor/_source/internals/fckbrowserinfo.js" /> |
|
170 |
<File path="editor/_source/internals/fckurlparams.js" /> |
|
171 |
<File path="editor/_source/classes/fckevents.js" /> |
|
172 |
<File path="editor/_source/classes/fckdataprocessor.js" /> |
|
173 |
<File path="editor/_source/internals/fck.js" /> |
|
174 |
<File path="editor/_source/internals/fck_gecko.js" /> |
|
175 |
<File path="editor/_source/internals/fckconfig.js" /> |
|
176 |
<File path="editor/_source/internals/fckdebug.js" /> |
|
177 |
<File path="editor/_source/internals/fckdomtools.js" /> |
|
178 |
<File path="editor/_source/internals/fcktools.js" /> |
|
179 |
<File path="editor/_source/internals/fcktools_gecko.js" /> |
|
180 |
<File path="editor/_source/fckeditorapi.js" /> |
|
181 |
<File path="editor/_source/classes/fckimagepreloader.js" /> |
|
182 |
|
|
183 |
<File path="editor/_source/internals/fckregexlib.js" /> |
|
184 |
<File path="editor/_source/internals/fcklistslib.js" /> |
|
185 |
<File path="editor/_source/internals/fcklanguagemanager.js" /> |
|
186 |
<File path="editor/_source/internals/fckxhtmlentities.js" /> |
|
187 |
<File path="editor/_source/internals/fckxhtml.js" /> |
|
188 |
<File path="editor/_source/internals/fckxhtml_gecko.js" /> |
|
189 |
<File path="editor/_source/internals/fckcodeformatter.js" /> |
|
190 |
<File path="editor/_source/internals/fckundo.js" /> |
|
191 |
<File path="editor/_source/classes/fckeditingarea.js" /> |
|
192 |
<File path="editor/_source/classes/fckkeystrokehandler.js" /> |
|
193 |
|
|
194 |
<File path="editor/dtd/fck_xhtml10transitional.js" /> |
|
195 |
<File path="editor/_source/classes/fckstyle.js" /> |
|
196 |
<File path="editor/_source/internals/fckstyles.js" /> |
|
197 |
|
|
198 |
<File path="editor/_source/internals/fcklisthandler.js" /> |
|
199 |
<File path="editor/_source/classes/fckelementpath.js" /> |
|
200 |
<File path="editor/_source/classes/fckdomrange.js" /> |
|
201 |
<File path="editor/_source/classes/fckdomrange_gecko.js" /> |
|
202 |
<File path="editor/_source/classes/fckdomrangeiterator.js" /> |
|
203 |
<File path="editor/_source/classes/fckdocumentfragment_gecko.js" /> |
|
204 |
<File path="editor/_source/classes/fckw3crange.js" /> |
|
205 |
<File path="editor/_source/classes/fckenterkey.js" /> |
|
206 |
|
|
207 |
<File path="editor/_source/internals/fckdocumentprocessor.js" /> |
|
208 |
<File path="editor/_source/internals/fckselection.js" /> |
|
209 |
<File path="editor/_source/internals/fckselection_gecko.js" /> |
|
210 |
|
|
211 |
<File path="editor/_source/internals/fcktablehandler.js" /> |
|
212 |
<File path="editor/_source/internals/fcktablehandler_gecko.js" /> |
|
213 |
<File path="editor/_source/classes/fckxml.js" /> |
|
214 |
<File path="editor/_source/classes/fckxml_gecko.js" /> |
|
215 |
|
|
216 |
<File path="editor/_source/commandclasses/fcknamedcommand.js" /> |
|
217 |
<File path="editor/_source/commandclasses/fckstylecommand.js" /> |
|
218 |
<File path="editor/_source/commandclasses/fck_othercommands.js" /> |
|
219 |
<File path="editor/_source/commandclasses/fckshowblocks.js" /> |
|
220 |
<File path="editor/_source/commandclasses/fckspellcheckcommand_gecko.js" /> |
|
221 |
<File path="editor/_source/commandclasses/fcktextcolorcommand.js" /> |
|
222 |
<File path="editor/_source/commandclasses/fckpasteplaintextcommand.js" /> |
|
223 |
<File path="editor/_source/commandclasses/fckpastewordcommand.js" /> |
|
224 |
<File path="editor/_source/commandclasses/fcktablecommand.js" /> |
|
225 |
<File path="editor/_source/commandclasses/fckfitwindow.js" /> |
|
226 |
<File path="editor/_source/commandclasses/fcklistcommands.js" /> |
|
227 |
<File path="editor/_source/commandclasses/fckjustifycommands.js" /> |
|
228 |
<File path="editor/_source/commandclasses/fckindentcommands.js" /> |
|
229 |
<File path="editor/_source/commandclasses/fckblockquotecommand.js" /> |
|
230 |
<File path="editor/_source/commandclasses/fckcorestylecommand.js" /> |
|
231 |
<File path="editor/_source/commandclasses/fckremoveformatcommand.js" /> |
|
232 |
<File path="editor/_source/internals/fckcommands.js" /> |
|
233 |
|
|
234 |
<File path="editor/_source/classes/fckpanel.js" /> |
|
235 |
<File path="editor/_source/classes/fckicon.js" /> |
|
236 |
<File path="editor/_source/classes/fcktoolbarbuttonui.js" /> |
|
237 |
<File path="editor/_source/classes/fcktoolbarbutton.js" /> |
|
238 |
<File path="editor/_source/classes/fckspecialcombo.js" /> |
|
239 |
<File path="editor/_source/classes/fcktoolbarspecialcombo.js" /> |
|
240 |
<File path="editor/_source/classes/fcktoolbarstylecombo.js" /> |
|
241 |
<File path="editor/_source/classes/fcktoolbarfontformatcombo.js" /> |
|
242 |
<File path="editor/_source/classes/fcktoolbarfontscombo.js" /> |
|
243 |
<File path="editor/_source/classes/fcktoolbarfontsizecombo.js" /> |
|
244 |
<File path="editor/_source/classes/fcktoolbarpanelbutton.js" /> |
|
245 |
<File path="editor/_source/internals/fcktoolbaritems.js" /> |
|
246 |
<File path="editor/_source/classes/fcktoolbar.js" /> |
|
247 |
<File path="editor/_source/classes/fcktoolbarbreak_gecko.js" /> |
|
248 |
<File path="editor/_source/internals/fcktoolbarset.js" /> |
|
249 |
<File path="editor/_source/internals/fckdialog.js" /> |
|
250 |
<File path="editor/_source/internals/fckdialog_gecko.js" /> |
|
251 |
|
|
252 |
<File path="editor/_source/classes/fckmenuitem.js" /> |
|
253 |
<File path="editor/_source/classes/fckmenublock.js" /> |
|
254 |
<File path="editor/_source/classes/fckmenublockpanel.js" /> |
|
255 |
<File path="editor/_source/classes/fckcontextmenu.js" /> |
|
256 |
<File path="editor/_source/internals/fck_contextmenu.js" /> |
|
257 |
|
|
258 |
<File path="editor/_source/classes/fckplugin.js" /> |
|
259 |
<File path="editor/_source/internals/fckplugins.js" /> |
|
260 |
</PackageFile> |
|
261 |
|
|
262 |
</Package> |
trunk/wb/modules/fckeditor/fckeditor/fckeditor.php | ||
---|---|---|
1 |
<?php |
|
2 |
/* |
|
3 |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
|
4 |
* Copyright (C) 2003-2007 Frederico Caldeira Knabben |
|
5 |
* |
|
6 |
* == BEGIN LICENSE == |
|
7 |
* |
|
8 |
* Licensed under the terms of any of the following licenses at your |
|
9 |
* choice: |
|
10 |
* |
|
11 |
* - GNU General Public License Version 2 or later (the "GPL") |
|
12 |
* http://www.gnu.org/licenses/gpl.html |
|
13 |
* |
|
14 |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
|
15 |
* http://www.gnu.org/licenses/lgpl.html |
|
16 |
* |
|
17 |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
|
18 |
* http://www.mozilla.org/MPL/MPL-1.1.html |
|
19 |
* |
|
20 |
* == END LICENSE == |
|
21 |
* |
|
22 |
* This is the integration file for PHP (All versions). |
|
23 |
* |
|
24 |
* It loads the correct integration file based on the PHP version (avoiding |
|
25 |
* strict error messages with PHP 5). |
|
26 |
*/ |
|
27 |
|
|
28 |
function FCKeditor_IsCompatibleBrowser() |
|
29 |
{ |
|
30 |
global $HTTP_USER_AGENT ; |
|
31 |
|
|
32 |
if ( !isset( $_SERVER ) ) { |
|
33 |
global $HTTP_SERVER_VARS ; |
|
34 |
$_SERVER = $HTTP_SERVER_VARS ; |
|
35 |
} |
|
36 |
|
|
37 |
if ( isset( $HTTP_USER_AGENT ) ) |
|
38 |
$sAgent = $HTTP_USER_AGENT ; |
|
39 |
else |
|
40 |
$sAgent = $_SERVER['HTTP_USER_AGENT'] ; |
|
41 |
|
|
42 |
if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false ) |
|
43 |
{ |
|
44 |
$iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ; |
|
45 |
return ($iVersion >= 5.5) ; |
|
46 |
} |
|
47 |
else if ( strpos($sAgent, 'Gecko/') !== false ) |
|
48 |
{ |
|
49 |
$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ; |
|
50 |
return ($iVersion >= 20030210) ; |
|
51 |
} |
|
52 |
else if ( strpos($sAgent, 'Opera/') !== false ) |
|
53 |
{ |
|
54 |
$fVersion = (float)substr($sAgent, strpos($sAgent, 'Opera/') + 6, 4) ; |
|
55 |
return ($fVersion >= 9.5) ; |
|
56 |
} |
|
57 |
else if ( preg_match( "|AppleWebKit/(\d+)|i", $sAgent, $matches ) ) |
|
58 |
{ |
|
59 |
$iVersion = $matches[1] ; |
|
60 |
return ( $matches[1] >= 522 ) ; |
|
61 |
} |
|
62 |
else |
|
63 |
return false ; |
|
64 |
} |
|
65 |
|
|
66 |
if ( !function_exists('version_compare') || version_compare( phpversion(), '5', '<' ) ) |
|
67 |
include_once( 'fckeditor_php4.php' ) ; |
|
68 |
else |
|
69 |
include_once( 'fckeditor_php5.php' ) ; |
|
70 |
|
|
71 |
?> |
trunk/wb/modules/fckeditor/fckeditor/fckconfig.js | ||
---|---|---|
1 |
/* |
|
2 |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
|
3 |
* Copyright (C) 2003-2007 Frederico Caldeira Knabben |
|
4 |
* |
|
5 |
* == BEGIN LICENSE == |
|
6 |
* |
|
7 |
* Licensed under the terms of any of the following licenses at your |
|
8 |
* choice: |
|
9 |
* |
|
10 |
* - GNU General Public License Version 2 or later (the "GPL") |
|
11 |
* http://www.gnu.org/licenses/gpl.html |
|
12 |
* |
|
13 |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
|
14 |
* http://www.gnu.org/licenses/lgpl.html |
|
15 |
* |
|
16 |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
|
17 |
* http://www.mozilla.org/MPL/MPL-1.1.html |
|
18 |
* |
|
19 |
* == END LICENSE == |
|
20 |
* |
|
21 |
* Editor configuration settings. |
|
22 |
* |
|
23 |
* Follow this link for more information: |
|
24 |
* http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Configurations_Settings |
|
25 |
*/ |
|
26 |
|
|
27 |
FCKConfig.CustomConfigurationsPath = '' ; |
|
28 |
|
|
29 |
FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ; |
|
30 |
FCKConfig.EditorAreaStyles = '' ; |
|
31 |
FCKConfig.ToolbarComboPreviewCSS = '' ; |
|
32 |
|
|
33 |
FCKConfig.DocType = '' ; |
|
34 |
|
|
35 |
FCKConfig.BaseHref = '' ; |
|
36 |
|
|
37 |
FCKConfig.FullPage = false ; |
|
38 |
|
|
39 |
// The following option determines whether the "Show Blocks" feature is enabled or not at startup. |
|
40 |
FCKConfig.StartupShowBlocks = false ; |
|
41 |
|
|
42 |
FCKConfig.Debug = false ; |
|
43 |
FCKConfig.AllowQueryStringDebug = true ; |
|
44 |
|
|
45 |
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ; |
|
46 |
FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ; |
|
47 |
|
|
48 |
FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ; |
|
49 |
|
|
50 |
// FCKConfig.Plugins.Add( 'autogrow' ) ; |
|
51 |
// FCKConfig.Plugins.Add( 'dragresizetable' ); |
|
52 |
FCKConfig.AutoGrowMax = 400 ; |
|
53 |
|
|
54 |
// FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%> |
|
55 |
// FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code |
|
56 |
// FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ; // ASP.Net style tags <asp:control> |
|
57 |
|
|
58 |
FCKConfig.AutoDetectLanguage = true ; |
|
59 |
FCKConfig.DefaultLanguage = 'en' ; |
|
60 |
FCKConfig.ContentLangDirection = 'ltr' ; |
|
61 |
|
|
62 |
FCKConfig.ProcessHTMLEntities = true ; |
|
63 |
FCKConfig.IncludeLatinEntities = true ; |
|
64 |
FCKConfig.IncludeGreekEntities = true ; |
|
65 |
|
|
66 |
FCKConfig.ProcessNumericEntities = false ; |
|
67 |
|
|
68 |
FCKConfig.AdditionalNumericEntities = '' ; // Single Quote: "'" |
|
69 |
|
|
70 |
FCKConfig.FillEmptyBlocks = true ; |
|
71 |
|
|
72 |
FCKConfig.FormatSource = true ; |
|
73 |
FCKConfig.FormatOutput = true ; |
|
74 |
FCKConfig.FormatIndentator = ' ' ; |
|
75 |
|
|
76 |
FCKConfig.StartupFocus = false ; |
|
77 |
FCKConfig.ForcePasteAsPlainText = false ; |
|
78 |
FCKConfig.AutoDetectPasteFromWord = true ; // IE only. |
|
79 |
FCKConfig.ShowDropDialog = true ; |
|
80 |
FCKConfig.ForceSimpleAmpersand = false ; |
|
81 |
FCKConfig.TabSpaces = 0 ; |
|
82 |
FCKConfig.ShowBorders = true ; |
|
83 |
FCKConfig.SourcePopup = false ; |
|
84 |
FCKConfig.ToolbarStartExpanded = true ; |
|
85 |
FCKConfig.ToolbarCanCollapse = true ; |
|
86 |
FCKConfig.IgnoreEmptyParagraphValue = true ; |
|
87 |
FCKConfig.PreserveSessionOnFileBrowser = false ; |
|
88 |
FCKConfig.FloatingPanelsZIndex = 10000 ; |
|
89 |
FCKConfig.HtmlEncodeOutput = false ; |
|
90 |
|
|
91 |
FCKConfig.TemplateReplaceAll = true ; |
|
92 |
FCKConfig.TemplateReplaceCheckbox = true ; |
|
93 |
|
|
94 |
FCKConfig.ToolbarLocation = 'In' ; |
|
95 |
|
|
96 |
FCKConfig.ToolbarSets["Default"] = [ |
|
97 |
['Source','DocProps','-','Save','NewPage','Preview','-','Templates'], |
|
98 |
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'], |
|
99 |
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], |
|
100 |
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'], |
|
101 |
'/', |
|
102 |
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], |
|
103 |
['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'], |
|
104 |
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], |
|
105 |
['Link','Unlink','Anchor'], |
|
106 |
['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'], |
|
107 |
'/', |
|
108 |
['Style','FontFormat','FontName','FontSize'], |
|
109 |
['TextColor','BGColor'], |
|
110 |
['FitWindow','ShowBlocks','-','About'] // No comma for the last row. |
|
111 |
] ; |
|
112 |
|
|
113 |
FCKConfig.ToolbarSets["Basic"] = [ |
|
114 |
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About'] |
|
115 |
] ; |
|
116 |
|
|
117 |
FCKConfig.EnterMode = 'p' ; // p | div | br |
|
118 |
FCKConfig.ShiftEnterMode = 'br' ; // p | div | br |
|
119 |
|
|
120 |
FCKConfig.Keystrokes = [ |
|
121 |
[ CTRL + 65 /*A*/, true ], |
|
122 |
[ CTRL + 67 /*C*/, true ], |
|
123 |
[ CTRL + 70 /*F*/, true ], |
|
124 |
[ CTRL + 83 /*S*/, true ], |
|
125 |
[ CTRL + 88 /*X*/, true ], |
|
126 |
[ CTRL + 86 /*V*/, 'Paste' ], |
|
127 |
[ SHIFT + 45 /*INS*/, 'Paste' ], |
|
128 |
[ CTRL + 88 /*X*/, 'Cut' ], |
|
129 |
[ SHIFT + 46 /*DEL*/, 'Cut' ], |
|
130 |
[ CTRL + 90 /*Z*/, 'Undo' ], |
|
131 |
[ CTRL + 89 /*Y*/, 'Redo' ], |
|
132 |
[ CTRL + SHIFT + 90 /*Z*/, 'Redo' ], |
|
133 |
[ CTRL + 76 /*L*/, 'Link' ], |
|
134 |
[ CTRL + 66 /*B*/, 'Bold' ], |
|
135 |
[ CTRL + 73 /*I*/, 'Italic' ], |
|
136 |
[ CTRL + 85 /*U*/, 'Underline' ], |
|
137 |
[ CTRL + SHIFT + 83 /*S*/, 'Save' ], |
|
138 |
[ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ], |
|
139 |
[ CTRL + 9 /*TAB*/, 'Source' ] |
|
140 |
] ; |
|
141 |
|
|
142 |
FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form'] ; |
|
143 |
FCKConfig.BrowserContextMenuOnCtrl = false ; |
|
144 |
|
|
145 |
FCKConfig.EnableMoreFontColors = true ; |
|
146 |
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' ; |
|
147 |
|
|
148 |
FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5;h6;pre;address;div' ; |
|
149 |
FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ; |
|
150 |
FCKConfig.FontSizes = 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ; |
|
151 |
|
|
152 |
FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ; |
|
153 |
FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ; |
|
154 |
|
|
155 |
FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages' |
|
156 |
FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/download.php' ; |
|
157 |
FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ; // Available extension: .php .cfm .pl |
|
158 |
FCKConfig.FirefoxSpellChecker = false ; |
|
159 |
|
|
160 |
FCKConfig.MaxUndoLevels = 15 ; |
|
161 |
|
|
162 |
FCKConfig.DisableObjectResizing = false ; |
|
163 |
FCKConfig.DisableFFTableHandles = true ; |
|
164 |
|
|
165 |
FCKConfig.LinkDlgHideTarget = false ; |
|
166 |
FCKConfig.LinkDlgHideAdvanced = false ; |
|
167 |
|
|
168 |
FCKConfig.ImageDlgHideLink = false ; |
|
169 |
FCKConfig.ImageDlgHideAdvanced = false ; |
|
170 |
|
|
171 |
FCKConfig.FlashDlgHideAdvanced = false ; |
|
172 |
|
|
173 |
FCKConfig.ProtectedTags = '' ; |
|
174 |
|
|
175 |
// This will be applied to the body element of the editor |
|
176 |
FCKConfig.BodyId = '' ; |
|
177 |
FCKConfig.BodyClass = '' ; |
Also available in: Unified diff
removed the outdated FCKEditor v2.51