event refactor, landing on HEAD!
[freeside.git] / httemplate / elements / fckeditor / editor / fckeditor.original.html
diff --git a/httemplate/elements/fckeditor/editor/fckeditor.original.html b/httemplate/elements/fckeditor/editor/fckeditor.original.html
new file mode 100644 (file)
index 0000000..846eed9
--- /dev/null
@@ -0,0 +1,319 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
+<!--\r
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben\r
+ *\r
+ * == BEGIN LICENSE ==\r
+ *\r
+ * Licensed under the terms of any of the following licenses at your\r
+ * choice:\r
+ *\r
+ *  - GNU General Public License Version 2 or later (the "GPL")\r
+ *    http://www.gnu.org/licenses/gpl.html\r
+ *\r
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
+ *    http://www.gnu.org/licenses/lgpl.html\r
+ *\r
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")\r
+ *    http://www.mozilla.org/MPL/MPL-1.1.html\r
+ *\r
+ * == END LICENSE ==\r
+ *\r
+ * Main page that holds the editor.\r
+-->\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+       <title>FCKeditor</title>\r
+       <meta name="robots" content="noindex, nofollow" />\r
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+       <!-- @Packager.RemoveLine\r
+       <meta http-equiv="Cache-Control" content="public" />\r
+       @Packager.RemoveLine -->\r
+       <script type="text/javascript">\r
+\r
+// Instead of loading scripts and CSSs using inline tags, all scripts are\r
+// loaded by code. In this way we can guarantee the correct processing order,\r
+// otherwise external scripts and inline scripts could be executed in an\r
+// unwanted order (IE).\r
+\r
+function LoadScript( url )\r
+{\r
+       document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '" onerror="alert(\'Error loading \' + this.src);"><\/scr' + 'ipt>' ) ;\r
+}\r
+\r
+function LoadCss( url )\r
+{\r
+       document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" onerror="alert(\'Error loading \' + this.src);" />' ) ;\r
+}\r
+\r
+// Main editor scripts.\r
+var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? 'ie' : 'gecko' ;\r
+\r
+/* @Packager.RemoveLine\r
+LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;\r
+@Packager.RemoveLine */\r
+// @Packager.Remove.Start\r
+\r
+LoadScript( '_source/fckconstants.js' ) ;\r
+LoadScript( '_source/fckjscoreextensions.js' ) ;\r
+\r
+if ( sSuffix == 'ie' )\r
+       LoadScript( '_source/classes/fckiecleanup.js' ) ;\r
+\r
+LoadScript( '_source/internals/fckbrowserinfo.js' ) ;\r
+LoadScript( '_source/internals/fckurlparams.js' ) ;\r
+LoadScript( '_source/classes/fckevents.js' ) ;\r
+LoadScript( '_source/internals/fck.js' ) ;\r
+LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ;\r
+LoadScript( '_source/internals/fckconfig.js' ) ;\r
+\r
+LoadScript( '_source/internals/fckdebug.js' ) ;\r
+LoadScript( '_source/internals/fckdomtools.js' ) ;\r
+LoadScript( '_source/internals/fcktools.js' ) ;\r
+LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;\r
+LoadScript( '_source/fckeditorapi.js' ) ;\r
+LoadScript( '_source/classes/fckimagepreloader.js' ) ;\r
+LoadScript( '_source/internals/fckregexlib.js' ) ;\r
+LoadScript( '_source/internals/fcklistslib.js' ) ;\r
+LoadScript( '_source/internals/fcklanguagemanager.js' ) ;\r
+LoadScript( '_source/internals/fckxhtmlentities.js' ) ;\r
+LoadScript( '_source/internals/fckxhtml.js' ) ;\r
+LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ;\r
+LoadScript( '_source/internals/fckcodeformatter.js' ) ;\r
+LoadScript( '_source/internals/fckundo_' + sSuffix + '.js' ) ;\r
+LoadScript( '_source/classes/fckeditingarea.js' ) ;\r
+LoadScript( '_source/classes/fckkeystrokehandler.js' ) ;\r
+\r
+LoadScript( '_source/internals/fcklisthandler.js' ) ;\r
+LoadScript( '_source/classes/fckelementpath.js' ) ;\r
+LoadScript( '_source/classes/fckdomrange.js' ) ;\r
+LoadScript( '_source/classes/fckdocumentfragment_' + sSuffix + '.js' ) ;\r
+LoadScript( '_source/classes/fckw3crange.js' ) ;\r
+LoadScript( '_source/classes/fckdomrange_' + sSuffix + '.js' ) ;\r
+LoadScript( '_source/classes/fckenterkey.js' ) ;\r
+\r
+LoadScript( '_source/internals/fckdocumentprocessor.js' ) ;\r
+LoadScript( '_source/internals/fckselection.js' ) ;\r
+LoadScript( '_source/internals/fckselection_' + sSuffix + '.js' ) ;\r
+\r
+LoadScript( '_source/internals/fcktablehandler.js' ) ;\r
+LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ;\r
+LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ;\r
+LoadScript( '_source/classes/fckstyledef.js' ) ;\r
+LoadScript( '_source/classes/fckstyledef_' + sSuffix + '.js' ) ;\r
+LoadScript( '_source/classes/fckstylesloader.js' ) ;\r
+\r
+LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ;\r
+LoadScript( '_source/commandclasses/fck_othercommands.js' ) ;\r
+LoadScript( '_source/commandclasses/fckspellcheckcommand_' + sSuffix + '.js' ) ;\r
+LoadScript( '_source/commandclasses/fcktextcolorcommand.js' ) ;\r
+LoadScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ;\r
+LoadScript( '_source/commandclasses/fckpastewordcommand.js' ) ;\r
+LoadScript( '_source/commandclasses/fcktablecommand.js' ) ;\r
+LoadScript( '_source/commandclasses/fckstylecommand.js' ) ;\r
+LoadScript( '_source/commandclasses/fckfitwindow.js' ) ;\r
+LoadScript( '_source/internals/fckcommands.js' ) ;\r
+\r
+LoadScript( '_source/classes/fckpanel.js' ) ;\r
+LoadScript( '_source/classes/fckicon.js' ) ;\r
+LoadScript( '_source/classes/fcktoolbarbuttonui.js' ) ;\r
+LoadScript( '_source/classes/fcktoolbarbutton.js' ) ;\r
+LoadScript( '_source/classes/fckspecialcombo.js' ) ;\r
+LoadScript( '_source/classes/fcktoolbarspecialcombo.js' ) ;\r
+LoadScript( '_source/classes/fcktoolbarfontscombo.js' ) ;\r
+LoadScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ;\r
+LoadScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ;\r
+LoadScript( '_source/classes/fcktoolbarstylecombo.js' ) ;\r
+LoadScript( '_source/classes/fcktoolbarpanelbutton.js' ) ;\r
+LoadScript( '_source/internals/fcktoolbaritems.js' ) ;\r
+LoadScript( '_source/classes/fcktoolbar.js' ) ;\r
+LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ;\r
+LoadScript( '_source/internals/fcktoolbarset.js' ) ;\r
+LoadScript( '_source/internals/fckdialog.js' ) ;\r
+LoadScript( '_source/internals/fckdialog_' + sSuffix + '.js' ) ;\r
+LoadScript( '_source/classes/fckmenuitem.js' ) ;\r
+LoadScript( '_source/classes/fckmenublock.js' ) ;\r
+LoadScript( '_source/classes/fckmenublockpanel.js' ) ;\r
+LoadScript( '_source/classes/fckcontextmenu.js' ) ;\r
+LoadScript( '_source/internals/fck_contextmenu.js' ) ;\r
+LoadScript( '_source/classes/fckplugin.js' ) ;\r
+LoadScript( '_source/internals/fckplugins.js' ) ;\r
+\r
+// @Packager.Remove.End\r
+\r
+// Base configuration file.\r
+LoadScript( '../fckconfig.js' ) ;\r
+\r
+       </script>\r
+       <script type="text/javascript">\r
+\r
+if ( FCKBrowserInfo.IsIE )\r
+{\r
+       // Remove IE mouse flickering.\r
+       try\r
+       {\r
+               document.execCommand( 'BackgroundImageCache', false, true ) ;\r
+       }\r
+       catch (e)\r
+       {\r
+               // We have been reported about loading problems caused by the above\r
+               // line. For safety, let's just ignore errors.\r
+       }\r
+\r
+       // Create the default cleanup object used by the editor.\r
+       FCK.IECleanup = new FCKIECleanup( window ) ;\r
+       FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;\r
+       FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;\r
+}\r
+\r
+// The config hidden field is processed immediately, because\r
+// CustomConfigurationsPath may be set in the page.\r
+FCKConfig.ProcessHiddenField() ;\r
+\r
+// Load the custom configurations file (if defined).\r
+if ( FCKConfig.CustomConfigurationsPath.length > 0 )\r
+       LoadScript( FCKConfig.CustomConfigurationsPath ) ;\r
+\r
+       </script>\r
+       <script type="text/javascript">\r
+\r
+// Load configurations defined at page level.\r
+FCKConfig_LoadPageConfig() ;\r
+\r
+FCKConfig_PreProcess() ;\r
+\r
+// Load the active skin CSS.\r
+LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ;\r
+\r
+// Load the language file.\r
+FCKLanguageManager.Initialize() ;\r
+LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;\r
+\r
+       </script>\r
+       <script type="text/javascript">\r
+\r
+// Initialize the editing area context menu.\r
+FCK_ContextMenu_Init() ;\r
+\r
+FCKPlugins.Load() ;\r
+\r
+       </script>\r
+       <script type="text/javascript">\r
+\r
+// Set the editor interface direction.\r
+window.document.dir = FCKLang.Dir ;\r
+\r
+// Activate pasting operations.\r
+if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord )\r
+       FCK.Events.AttachEvent( 'OnPaste', FCK.Paste ) ;\r
+\r
+       </script>\r
+       <script type="text/javascript">\r
+\r
+window.onload = function()\r
+{\r
+       InitializeAPI() ;\r
+\r
+       if ( FCKBrowserInfo.IsIE )\r
+               FCK_PreloadImages() ;\r
+       else\r
+               LoadToolbarSetup() ;\r
+}\r
+\r
+function LoadToolbarSetup()\r
+{\r
+       FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;\r
+}\r
+\r
+function LoadToolbar()\r
+{\r
+       var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;\r
+\r
+       if ( oToolbarSet.IsLoaded )\r
+               StartEditor() ;\r
+       else\r
+       {\r
+               oToolbarSet.OnLoad = StartEditor ;\r
+               oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;\r
+       }\r
+}\r
+\r
+function StartEditor()\r
+{\r
+       // Remove the onload listener.\r
+       FCK.ToolbarSet.OnLoad = null ;\r
+\r
+       FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;\r
+\r
+       FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;\r
+\r
+       // Start the editor.\r
+       FCK.StartEditor() ;\r
+}\r
+\r
+function WaitForActive( editorInstance, newStatus )\r
+{\r
+       if ( newStatus == FCK_STATUS_ACTIVE )\r
+       {\r
+               if ( FCKBrowserInfo.IsGecko )\r
+                       FCKTools.RunFunction( window.onresize ) ;\r
+\r
+               _AttachFormSubmitToAPI() ;\r
+\r
+               FCK.SetStatus( FCK_STATUS_COMPLETE ) ;\r
+\r
+               // Call the special "FCKeditor_OnComplete" function that should be present in\r
+               // the HTML page where the editor is located.\r
+               if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )\r
+                       window.parent.FCKeditor_OnComplete( FCK ) ;\r
+       }\r
+}\r
+\r
+// Gecko browsers doens't calculate well that IFRAME size so we must\r
+// recalculate it every time the window size changes.\r
+if ( FCKBrowserInfo.IsGecko )\r
+{\r
+       function Window_OnResize()\r
+       {\r
+               if ( FCKBrowserInfo.IsOpera )\r
+                       return ;\r
+\r
+               var oCell = document.getElementById( 'xEditingArea' ) ;\r
+\r
+               var eInnerElement = oCell.firstChild ;\r
+               if ( eInnerElement )\r
+               {\r
+                       eInnerElement.style.height = 0 ;\r
+                       eInnerElement.style.height = oCell.scrollHeight - 2 ;\r
+               }\r
+       }\r
+       window.onresize = Window_OnResize ;\r
+}\r
+\r
+       </script>\r
+</head>\r
+<body>\r
+       <table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">\r
+               <tr id="xToolbarRow" style="display: none">\r
+                       <td id="xToolbarSpace" style="overflow: hidden">\r
+                               <table width="100%" cellpadding="0" cellspacing="0">\r
+                                       <tr id="xCollapsed" style="display: none">\r
+                                               <td id="xExpandHandle" class="TB_Expand" colspan="3">\r
+                                                       <img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>\r
+                                       </tr>\r
+                                       <tr id="xExpanded" style="display: none">\r
+                                               <td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>\r
+                                               <td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">\r
+                                                       <img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>\r
+                                               <td id="xToolbar" class="TB_ToolbarSet"></td>\r
+                                               <td class="TB_SideBorder" style="width: 1px"></td>\r
+                                       </tr>\r
+                               </table>\r
+                       </td>\r
+               </tr>\r
+               <tr>\r
+                       <td id="xEditingArea" valign="top" style="height: 100%"></td>\r
+               </tr>\r
+       </table>\r
+</body>\r
+</html>\r