[903] | 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.original.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 | <!-- @Packager.RemoveLine |
---|
| 26 | <meta http-equiv="Cache-Control" content="public" /> |
---|
| 27 | @Packager.RemoveLine --> |
---|
| 28 | <script type="text/javascript"> |
---|
| 29 | |
---|
| 30 | // Instead of loading scripts and CSSs using inline tags, all scripts are |
---|
| 31 | // loaded by code. In this way we can guarantee the correct processing order, |
---|
| 32 | // otherwise external scripts and inline scripts could be executed in an |
---|
| 33 | // unwanted order (IE). |
---|
| 34 | |
---|
| 35 | function LoadScript( url ) |
---|
| 36 | { |
---|
| 37 | document.write( '<script type="text/javascript" src="' + url + '" onerror="alert(\'Error loading \' + this.src);"><\/script>' ) ; |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | function LoadCss( url ) |
---|
| 41 | { |
---|
| 42 | document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" onerror="alert(\'Error loading \' + this.src);" />' ) ; |
---|
| 43 | } |
---|
| 44 | |
---|
| 45 | // Main editor scripts. |
---|
| 46 | var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? 'ie' : 'gecko' ; |
---|
| 47 | |
---|
| 48 | /* @Packager.RemoveLine |
---|
| 49 | LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ; |
---|
| 50 | @Packager.RemoveLine */ |
---|
| 51 | // @Packager.Remove.Start |
---|
| 52 | |
---|
| 53 | LoadScript( '_source/fckconstants.js' ) ; |
---|
| 54 | LoadScript( '_source/fckjscoreextensions.js' ) ; |
---|
| 55 | |
---|
| 56 | if ( sSuffix == 'ie' ) |
---|
| 57 | LoadScript( '_source/classes/fckiecleanup.js' ) ; |
---|
| 58 | |
---|
| 59 | LoadScript( '_source/internals/fckbrowserinfo.js' ) ; |
---|
| 60 | LoadScript( '_source/internals/fckurlparams.js' ) ; |
---|
| 61 | LoadScript( '_source/internals/fck.js' ) ; |
---|
| 62 | LoadScript( '_source/internals/fckconfig.js' ) ; |
---|
| 63 | |
---|
| 64 | LoadScript( '_source/internals/fckdebug.js' ) ; |
---|
| 65 | LoadScript( '_source/internals/fcktools.js' ) ; |
---|
| 66 | LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ; |
---|
| 67 | LoadScript( '_source/fckeditorapi.js' ) ; |
---|
| 68 | LoadScript( '_source/internals/fckregexlib.js' ) ; |
---|
| 69 | LoadScript( '_source/internals/fcklanguagemanager.js' ) ; |
---|
| 70 | LoadScript( '_source/classes/fckevents.js' ) ; |
---|
| 71 | LoadScript( '_source/internals/fckxhtmlentities.js' ) ; |
---|
| 72 | LoadScript( '_source/internals/fckxhtml.js' ) ; |
---|
| 73 | LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ; |
---|
| 74 | LoadScript( '_source/internals/fckcodeformatter.js' ) ; |
---|
| 75 | LoadScript( '_source/internals/fckundo_' + sSuffix + '.js' ) ; |
---|
| 76 | LoadScript( '_source/classes/fckeditingarea.js' ) ; |
---|
| 77 | LoadScript( '_source/internals/fckdocumentprocessor.js' ) ; |
---|
| 78 | LoadScript( '_source/internals/fck_1.js' ) ; |
---|
| 79 | LoadScript( '_source/internals/fck_1_' + sSuffix + '.js' ) ; |
---|
| 80 | LoadScript( '_source/internals/fck_2.js' ) ; |
---|
| 81 | LoadScript( '_source/internals/fck_2_' + sSuffix + '.js' ) ; |
---|
| 82 | LoadScript( '_source/internals/fckselection.js' ) ; |
---|
| 83 | LoadScript( '_source/internals/fckselection_' + sSuffix + '.js' ) ; |
---|
| 84 | |
---|
| 85 | LoadScript( '_source/internals/fcktablehandler.js' ) ; |
---|
| 86 | LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ; |
---|
| 87 | LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ; |
---|
| 88 | LoadScript( '_source/classes/fckstyledef.js' ) ; |
---|
| 89 | LoadScript( '_source/classes/fckstyledef_' + sSuffix + '.js' ) ; |
---|
| 90 | LoadScript( '_source/classes/fckstylesloader.js' ) ; |
---|
| 91 | |
---|
| 92 | LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ; |
---|
| 93 | LoadScript( '_source/commandclasses/fck_othercommands.js' ) ; |
---|
| 94 | LoadScript( '_source/commandclasses/fckspellcheckcommand_' + sSuffix + '.js' ) ; |
---|
| 95 | LoadScript( '_source/commandclasses/fcktextcolorcommand.js' ) ; |
---|
| 96 | LoadScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ; |
---|
| 97 | LoadScript( '_source/commandclasses/fckpastewordcommand.js' ) ; |
---|
| 98 | LoadScript( '_source/commandclasses/fcktablecommand.js' ) ; |
---|
| 99 | LoadScript( '_source/commandclasses/fckstylecommand.js' ) ; |
---|
| 100 | LoadScript( '_source/commandclasses/fckfitwindow.js' ) ; |
---|
| 101 | LoadScript( '_source/internals/fckcommands.js' ) ; |
---|
| 102 | |
---|
| 103 | LoadScript( '_source/classes/fckpanel.js' ) ; |
---|
| 104 | LoadScript( '_source/classes/fckicon.js' ) ; |
---|
| 105 | LoadScript( '_source/classes/fcktoolbarbuttonui.js' ) ; |
---|
| 106 | LoadScript( '_source/classes/fcktoolbarbutton.js' ) ; |
---|
| 107 | LoadScript( '_source/classes/fckspecialcombo.js' ) ; |
---|
| 108 | LoadScript( '_source/classes/fcktoolbarspecialcombo.js' ) ; |
---|
| 109 | LoadScript( '_source/classes/fcktoolbarfontscombo.js' ) ; |
---|
| 110 | LoadScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ; |
---|
| 111 | LoadScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ; |
---|
| 112 | LoadScript( '_source/classes/fcktoolbarstylecombo.js' ) ; |
---|
| 113 | LoadScript( '_source/classes/fcktoolbarpanelbutton.js' ) ; |
---|
| 114 | LoadScript( '_source/internals/fcktoolbaritems.js' ) ; |
---|
| 115 | LoadScript( '_source/classes/fcktoolbar.js' ) ; |
---|
| 116 | LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ; |
---|
| 117 | LoadScript( '_source/internals/fcktoolbarset.js' ) ; |
---|
| 118 | LoadScript( '_source/internals/fckdialog.js' ) ; |
---|
| 119 | LoadScript( '_source/internals/fckdialog_' + sSuffix + '.js' ) ; |
---|
| 120 | LoadScript( '_source/classes/fckmenuitem.js' ) ; |
---|
| 121 | LoadScript( '_source/classes/fckmenublock.js' ) ; |
---|
| 122 | LoadScript( '_source/classes/fckmenublockpanel.js' ) ; |
---|
| 123 | LoadScript( '_source/classes/fckcontextmenu.js' ) ; |
---|
| 124 | LoadScript( '_source/internals/fck_contextmenu.js' ) ; |
---|
| 125 | LoadScript( '_source/classes/fckplugin.js' ) ; |
---|
| 126 | LoadScript( '_source/internals/fckplugins.js' ) ; |
---|
| 127 | |
---|
| 128 | // @Packager.Remove.End |
---|
| 129 | |
---|
| 130 | // Base configuration file. |
---|
| 131 | LoadScript( '../fckconfig.js' ) ; |
---|
| 132 | |
---|
| 133 | </script> |
---|
| 134 | <script type="text/javascript"> |
---|
| 135 | |
---|
| 136 | // Create the default cleanup object used by the editor. |
---|
| 137 | if ( FCKBrowserInfo.IsIE ) |
---|
| 138 | { |
---|
| 139 | FCK.IECleanup = new FCKIECleanup( window ) ; |
---|
| 140 | FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ; |
---|
| 141 | FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ; |
---|
| 142 | } |
---|
| 143 | |
---|
| 144 | // The config hidden field is processed immediately, because |
---|
| 145 | // CustomConfigurationsPath may be set in the page. |
---|
| 146 | FCKConfig.ProcessHiddenField() ; |
---|
| 147 | |
---|
| 148 | // Load the custom configurations file (if defined). |
---|
| 149 | if ( FCKConfig.CustomConfigurationsPath.length > 0 ) |
---|
| 150 | LoadScript( FCKConfig.CustomConfigurationsPath ) ; |
---|
| 151 | |
---|
| 152 | </script> |
---|
| 153 | <script type="text/javascript"> |
---|
| 154 | |
---|
| 155 | // Load configurations defined at page level. |
---|
| 156 | FCKConfig_LoadPageConfig() ; |
---|
| 157 | |
---|
| 158 | FCKConfig_PreProcess() ; |
---|
| 159 | |
---|
| 160 | // Load the active skin CSS. |
---|
| 161 | LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ; |
---|
| 162 | |
---|
| 163 | // Load the language file. |
---|
| 164 | FCKLanguageManager.Initialize() ; |
---|
| 165 | LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ; |
---|
| 166 | |
---|
| 167 | </script> |
---|
| 168 | <script type="text/javascript"> |
---|
| 169 | |
---|
| 170 | // Initialize the editing area context menu. |
---|
| 171 | FCK_ContextMenu_Init() ; |
---|
| 172 | |
---|
| 173 | FCKPlugins.Load() ; |
---|
| 174 | |
---|
| 175 | </script> |
---|
| 176 | <script type="text/javascript"> |
---|
| 177 | |
---|
| 178 | // Set the editor interface direction. |
---|
| 179 | window.document.dir = FCKLang.Dir ; |
---|
| 180 | |
---|
| 181 | // Activate pasting operations. |
---|
| 182 | if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord ) |
---|
| 183 | FCK.Events.AttachEvent( "OnPaste", FCK.Paste ) ; |
---|
| 184 | |
---|
| 185 | </script> |
---|
| 186 | <script type="text/javascript"> |
---|
| 187 | |
---|
| 188 | window.onload = function() |
---|
| 189 | { |
---|
| 190 | InitializeAPI() ; |
---|
| 191 | |
---|
| 192 | if ( FCKBrowserInfo.IsIE ) |
---|
| 193 | FCK_PreloadImages() ; |
---|
| 194 | else |
---|
| 195 | LoadToolbarSetup() ; |
---|
| 196 | } |
---|
| 197 | |
---|
| 198 | function LoadToolbarSetup() |
---|
| 199 | { |
---|
| 200 | FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ; |
---|
| 201 | } |
---|
| 202 | |
---|
| 203 | function LoadToolbar() |
---|
| 204 | { |
---|
| 205 | var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ; |
---|
| 206 | |
---|
| 207 | if ( oToolbarSet.IsLoaded ) |
---|
| 208 | StartEditor() ; |
---|
| 209 | else |
---|
| 210 | { |
---|
| 211 | oToolbarSet.OnLoad = StartEditor ; |
---|
| 212 | oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ; |
---|
| 213 | } |
---|
| 214 | } |
---|
| 215 | |
---|
| 216 | function StartEditor() |
---|
| 217 | { |
---|
| 218 | // Remove the onload listener. |
---|
| 219 | FCK.ToolbarSet.OnLoad = null ; |
---|
| 220 | |
---|
| 221 | FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ; |
---|
| 222 | |
---|
| 223 | FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ; |
---|
| 224 | |
---|
| 225 | // Start the editor. |
---|
| 226 | FCK.StartEditor() ; |
---|
| 227 | } |
---|
| 228 | |
---|
| 229 | function WaitForActive( editorInstance, newStatus ) |
---|
| 230 | { |
---|
| 231 | if ( newStatus == FCK_STATUS_ACTIVE ) |
---|
| 232 | { |
---|
| 233 | if ( FCKBrowserInfo.IsGecko ) |
---|
| 234 | FCKTools.RunFunction( window.onresize ) ; |
---|
| 235 | |
---|
| 236 | FCK.SetStatus( FCK_STATUS_COMPLETE ) ; |
---|
| 237 | |
---|
| 238 | // Call the special "FCKeditor_OnComplete" function that should be present in |
---|
| 239 | // the HTML page where the editor is located. |
---|
| 240 | if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' ) |
---|
| 241 | window.parent.FCKeditor_OnComplete( FCK ) ; |
---|
| 242 | } |
---|
| 243 | } |
---|
| 244 | |
---|
| 245 | // Gecko browsers doens't calculate well that IFRAME size so we must |
---|
| 246 | // recalculate it every time the window size changes. |
---|
| 247 | if ( FCKBrowserInfo.IsGecko ) |
---|
| 248 | { |
---|
| 249 | function Window_OnResize() |
---|
| 250 | { |
---|
| 251 | if ( FCKBrowserInfo.IsOpera ) |
---|
| 252 | return ; |
---|
| 253 | |
---|
| 254 | var oCell = document.getElementById( 'xEditingArea' ) ; |
---|
| 255 | |
---|
| 256 | var eInnerElement ; |
---|
| 257 | if ( eInnerElement = oCell.firstChild ) |
---|
| 258 | { |
---|
| 259 | eInnerElement.style.height = 0 ; |
---|
| 260 | eInnerElement.style.height = oCell.scrollHeight - 2 ; |
---|
| 261 | } |
---|
| 262 | } |
---|
| 263 | window.onresize = Window_OnResize ; |
---|
| 264 | } |
---|
| 265 | |
---|
| 266 | </script> |
---|
| 267 | </head> |
---|
| 268 | <body> |
---|
| 269 | <table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed"> |
---|
| 270 | <tr id="xToolbarRow" style="display: none"> |
---|
| 271 | <td id="xToolbarSpace" style="overflow: hidden"> |
---|
| 272 | <table width="100%" cellpadding="0" cellspacing="0"> |
---|
| 273 | <tr id="xCollapsed" style="display: none"> |
---|
| 274 | <td id="xExpandHandle" class="TB_Expand" colspan="3"> |
---|
| 275 | <img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td> |
---|
| 276 | </tr> |
---|
| 277 | <tr id="xExpanded" style="display: none"> |
---|
| 278 | <td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td> |
---|
| 279 | <td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom"> |
---|
| 280 | <img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td> |
---|
| 281 | <td id="xToolbar" class="TB_ToolbarSet"></td> |
---|
| 282 | <td class="TB_SideBorder" style="width: 1px"></td> |
---|
| 283 | </tr> |
---|
| 284 | </table> |
---|
| 285 | </td> |
---|
| 286 | </tr> |
---|
| 287 | <tr style="height: 100%"> |
---|
| 288 | <td id="xEditingArea" valign="top"></td> |
---|
| 289 | </tr> |
---|
| 290 | </table> |
---|
| 291 | </body> |
---|
| 292 | </html> |
---|