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 xmlns="http://www.w3.org/1999/xhtml"> 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 + '" onerror="alert(\'Error loading \' + this.src);"><\/scr' + 'ipt>' ) ; 42} 43 44function LoadCss( url ) 45{ 46 document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" onerror="alert(\'Error loading \' + this.src);" />' ) ; 47} 48 49// Main editor scripts. 50var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? '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/internals/fck.js' ) ; 67LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ; 68LoadScript( '_source/internals/fckconfig.js' ) ; 69 70LoadScript( '_source/internals/fckdebug.js' ) ; 71LoadScript( '_source/internals/fckdomtools.js' ) ; 72LoadScript( '_source/internals/fcktools.js' ) ; 73LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ; 74LoadScript( '_source/fckeditorapi.js' ) ; 75LoadScript( '_source/classes/fckimagepreloader.js' ) ; 76LoadScript( '_source/internals/fckregexlib.js' ) ; 77LoadScript( '_source/internals/fcklistslib.js' ) ; 78LoadScript( '_source/internals/fcklanguagemanager.js' ) ; 79LoadScript( '_source/internals/fckxhtmlentities.js' ) ; 80LoadScript( '_source/internals/fckxhtml.js' ) ; 81LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ; 82LoadScript( '_source/internals/fckcodeformatter.js' ) ; 83LoadScript( '_source/internals/fckundo_' + sSuffix + '.js' ) ; 84LoadScript( '_source/classes/fckeditingarea.js' ) ; 85LoadScript( '_source/classes/fckkeystrokehandler.js' ) ; 86 87LoadScript( '_source/internals/fcklisthandler.js' ) ; 88LoadScript( '_source/classes/fckelementpath.js' ) ; 89LoadScript( '_source/classes/fckdomrange.js' ) ; 90LoadScript( '_source/classes/fckdocumentfragment_' + sSuffix + '.js' ) ; 91LoadScript( '_source/classes/fckw3crange.js' ) ; 92LoadScript( '_source/classes/fckdomrange_' + sSuffix + '.js' ) ; 93LoadScript( '_source/classes/fckenterkey.js' ) ; 94 95LoadScript( '_source/internals/fckdocumentprocessor.js' ) ; 96LoadScript( '_source/internals/fckselection.js' ) ; 97LoadScript( '_source/internals/fckselection_' + sSuffix + '.js' ) ; 98 99LoadScript( '_source/internals/fcktablehandler.js' ) ; 100LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ; 101LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ; 102LoadScript( '_source/classes/fckstyledef.js' ) ; 103LoadScript( '_source/classes/fckstyledef_' + sSuffix + '.js' ) ; 104LoadScript( '_source/classes/fckstylesloader.js' ) ; 105 106LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ; 107LoadScript( '_source/commandclasses/fck_othercommands.js' ) ; 108LoadScript( '_source/commandclasses/fckspellcheckcommand_' + sSuffix + '.js' ) ; 109LoadScript( '_source/commandclasses/fcktextcolorcommand.js' ) ; 110LoadScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ; 111LoadScript( '_source/commandclasses/fckpastewordcommand.js' ) ; 112LoadScript( '_source/commandclasses/fcktablecommand.js' ) ; 113LoadScript( '_source/commandclasses/fckstylecommand.js' ) ; 114LoadScript( '_source/commandclasses/fckfitwindow.js' ) ; 115LoadScript( '_source/internals/fckcommands.js' ) ; 116 117LoadScript( '_source/classes/fckpanel.js' ) ; 118LoadScript( '_source/classes/fckicon.js' ) ; 119LoadScript( '_source/classes/fcktoolbarbuttonui.js' ) ; 120LoadScript( '_source/classes/fcktoolbarbutton.js' ) ; 121LoadScript( '_source/classes/fckspecialcombo.js' ) ; 122LoadScript( '_source/classes/fcktoolbarspecialcombo.js' ) ; 123LoadScript( '_source/classes/fcktoolbarfontscombo.js' ) ; 124LoadScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ; 125LoadScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ; 126LoadScript( '_source/classes/fcktoolbarstylecombo.js' ) ; 127LoadScript( '_source/classes/fcktoolbarpanelbutton.js' ) ; 128LoadScript( '_source/internals/fcktoolbaritems.js' ) ; 129LoadScript( '_source/classes/fcktoolbar.js' ) ; 130LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ; 131LoadScript( '_source/internals/fcktoolbarset.js' ) ; 132LoadScript( '_source/internals/fckdialog.js' ) ; 133LoadScript( '_source/internals/fckdialog_' + sSuffix + '.js' ) ; 134LoadScript( '_source/classes/fckmenuitem.js' ) ; 135LoadScript( '_source/classes/fckmenublock.js' ) ; 136LoadScript( '_source/classes/fckmenublockpanel.js' ) ; 137LoadScript( '_source/classes/fckcontextmenu.js' ) ; 138LoadScript( '_source/internals/fck_contextmenu.js' ) ; 139LoadScript( '_source/classes/fckplugin.js' ) ; 140LoadScript( '_source/internals/fckplugins.js' ) ; 141 142// @Packager.Remove.End 143 144// Base configuration file. 145LoadScript( '../fckconfig.js' ) ; 146 147 </script> 148 <script type="text/javascript"> 149 150if ( FCKBrowserInfo.IsIE ) 151{ 152 // Remove IE mouse flickering. 153 try 154 { 155 document.execCommand( 'BackgroundImageCache', false, true ) ; 156 } 157 catch (e) 158 { 159 // We have been reported about loading problems caused by the above 160 // line. For safety, let's just ignore errors. 161 } 162 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 ) ; 167} 168 169// The config hidden field is processed immediately, because 170// CustomConfigurationsPath may be set in the page. 171FCKConfig.ProcessHiddenField() ; 172 173// Load the custom configurations file (if defined). 174if ( FCKConfig.CustomConfigurationsPath.length > 0 ) 175 LoadScript( FCKConfig.CustomConfigurationsPath ) ; 176 177 </script> 178 <script type="text/javascript"> 179 180// Load configurations defined at page level. 181FCKConfig_LoadPageConfig() ; 182 183FCKConfig_PreProcess() ; 184 185// Load the active skin CSS. 186LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ; 187 188// Load the language file. 189FCKLanguageManager.Initialize() ; 190LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ; 191 192 </script> 193 <script type="text/javascript"> 194 195// Initialize the editing area context menu. 196FCK_ContextMenu_Init() ; 197 198FCKPlugins.Load() ; 199 200 </script> 201 <script type="text/javascript"> 202 203// Set the editor interface direction. 204window.document.dir = FCKLang.Dir ; 205 206// Activate pasting operations. 207if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord ) 208 FCK.Events.AttachEvent( 'OnPaste', FCK.Paste ) ; 209 210 </script> 211 <script type="text/javascript"> 212 213window.onload = function() 214{ 215 InitializeAPI() ; 216 217 if ( FCKBrowserInfo.IsIE ) 218 FCK_PreloadImages() ; 219 else 220 LoadToolbarSetup() ; 221} 222 223function LoadToolbarSetup() 224{ 225 FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ; 226} 227 228function LoadToolbar() 229{ 230 var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ; 231 232 if ( oToolbarSet.IsLoaded ) 233 StartEditor() ; 234 else 235 { 236 oToolbarSet.OnLoad = StartEditor ; 237 oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ; 238 } 239} 240 241function StartEditor() 242{ 243 // Remove the onload listener. 244 FCK.ToolbarSet.OnLoad = null ; 245 246 FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ; 247 248 FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ; 249 250 // Start the editor. 251 FCK.StartEditor() ; 252} 253 254function WaitForActive( editorInstance, newStatus ) 255{ 256 if ( newStatus == FCK_STATUS_ACTIVE ) 257 { 258 if ( FCKBrowserInfo.IsGecko ) 259 FCKTools.RunFunction( window.onresize ) ; 260 261 _AttachFormSubmitToAPI() ; 262 263 FCK.SetStatus( FCK_STATUS_COMPLETE ) ; 264 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 ) ; 269 } 270} 271 272// Gecko browsers doens't calculate well that IFRAME size so we must 273// recalculate it every time the window size changes. 274if ( FCKBrowserInfo.IsGecko ) 275{ 276 function Window_OnResize() 277 { 278 if ( FCKBrowserInfo.IsOpera ) 279 return ; 280 281 var oCell = document.getElementById( 'xEditingArea' ) ; 282 283 var eInnerElement = oCell.firstChild ; 284 if ( eInnerElement ) 285 { 286 eInnerElement.style.height = 0 ; 287 eInnerElement.style.height = oCell.scrollHeight - 2 ; 288 } 289 } 290 window.onresize = Window_OnResize ; 291} 292 293 </script> 294</head> 295<body> 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> 303 </tr> 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> 310 </tr> 311 </table> 312 </td> 313 </tr> 314 <tr> 315 <td id="xEditingArea" valign="top" style="height: 100%"></td> 316 </tr> 317 </table> 318</body> 319</html> 320