summaryrefslogtreecommitdiff
path: root/httemplate/elements/fckeditor/editor/fckeditor.original.html
blob: 846eed991d1f65f6b51be68afb424ad31796ca26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END LICENSE ==
 *
 * Main page that holds the editor.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>FCKeditor</title>
	<meta name="robots" content="noindex, nofollow" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<!-- @Packager.RemoveLine
	<meta http-equiv="Cache-Control" content="public" />
	@Packager.RemoveLine -->
	<script type="text/javascript">

// Instead of loading scripts and CSSs using inline tags, all scripts are
// loaded by code. In this way we can guarantee the correct processing order,
// otherwise external scripts and inline scripts could be executed in an
// unwanted order (IE).

function LoadScript( url )
{
	document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '" onerror="alert(\'Error loading \' + this.src);"><\/scr' + 'ipt>' ) ;
}

function LoadCss( url )
{
	document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" onerror="alert(\'Error loading \' + this.src);" />' ) ;
}

// Main editor scripts.
var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? 'ie' : 'gecko' ;

/* @Packager.RemoveLine
LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
@Packager.RemoveLine */
// @Packager.Remove.Start

LoadScript( '_source/fckconstants.js' ) ;
LoadScript( '_source/fckjscoreextensions.js' ) ;

if ( sSuffix == 'ie' )
	LoadScript( '_source/classes/fckiecleanup.js' ) ;

LoadScript( '_source/internals/fckbrowserinfo.js' ) ;
LoadScript( '_source/internals/fckurlparams.js' ) ;
LoadScript( '_source/classes/fckevents.js' ) ;
LoadScript( '_source/internals/fck.js' ) ;
LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ;
LoadScript( '_source/internals/fckconfig.js' ) ;

LoadScript( '_source/internals/fckdebug.js' ) ;
LoadScript( '_source/internals/fckdomtools.js' ) ;
LoadScript( '_source/internals/fcktools.js' ) ;
LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;
LoadScript( '_source/fckeditorapi.js' ) ;
LoadScript( '_source/classes/fckimagepreloader.js' ) ;
LoadScript( '_source/internals/fckregexlib.js' ) ;
LoadScript( '_source/internals/fcklistslib.js' ) ;
LoadScript( '_source/internals/fcklanguagemanager.js' ) ;
LoadScript( '_source/internals/fckxhtmlentities.js' ) ;
LoadScript( '_source/internals/fckxhtml.js' ) ;
LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ;
LoadScript( '_source/internals/fckcodeformatter.js' ) ;
LoadScript( '_source/internals/fckundo_' + sSuffix + '.js' ) ;
LoadScript( '_source/classes/fckeditingarea.js' ) ;
LoadScript( '_source/classes/fckkeystrokehandler.js' ) ;

LoadScript( '_source/internals/fcklisthandler.js' ) ;
LoadScript( '_source/classes/fckelementpath.js' ) ;
LoadScript( '_source/classes/fckdomrange.js' ) ;
LoadScript( '_source/classes/fckdocumentfragment_' + sSuffix + '.js' ) ;
LoadScript( '_source/classes/fckw3crange.js' ) ;
LoadScript( '_source/classes/fckdomrange_' + sSuffix + '.js' ) ;
LoadScript( '_source/classes/fckenterkey.js' ) ;

LoadScript( '_source/internals/fckdocumentprocessor.js' ) ;
LoadScript( '_source/internals/fckselection.js' ) ;
LoadScript( '_source/internals/fckselection_' + sSuffix + '.js' ) ;

LoadScript( '_source/internals/fcktablehandler.js' ) ;
LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ;
LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ;
LoadScript( '_source/classes/fckstyledef.js' ) ;
LoadScript( '_source/classes/fckstyledef_' + sSuffix + '.js' ) ;
LoadScript( '_source/classes/fckstylesloader.js' ) ;

LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ;
LoadScript( '_source/commandclasses/fck_othercommands.js' ) ;
LoadScript( '_source/commandclasses/fckspellcheckcommand_' + sSuffix + '.js' ) ;
LoadScript( '_source/commandclasses/fcktextcolorcommand.js' ) ;
LoadScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ;
LoadScript( '_source/commandclasses/fckpastewordcommand.js' ) ;
LoadScript( '_source/commandclasses/fcktablecommand.js' ) ;
LoadScript( '_source/commandclasses/fckstylecommand.js' ) ;
LoadScript( '_source/commandclasses/fckfitwindow.js' ) ;
LoadScript( '_source/internals/fckcommands.js' ) ;

