1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
8
* Licensed under the terms of any of the following licenses at your
11
* - GNU General Public License Version 2 or later (the "GPL")
12
* http://www.gnu.org/licenses/gpl.html
14
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
* http://www.gnu.org/licenses/lgpl.html
17
* - Mozilla Public License Version 1.1 or later (the "MPL")
18
* http://www.mozilla.org/MPL/MPL-1.1.html
22
* Main page that holds the editor.
24
<html xmlns="http://www.w3.org/1999/xhtml">
26
<title>FCKeditor</title>
27
<meta name="robots" content="noindex, nofollow" />
28
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
29
<!-- @Packager.RemoveLine
30
<meta http-equiv="Cache-Control" content="public" />
31
@Packager.RemoveLine -->
32
<script type="text/javascript">
34
// Instead of loading scripts and CSSs using inline tags, all scripts are
35
// loaded by code. In this way we can guarantee the correct processing order,
36
// otherwise external scripts and inline scripts could be executed in an
37
// unwanted order (IE).
39
function LoadScript( url )
41
document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '" onerror="alert(\'Error loading \' + this.src);"><\/scr' + 'ipt>' ) ;
44
function LoadCss( url )
46
document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" onerror="alert(\'Error loading \' + this.src);" />' ) ;
49
// Main editor scripts.
50
var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? 'ie' : 'gecko' ;
52
/* @Packager.RemoveLine
53
LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
54
@Packager.RemoveLine */
55
// @Packager.Remove.Start
57
LoadScript( '_source/fckconstants.js' ) ;
58
LoadScript( '_source/fckjscoreextensions.js' ) ;
60
if ( sSuffix == 'ie' )
61
LoadScript( '_source/classes/fckiecleanup.js' ) ;
63
LoadScript( '_source/internals/fckbrowserinfo.js' ) ;
64
LoadScript( '_source/internals/fckurlparams.js' ) ;
65
LoadScript( '_source/classes/fckevents.js' ) ;
66
LoadScript( '_source/internals/fck.js' ) ;
67
LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ;
68
LoadScript( '_source/internals/fckconfig.js' ) ;
70
LoadScript( '_source/internals/fckdebug.js' ) ;
71
LoadScript( '_source/internals/fckdomtools.js' ) ;
72
LoadScript( '_source/internals/fcktools.js' ) ;
73
LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;
74
LoadScript( '_source/fckeditorapi.js' ) ;
75
LoadScript( '_source/classes/fckimagepreloader.js' ) ;
76
LoadScript( '_source/internals/fckregexlib.js' ) ;
77
LoadScript( '_source/internals/fcklistslib.js' ) ;
78
LoadScript( '_source/internals/fcklanguagemanager.js' ) ;
79
LoadScript( '_source/internals/fckxhtmlentities.js' ) ;
80
LoadScript( '_source/internals/fckxhtml.js' ) ;
81
LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ;
82
LoadScript( '_source/internals/fckcodeformatter.js' ) ;
83
LoadScript( '_source/internals/fckundo_' + sSuffix + '.js' ) ;
84
LoadScript( '_source/classes/fckeditingarea.js' ) ;
85
LoadScript( '_source/classes/fckkeystrokehandler.js' ) ;
87
LoadScript( '_source/internals/fcklisthandler.js' ) ;
88
LoadScript( '_source/classes/fckelementpath.js' ) ;
89
LoadScript( '_source/classes/fckdomrange.js' ) ;
90
LoadScript( '_source/classes/fckdocumentfragment_' + sSuffix + '.js' ) ;
91
LoadScript( '_source/classes/fckw3crange.js' ) ;
92
LoadScript( '_source/classes/fckdomrange_' + sSuffix + '.js' ) ;
93
LoadScript( '_source/classes/fckenterkey.js' ) ;
95
LoadScript( '_source/internals/fckdocumentprocessor.js' ) ;
96
LoadScript( '_source/internals/fckselection.js' ) ;
97
LoadScript( '_source/internals/fckselection_' + sSuffix + '.js' ) ;
99
LoadScript( '_source/internals/fcktablehandler.js' ) ;
100
LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ;
101
LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ;
102
LoadScript( '_source/classes/fckstyledef.js' ) ;
103
LoadScript( '_source/classes/fckstyledef_' + sSuffix + '.js' ) ;
104
LoadScript( '_source/classes/fckstylesloader.js' ) ;
106
LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ;
107
LoadScript( '_source/commandclasses/fck_othercommands.js' ) ;
108
LoadScript( '_source/commandclasses/fckspellcheckcommand_' + sSuffix + '.js' ) ;
109
LoadScript( '_source/commandclasses/fcktextcolorcommand.js' ) ;
110
LoadScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ;
111
LoadScript( '_source/commandclasses/fckpastewordcommand.js' ) ;
112
LoadScript( '_source/commandclasses/fcktablecommand.js' ) ;
113
LoadScript( '_source/commandclasses/fckstylecommand.js' ) ;
114
LoadScript( '_source/commandclasses/fckfitwindow.js' ) ;
115
LoadScript( '_source/internals/fckcommands.js' ) ;
117
LoadScript( '_source/classes/fckpanel.js' ) ;
118
LoadScript( '_source/classes/fckicon.js' ) ;
119
LoadScript( '_source/classes/fcktoolbarbuttonui.js' ) ;
120
LoadScript( '_source/classes/fcktoolbarbutton.js' ) ;
121
LoadScript( '_source/classes/fckspecialcombo.js' ) ;
122
LoadScript( '_source/classes/fcktoolbarspecialcombo.js' ) ;
123
LoadScript( '_source/classes/fcktoolbarfontscombo.js' ) ;
124
LoadScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ;
125
LoadScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ;
126
LoadScript( '_source/classes/fcktoolbarstylecombo.js' ) ;
127
LoadScript( '_source/classes/fcktoolbarpanelbutton.js' ) ;
128
LoadScript( '_source/internals/fcktoolbaritems.js' ) ;
129
LoadScript( '_source/classes/fcktoolbar.js' ) ;
130
LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ;
131
LoadScript( '_source/internals/fcktoolbarset.js' ) ;
132
LoadScript( '_source/internals/fckdialog.js' ) ;
133
LoadScript( '_source/internals/fckdialog_' + sSuffix + '.js' ) ;
134
LoadScript( '_source/classes/fckmenuitem.js' ) ;
135
LoadScript( '_source/classes/fckmenublock.js' ) ;
136
LoadScript( '_source/classes/fckmenublockpanel.js' ) ;
137
LoadScript( '_source/classes/fckcontextmenu.js' ) ;
138
LoadScript( '_source/internals/fck_contextmenu.js' ) ;
139
LoadScript( '_source/classes/fckplugin.js' ) ;
140
LoadScript( '_source/internals/fckplugins.js' ) ;
142
// @Packager.Remove.End
144
// Base configuration file.
145
LoadScript( '../fckconfig.js' ) ;
148
<script type="text/javascript">
150
if ( FCKBrowserInfo.IsIE )
152
// Remove IE mouse flickering.
155
document.execCommand( 'BackgroundImageCache', false, true ) ;
159
// We have been reported about loading problems caused by the above
160
// line. For safety, let's just ignore errors.
163
// Create the default cleanup object used by the editor.
164
FCK.IECleanup = new FCKIECleanup( window ) ;
165
FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
166
FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
169
// The config hidden field is processed immediately, because
170
// CustomConfigurationsPath may be set in the page.
171
FCKConfig.ProcessHiddenField() ;
173
// Load the custom configurations file (if defined).
174
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
175
LoadScript( FCKConfig.CustomConfigurationsPath ) ;
178
<script type="text/javascript">
180
// Load configurations defined at page level.
181
FCKConfig_LoadPageConfig() ;
183
FCKConfig_PreProcess() ;
185
// Load the active skin CSS.
186
LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ;
188
// Load the language file.
189
FCKLanguageManager.Initialize() ;
190
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
193
<script type="text/javascript">
195
// Initialize the editing area context menu.
196
FCK_ContextMenu_Init() ;
201
<script type="text/javascript">
203
// Set the editor interface direction.
204
window.document.dir = FCKLang.Dir ;
206
// Activate pasting operations.
207
if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord )
208
FCK.Events.AttachEvent( 'OnPaste', FCK.Paste ) ;
211
<script type="text/javascript">
213
window.onload = function()
217
if ( FCKBrowserInfo.IsIE )
218
FCK_PreloadImages() ;
223
function LoadToolbarSetup()
225
FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
228
function LoadToolbar()
230
var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
232
if ( oToolbarSet.IsLoaded )
236
oToolbarSet.OnLoad = StartEditor ;
237
oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
241
function StartEditor()
243
// Remove the onload listener.
244
FCK.ToolbarSet.OnLoad = null ;
246
FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
248
FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
254
function WaitForActive( editorInstance, newStatus )
256
if ( newStatus == FCK_STATUS_ACTIVE )
258
if ( FCKBrowserInfo.IsGecko )
259
FCKTools.RunFunction( window.onresize ) ;
261
_AttachFormSubmitToAPI() ;
263
FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
265
// Call the special "FCKeditor_OnComplete" function that should be present in
266
// the HTML page where the editor is located.
267
if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
268
window.parent.FCKeditor_OnComplete( FCK ) ;
272
// Gecko browsers doens't calculate well that IFRAME size so we must
273
// recalculate it every time the window size changes.
274
if ( FCKBrowserInfo.IsGecko )
276
function Window_OnResize()
278
if ( FCKBrowserInfo.IsOpera )
281
var oCell = document.getElementById( 'xEditingArea' ) ;
283
var eInnerElement = oCell.firstChild ;
286
eInnerElement.style.height = 0 ;
287
eInnerElement.style.height = oCell.scrollHeight - 2 ;
290
window.onresize = Window_OnResize ;
296
<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
297
<tr id="xToolbarRow" style="display: none">
298
<td id="xToolbarSpace" style="overflow: hidden">
299
<table width="100%" cellpadding="0" cellspacing="0">
300
<tr id="xCollapsed" style="display: none">
301
<td id="xExpandHandle" class="TB_Expand" colspan="3">
302
<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
304
<tr id="xExpanded" style="display: none">
305
<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
306
<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
307
<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
308
<td id="xToolbar" class="TB_ToolbarSet"></td>
309
<td class="TB_SideBorder" style="width: 1px"></td>
315
<td id="xEditingArea" valign="top" style="height: 100%"></td>