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
<meta http-equiv="Cache-Control" content="public" />
30
<script type="text/javascript">
32
// Instead of loading scripts and CSSs using inline tags, all scripts are
33
// loaded by code. In this way we can guarantee the correct processing order,
34
// otherwise external scripts and inline scripts could be executed in an
35
// unwanted order (IE).
37
function LoadScript( url )
39
document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '" onerror="alert(\'Error loading \' + this.src);"><\/scr' + 'ipt>' ) ;
42
function LoadCss( url )
44
document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" onerror="alert(\'Error loading \' + this.src);" />' ) ;
47
// Main editor scripts.
48
var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? 'ie' : 'gecko' ;
50
LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
52
// Base configuration file.
53
LoadScript( '../fckconfig.js' ) ;
56
<script type="text/javascript">
58
if ( FCKBrowserInfo.IsIE )
60
// Remove IE mouse flickering.
63
document.execCommand( 'BackgroundImageCache', false, true ) ;
67
// We have been reported about loading problems caused by the above
68
// line. For safety, let's just ignore errors.
71
// Create the default cleanup object used by the editor.
72
FCK.IECleanup = new FCKIECleanup( window ) ;
73
FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
74
FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
77
// The config hidden field is processed immediately, because
78
// CustomConfigurationsPath may be set in the page.
79
FCKConfig.ProcessHiddenField() ;
81
// Load the custom configurations file (if defined).
82
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
83
LoadScript( FCKConfig.CustomConfigurationsPath ) ;
86
<script type="text/javascript">
88
// Load configurations defined at page level.
89
FCKConfig_LoadPageConfig() ;
91
FCKConfig_PreProcess() ;
93
// Load the active skin CSS.
94
LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ;
96
// Load the language file.
97
FCKLanguageManager.Initialize() ;
98
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
101
<script type="text/javascript">
103
// Initialize the editing area context menu.
104
FCK_ContextMenu_Init() ;
109
<script type="text/javascript">
111
// Set the editor interface direction.
112
window.document.dir = FCKLang.Dir ;
114
// Activate pasting operations.
115
if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord )
116
FCK.Events.AttachEvent( 'OnPaste', FCK.Paste ) ;
119
<script type="text/javascript">
121
window.onload = function()
125
if ( FCKBrowserInfo.IsIE )
126
FCK_PreloadImages() ;
131
function LoadToolbarSetup()
133
FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
136
function LoadToolbar()
138
var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
140
if ( oToolbarSet.IsLoaded )
144
oToolbarSet.OnLoad = StartEditor ;
145
oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
149
function StartEditor()
151
// Remove the onload listener.
152
FCK.ToolbarSet.OnLoad = null ;
154
FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
156
FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
162
function WaitForActive( editorInstance, newStatus )
164
if ( newStatus == FCK_STATUS_ACTIVE )
166
if ( FCKBrowserInfo.IsGecko )
167
FCKTools.RunFunction( window.onresize ) ;
169
_AttachFormSubmitToAPI() ;
171
FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
173
// Call the special "FCKeditor_OnComplete" function that should be present in
174
// the HTML page where the editor is located.
175
if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
176
window.parent.FCKeditor_OnComplete( FCK ) ;
180
// Gecko browsers doens't calculate well that IFRAME size so we must
181
// recalculate it every time the window size changes.
182
if ( FCKBrowserInfo.IsGecko )
184
function Window_OnResize()
186
if ( FCKBrowserInfo.IsOpera )
189
var oCell = document.getElementById( 'xEditingArea' ) ;
191
var eInnerElement = oCell.firstChild ;
194
eInnerElement.style.height = 0 ;
195
eInnerElement.style.height = oCell.scrollHeight - 2 ;
198
window.onresize = Window_OnResize ;
204
<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
205
<tr id="xToolbarRow" style="display: none">
206
<td id="xToolbarSpace" style="overflow: hidden">
207
<table width="100%" cellpadding="0" cellspacing="0">
208
<tr id="xCollapsed" style="display: none">
209
<td id="xExpandHandle" class="TB_Expand" colspan="3">
210
<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
212
<tr id="xExpanded" style="display: none">
213
<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
214
<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
215
<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
216
<td id="xToolbar" class="TB_ToolbarSet"></td>
217
<td class="TB_SideBorder" style="width: 1px"></td>
223
<td id="xEditingArea" valign="top" style="height: 100%"></td>