LoadScript( '_source/classes/fckpanel.js' ) ;
LoadScript( '_source/classes/fckicon.js' ) ;
LoadScript( '_source/classes/fcktoolbarbuttonui.js' ) ;
LoadScript( '_source/classes/fcktoolbarbutton.js' ) ;
LoadScript( '_source/classes/fckspecialcombo.js' ) ;
LoadScript( '_source/classes/fcktoolbarspecialcombo.js' ) ;
LoadScript( '_source/classes/fcktoolbarfontscombo.js' ) ;
LoadScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ;
LoadScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ;
LoadScript( '_source/classes/fcktoolbarstylecombo.js' ) ;
LoadScript( '_source/classes/fcktoolbarpanelbutton.js' ) ;
LoadScript( '_source/internals/fcktoolbaritems.js' ) ;
LoadScript( '_source/classes/fcktoolbar.js' ) ;
LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ;
LoadScript( '_source/internals/fcktoolbarset.js' ) ;
LoadScript( '_source/internals/fckdialog.js' ) ;
LoadScript( '_source/internals/fckdialog_' + sSuffix + '.js' ) ;
LoadScript( '_source/classes/fckmenuitem.js' ) ;
LoadScript( '_source/classes/fckmenublock.js' ) ;
LoadScript( '_source/classes/fckmenublockpanel.js' ) ;
LoadScript( '_source/classes/fckcontextmenu.js' ) ;
LoadScript( '_source/internals/fck_contextmenu.js' ) ;
LoadScript( '_source/classes/fckplugin.js' ) ;
LoadScript( '_source/internals/fckplugins.js' ) ;

// @Packager.Remove.End

// Base configuration file.
LoadScript( '../fckconfig.js' ) ;

	</script>
	<script type="text/javascript">

if ( FCKBrowserInfo.IsIE )
{
	// Remove IE mouse flickering.
	try
	{
		document.execCommand( 'BackgroundImageCache', false, true ) ;
	}
	catch (e)
	{
		// We have been reported about loading problems caused by the above
		// line. For safety, let's just ignore errors.
	}

	// Create the default cleanup object used by the editor.
	FCK.IECleanup = new FCKIECleanup( window ) ;
	FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
	FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
}

// The config hidden field is processed immediately, because
// CustomConfigurationsPath may be set in the page.
FCKConfig.ProcessHiddenField() ;

// Load the custom configurations file (if defined).
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
	LoadScript( FCKConfig.CustomConfigurationsPath ) ;

	</script>
	<script type="text/javascript">

// Load configurations defined at page level.
FCKConfig_LoadPageConfig() ;

FCKConfig_PreProcess() ;

// Load the active skin CSS.
LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ;

// Load the language file.
FCKLanguageManager.Initialize() ;
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;

	</script>
	<script type="text/javascript">

// Initialize the editing area context menu.
FCK_ContextMenu_Init() ;

FCKPlugins.Load() ;

	</script>
	<script type="text/javascript">

// Set the editor interface direction.
window.document.dir = FCKLang.Dir ;

// Activate pasting operations.
if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord )
	FCK.Events.AttachEvent( 'OnPaste', FCK.Paste ) ;

	</script>
	<script type="text/javascript">

window.onload = function()
{
	InitializeAPI() ;

	if ( FCKBrowserInfo.IsIE )
		FCK_PreloadImages() ;
	else
		LoadToolbarSetup() ;
}

function LoadToolbarSetup()
{
	FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
}

function LoadToolbar()
{
	var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;

	if ( oToolbarSet.IsLoaded )
		StartEditor() ;
	else
	{
		oToolbarSet.OnLoad = StartEditor ;
		oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
	}
}

function StartEditor()
{
	// Remove the onload listener.
	FCK.ToolbarSet.OnLoad = null ;

	FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;

	FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;

	// Start the editor.
	FCK.StartEditor() ;
}

function WaitForActive( editorInstance, newStatus )
{
	if ( newStatus == FCK_STATUS_ACTIVE )
	{
		if ( FCKBrowserInfo.IsGecko )
			FCKTools.RunFunction( window.onresize ) ;

		_AttachFormSubmitToAPI() ;

		FCK.SetStatus( FCK_STATUS_COMPLETE ) ;

		// Call the special "FCKeditor_OnComplete" function that should be present in
		// the HTML page where the editor is located.
		if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
			window.parent.FCKeditor_OnComplete( FCK ) ;
	}
}

// Gecko browsers doens't calculate well that IFRAME size so we must
// recalculate it every time the window size changes.
if ( FCKBrowserInfo.IsGecko )
{
	function Window_OnResize()
	{
		if ( FCKBrowserInfo.IsOpera )
			return ;

		var oCell = document.getElementById( 'xEditingArea' ) ;

		var eInnerElement = oCell.firstChild ;
		if ( eInnerElement )
		{
			eInnerElement.style.height = 0 ;
			eInnerElement.style.height = oCell.scrollHeight - 2 ;
		}
	}
	window.onresize = Window_OnResize ;
}

	</script>
</head>
<body>
	<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
		<tr id="xToolbarRow" style="display: none">
			<td id="xToolbarSpace" style="overflow: hidden">
				<table width="100%" cellpadding="0" cellspacing="0">
					<tr id="xCollapsed" style="display: none">
						<td id="xExpandHandle" class="TB_Expand" colspan="3">
							<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
					</tr>
					<tr id="xExpanded" style="display: none">
						<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
						<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
							<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
						<td id="xToolbar" class="TB_ToolbarSet"></td>
						<td class="TB_SideBorder" style="width: 1px"></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td id="xEditingArea" valign="top" style="height: 100%"></td>
		</tr>
	</table>
</body>
</html>