1075 |
ddelon |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
2 |
<!--
|
|
|
3 |
* FCKeditor - The text editor for internet
|
|
|
4 |
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
|
|
5 |
*
|
|
|
6 |
* Licensed under the terms of the GNU Lesser General Public License:
|
|
|
7 |
* http://www.opensource.org/licenses/lgpl-license.php
|
|
|
8 |
*
|
|
|
9 |
* For further information visit:
|
|
|
10 |
* http://www.fckeditor.net/
|
|
|
11 |
*
|
|
|
12 |
* "Support Open Source software. What about a donation today?"
|
|
|
13 |
*
|
|
|
14 |
* File Name: fckeditor.html
|
|
|
15 |
* Main page that holds the editor.
|
|
|
16 |
*
|
|
|
17 |
* File Authors:
|
|
|
18 |
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
|
|
19 |
-->
|
|
|
20 |
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
21 |
<head>
|
|
|
22 |
<title>FCKeditor</title>
|
|
|
23 |
<meta name="robots" content="noindex, nofollow" />
|
|
|
24 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
25 |
<meta http-equiv="Cache-Control" content="public" />
|
|
|
26 |
<script type="text/javascript">
|
|
|
27 |
|
|
|
28 |
// Instead of loading scripts and CSSs using inline tags, all scripts are
|
|
|
29 |
// loaded by code. In this way we can guarantee the correct processing order,
|
|
|
30 |
// otherwise external scripts and inline scripts could be executed in an
|
|
|
31 |
// unwanted order (IE).
|
|
|
32 |
|
|
|
33 |
function LoadScript( url )
|
|
|
34 |
{
|
|
|
35 |
document.write( '<script type="text/javascript" src="' + url + '" onerror="alert(\'Error loading \' + this.src);"><\/script>' ) ;
|
|
|
36 |
}
|
|
|
37 |
|
|
|
38 |
function LoadCss( url )
|
|
|
39 |
{
|
|
|
40 |
document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" onerror="alert(\'Error loading \' + this.src);" />' ) ;
|
|
|
41 |
}
|
|
|
42 |
|
|
|
43 |
// Main editor scripts.
|
|
|
44 |
var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? 'ie' : 'gecko' ;
|
|
|
45 |
|
|
|
46 |
LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
|
|
|
47 |
|
|
|
48 |
// Base configuration file.
|
|
|
49 |
LoadScript( '../fckconfig.js' ) ;
|
|
|
50 |
|
|
|
51 |
</script>
|
|
|
52 |
<script type="text/javascript">
|
|
|
53 |
|
|
|
54 |
// Create the default cleanup object used by the editor.
|
|
|
55 |
if ( FCKBrowserInfo.IsIE )
|
|
|
56 |
{
|
|
|
57 |
FCK.IECleanup = new FCKIECleanup( window ) ;
|
|
|
58 |
FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
|
|
|
59 |
FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
|
|
|
60 |
}
|
|
|
61 |
|
|
|
62 |
// The config hidden field is processed immediately, because
|
|
|
63 |
// CustomConfigurationsPath may be set in the page.
|
|
|
64 |
FCKConfig.ProcessHiddenField() ;
|
|
|
65 |
|
|
|
66 |
// Load the custom configurations file (if defined).
|
|
|
67 |
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
|
|
|
68 |
LoadScript( FCKConfig.CustomConfigurationsPath ) ;
|
|
|
69 |
|
|
|
70 |
</script>
|
|
|
71 |
<script type="text/javascript">
|
|
|
72 |
|
|
|
73 |
// Load configurations defined at page level.
|
|
|
74 |
FCKConfig_LoadPageConfig() ;
|
|
|
75 |
|
|
|
76 |
FCKConfig_PreProcess() ;
|
|
|
77 |
|
|
|
78 |
// Load the active skin CSS.
|
|
|
79 |
LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ;
|
|
|
80 |
|
|
|
81 |
// Load the language file.
|
|
|
82 |
FCKLanguageManager.Initialize() ;
|
|
|
83 |
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
|
|
|
84 |
|
|
|
85 |
</script>
|
|
|
86 |
<script type="text/javascript">
|
|
|
87 |
|
|
|
88 |
// Initialize the editing area context menu.
|
|
|
89 |
FCK_ContextMenu_Init() ;
|
|
|
90 |
|
|
|
91 |
FCKPlugins.Load() ;
|
|
|
92 |
|
|
|
93 |
</script>
|
|
|
94 |
<script type="text/javascript">
|
|
|
95 |
|
|
|
96 |
// Set the editor interface direction.
|
|
|
97 |
window.document.dir = FCKLang.Dir ;
|
|
|
98 |
|
|
|
99 |
// Activate pasting operations.
|
|
|
100 |
if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord )
|
|
|
101 |
FCK.Events.AttachEvent( "OnPaste", FCK.Paste ) ;
|
|
|
102 |
|
|
|
103 |
</script>
|
|
|
104 |
<script type="text/javascript">
|
|
|
105 |
|
|
|
106 |
window.onload = function()
|
|
|
107 |
{
|
|
|
108 |
InitializeAPI() ;
|
|
|
109 |
|
|
|
110 |
if ( FCKBrowserInfo.IsIE )
|
|
|
111 |
FCK_PreloadImages() ;
|
|
|
112 |
else
|
|
|
113 |
LoadToolbarSetup() ;
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
function LoadToolbarSetup()
|
|
|
117 |
{
|
|
|
118 |
FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
|
|
|
119 |
}
|
|
|
120 |
|
|
|
121 |
function LoadToolbar()
|
|
|
122 |
{
|
|
|
123 |
var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
|
|
|
124 |
|
|
|
125 |
if ( oToolbarSet.IsLoaded )
|
|
|
126 |
StartEditor() ;
|
|
|
127 |
else
|
|
|
128 |
{
|
|
|
129 |
oToolbarSet.OnLoad = StartEditor ;
|
|
|
130 |
oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
|
|
|
131 |
}
|
|
|
132 |
}
|
|
|
133 |
|
|
|
134 |
function StartEditor()
|
|
|
135 |
{
|
|
|
136 |
// Remove the onload listener.
|
|
|
137 |
FCK.ToolbarSet.OnLoad = null ;
|
|
|
138 |
|
|
|
139 |
FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
|
|
|
140 |
|
|
|
141 |
FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
|
|
|
142 |
|
|
|
143 |
// Start the editor.
|
|
|
144 |
FCK.StartEditor() ;
|
|
|
145 |
}
|
|
|
146 |
|
|
|
147 |
function WaitForActive( editorInstance, newStatus )
|
|
|
148 |
{
|
|
|
149 |
if ( newStatus == FCK_STATUS_ACTIVE )
|
|
|
150 |
{
|
|
|
151 |
if ( FCKBrowserInfo.IsGecko )
|
|
|
152 |
FCKTools.RunFunction( window.onresize ) ;
|
|
|
153 |
|
|
|
154 |
FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
|
|
|
155 |
|
|
|
156 |
// Call the special "FCKeditor_OnComplete" function that should be present in
|
|
|
157 |
// the HTML page where the editor is located.
|
|
|
158 |
if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
|
|
|
159 |
window.parent.FCKeditor_OnComplete( FCK ) ;
|
|
|
160 |
}
|
|
|
161 |
}
|
|
|
162 |
|
|
|
163 |
// Gecko browsers doens't calculate well that IFRAME size so we must
|
|
|
164 |
// recalculate it every time the window size changes.
|
|
|
165 |
if ( FCKBrowserInfo.IsGecko )
|
|
|
166 |
{
|
|
|
167 |
function Window_OnResize()
|
|
|
168 |
{
|
|
|
169 |
if ( FCKBrowserInfo.IsOpera )
|
|
|
170 |
return ;
|
|
|
171 |
|
|
|
172 |
var oCell = document.getElementById( 'xEditingArea' ) ;
|
|
|
173 |
|
|
|
174 |
var eInnerElement ;
|
|
|
175 |
if ( eInnerElement = oCell.firstChild )
|
|
|
176 |
{
|
|
|
177 |
eInnerElement.style.height = 0 ;
|
|
|
178 |
eInnerElement.style.height = oCell.scrollHeight - 2 ;
|
|
|
179 |
}
|
|
|
180 |
}
|
|
|
181 |
window.onresize = Window_OnResize ;
|
|
|
182 |
}
|
|
|
183 |
|
|
|
184 |
</script>
|
|
|
185 |
</head>
|
|
|
186 |
<body>
|
|
|
187 |
<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
|
|
|
188 |
<tr id="xToolbarRow" style="display: none">
|
|
|
189 |
<td id="xToolbarSpace" style="overflow: hidden">
|
|
|
190 |
<table width="100%" cellpadding="0" cellspacing="0">
|
|
|
191 |
<tr id="xCollapsed" style="display: none">
|
|
|
192 |
<td id="xExpandHandle" class="TB_Expand" colspan="3">
|
|
|
193 |
<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
|
|
|
194 |
</tr>
|
|
|
195 |
<tr id="xExpanded" style="display: none">
|
|
|
196 |
<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
|
|
|
197 |
<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
|
|
|
198 |
<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
|
|
|
199 |
<td id="xToolbar" class="TB_ToolbarSet"></td>
|
|
|
200 |
<td class="TB_SideBorder" style="width: 1px"></td>
|
|
|
201 |
</tr>
|
|
|
202 |
</table>
|
|
|
203 |
</td>
|
|
|
204 |
</tr>
|
|
|
205 |
<tr style="height: 100%">
|
|
|
206 |
<td id="xEditingArea" valign="top"></td>
|
|
|
207 |
</tr>
|
|
|
208 |
</table>
|
|
|
209 |
</body>
|
|
|
210 |
</html>
|