1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
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 * Main page that holds the editor.
23-->
24<html>
25<head>
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">
33
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).
38
39function LoadScript( url )
40{
41	document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ;
42}
43
44function LoadCss( url )
45{
46	document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" />' ) ;
47}
48
49// Main editor scripts.
50var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ;
51
52/* @Packager.RemoveLine
53LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
54@Packager.RemoveLine */
55// @Packager.Remove.Start
56
57LoadScript( '_source/fckconstants.js' ) ;
58LoadScript( '_source/fckjscoreextensions.js' ) ;
59
60if ( sSuffix == 'ie' )
61	LoadScript( '_source/classes/fckiecleanup.js' ) ;
62
63LoadScript( '_source/internals/fckbrowserinfo.js' ) ;
64LoadScript( '_source/internals/fckurlparams.js' ) ;
65LoadScript( '_source/classes/fckevents.js' ) ;
66LoadScript( '_source/classes/fckdataprocessor.js' ) ;
67LoadScript( '_source/internals/fck.js' ) ;
68LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ;
69LoadScript( '_source/internals/fckconfig.js' ) ;
70
71LoadScript( '_source/internals/fckdebug.js' ) ;
72LoadScript( '_source/internals/fckdomtools.js' ) ;
73LoadScript( '_source/internals/fcktools.js' ) ;
74LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;
75LoadScript( '_source/fckeditorapi.js' ) ;
76LoadScript( '_source/classes/fckimagepreloader.js' ) ;
77LoadScript( '_source/internals/fckregexlib.js' ) ;
78LoadScript( '_source/internals/fcklistslib.js' ) ;
79LoadScript( '_source/internals/fcklanguagemanager.js' ) ;
80LoadScript( '_source/internals/fckxhtmlentities.js' ) ;
81LoadScript( '_source/internals/fckxhtml.js' ) ;
82LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ;
83LoadScript( '_source/internals/fckcodeformatter.js' ) ;
84LoadScript( '_source/internals/fckundo.js' ) ;
85LoadScript( '_source/classes/fckeditingarea.js' ) ;
86LoadScript( '_source/classes/fckkeystrokehandler.js' ) ;
87
88LoadScript( 'dtd/fck_xhtml10transitional.js' ) ;
89LoadScript( '_source/classes/fckstyle.js' ) ;
90LoadScript( '_source/internals/fckstyles.js' ) ;
91
92LoadScript( '_source/internals/fcklisthandler.js' ) ;
93LoadScript( '_source/classes/fckelementpath.js' ) ;
94LoadScript( '_source/classes/fckdomrange.js' ) ;
95LoadScript( '_source/classes/fckdocumentfragment_' + sSuffix + '.js' ) ;
96LoadScript( '_source/classes/fckw3crange.js' ) ;
97LoadScript( '_source/classes/fckdomrange_' + sSuffix + '.js' ) ;
98LoadScript( '_source/classes/fckdomrangeiterator.js' ) ;
99LoadScript( '_source/classes/fckenterkey.js' ) ;
100
101LoadScript( '_source/internals/fckdocumentprocessor.js' ) ;
102LoadScript( '_source/internals/fckselection.js' ) ;
103LoadScript( '_source/internals/fckselection_' + sSuffix + '.js' ) ;
104
105LoadScript( '_source/internals/fcktablehandler.js' ) ;
106LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ;
107LoadScript( '_source/classes/fckxml.js' ) ;
108LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ;
109
110LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ;
111LoadScript( '_source/commandclasses/fckstylecommand.js' ) ;
112LoadScript( '_source/commandclasses/fck_othercommands.js' ) ;
113LoadScript( '_source/commandclasses/fckshowblocks.js' ) ;
114LoadScript( '_source/commandclasses/fckspellcheckcommand_' + sSuffix + '.js' ) ;
115LoadScript( '_source/commandclasses/fcktextcolorcommand.js' ) ;
116LoadScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ;
117LoadScript( '_source/commandclasses/fckpastewordcommand.js' ) ;
118LoadScript( '_source/commandclasses/fcktablecommand.js' ) ;
119LoadScript( '_source/commandclasses/fckfitwindow.js' ) ;
120LoadScript( '_source/commandclasses/fcklistcommands.js' ) ;
121LoadScript( '_source/commandclasses/fckjustifycommands.js' ) ;
122LoadScript( '_source/commandclasses/fckindentcommands.js' ) ;
123LoadScript( '_source/commandclasses/fckblockquotecommand.js' ) ;
124LoadScript( '_source/commandclasses/fckcorestylecommand.js' ) ;
125LoadScript( '_source/commandclasses/fckremoveformatcommand.js' ) ;
126LoadScript( '_source/internals/fckcommands.js' ) ;
127
128LoadScript( '_source/classes/fckpanel.js' ) ;
129LoadScript( '_source/classes/fckicon.js' ) ;
130LoadScript( '_source/classes/fcktoolbarbuttonui.js' ) ;
131LoadScript( '_source/classes/fcktoolbarbutton.js' ) ;
132LoadScript( '_source/classes/fckspecialcombo.js' ) ;
133LoadScript( '_source/classes/fcktoolbarspecialcombo.js' ) ;
134LoadScript( '_source/classes/fcktoolbarstylecombo.js' ) ;
135LoadScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ;
136LoadScript( '_source/classes/fcktoolbarfontscombo.js' ) ;
137LoadScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ;
138LoadScript( '_source/classes/fcktoolbarpanelbutton.js' ) ;
139LoadScript( '_source/internals/fcktoolbaritems.js' ) ;
140LoadScript( '_source/classes/fcktoolbar.js' ) ;
141LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ;
142LoadScript( '_source/internals/fcktoolbarset.js' ) ;
143LoadScript( '_source/internals/fckdialog.js' ) ;
144LoadScript( '_source/internals/fckdialog_' + sSuffix + '.js' ) ;
145LoadScript( '_source/classes/fckmenuitem.js' ) ;
146LoadScript( '_source/classes/fckmenublock.js' ) ;
147LoadScript( '_source/classes/fckmenublockpanel.js' ) ;
148LoadScript( '_source/classes/fckcontextmenu.js' ) ;
149LoadScript( '_source/internals/fck_contextmenu.js' ) ;
150LoadScript( '_source/classes/fckplugin.js' ) ;
151LoadScript( '_source/internals/fckplugins.js' ) ;
152
153// @Packager.Remove.End
154
155// Base configuration file.
156LoadScript( '../fckconfig.js' ) ;
157
158	</script>
159	<script type="text/javascript">
160
161if ( FCKBrowserInfo.IsIE )
162{
163	// Remove IE mouse flickering.
164	try
165	{
166		document.execCommand( 'BackgroundImageCache', false, true ) ;
167	}
168	catch (e)
169	{
170		// We have been reported about loading problems caused by the above
171		// line. For safety, let's just ignore errors.
172	}
173
174	// Create the default cleanup object used by the editor.
175	FCK.IECleanup = new FCKIECleanup( window ) ;
176	FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
177	FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
178}
179
180// The first function to be called on selection change must the the styles
181// change checker, because the result of its processing may be used by another
182// functions listening to the same event.
183FCK.Events.AttachEvent( 'OnSelectionChange', function() { FCKStyles.CheckSelectionChanges() ; } ) ;
184
185// The config hidden field is processed immediately, because
186// CustomConfigurationsPath may be set in the page.
187FCKConfig.ProcessHiddenField() ;
188
189// Load the custom configurations file (if defined).
190if ( FCKConfig.CustomConfigurationsPath.length > 0 )
191	LoadScript( FCKConfig.CustomConfigurationsPath ) ;
192
193	</script>
194	<script type="text/javascript">
195
196// Load configurations defined at page level.
197FCKConfig_LoadPageConfig() ;
198
199FCKConfig_PreProcess() ;
200
201// Load the active skin CSS.
202LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ;
203
204// Load the language file.
205FCKLanguageManager.Initialize() ;
206LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
207
208	</script>
209	<script type="text/javascript">
210
211// Initialize the editing area context menu.
212FCK_ContextMenu_Init() ;
213
214FCKPlugins.Load() ;
215
216	</script>
217	<script type="text/javascript">
218
219// Set the editor interface direction.
220window.document.dir = FCKLang.Dir ;
221
222	</script>
223	<script type="text/javascript">
224
225window.onload = function()
226{
227	InitializeAPI() ;
228
229	if ( FCKBrowserInfo.IsIE )
230		FCK_PreloadImages() ;
231	else
232		LoadToolbarSetup() ;
233}
234
235function LoadToolbarSetup()
236{
237	FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
238}
239
240function LoadToolbar()
241{
242	var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
243
244	if ( oToolbarSet.IsLoaded )
245		StartEditor() ;
246	else
247	{
248		oToolbarSet.OnLoad = StartEditor ;
249		oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
250	}
251}
252
253function StartEditor()
254{
255	// Remove the onload listener.
256	FCK.ToolbarSet.OnLoad = null ;
257
258	FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
259
260	FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
261
262	// Start the editor.
263	FCK.StartEditor() ;
264}
265
266function WaitForActive( editorInstance, newStatus )
267{
268	if ( newStatus == FCK_STATUS_ACTIVE )
269	{
270		if ( FCKBrowserInfo.IsGecko )
271			FCKTools.RunFunction( window.onresize ) ;
272
273		_AttachFormSubmitToAPI() ;
274
275		FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
276
277		// Call the special "FCKeditor_OnComplete" function that should be present in
278		// the HTML page where the editor is located.
279		if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
280			window.parent.FCKeditor_OnComplete( FCK ) ;
281	}
282}
283
284// Gecko browsers doens't calculate well that IFRAME size so we must
285// recalculate it every time the window size changes.
286if ( FCKBrowserInfo.IsGecko )
287{
288	function Window_OnResize()
289	{
290		if ( FCKBrowserInfo.IsOpera )
291			return ;
292
293		var oCell = document.getElementById( 'xEditingArea' ) ;
294
295		var eInnerElement = oCell.firstChild ;
296		if ( eInnerElement )
297		{
298			eInnerElement.style.height = 0 ;
299			eInnerElement.style.height = oCell.scrollHeight - 2 ;
300		}
301	}
302	window.onresize = Window_OnResize ;
303}
304
305	</script>
306</head>
307<body>
308	<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
309		<tr id="xToolbarRow" style="display: none">
310			<td id="xToolbarSpace" style="overflow: hidden">
311				<table width="100%" cellpadding="0" cellspacing="0">
312					<tr id="xCollapsed" style="display: none">
313						<td id="xExpandHandle" class="TB_Expand" colspan="3">
314							<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
315					</tr>
316					<tr id="xExpanded" style="display: none">
317						<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
318						<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
319							<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
320						<td id="xToolbar" class="TB_ToolbarSet"></td>
321						<td class="TB_SideBorder" style="width: 1px"></td>
322					</tr>
323				</table>
324			</td>
325		</tr>
326		<tr>
327			<td id="xEditingArea" valign="top" style="height: 100%"></td>
328		</tr>
329	</table>
330</body>
331</html>
332