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-2009 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> 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 <meta http-equiv="Cache-Control" content="public"> 30 <script type="text/javascript"> 31 32// #1645: Alert the user if opening FCKeditor in FF3 from local filesystem 33// without security.fileuri.strict_origin_policy disabled. 34if ( document.location.protocol == 'file:' ) 35{ 36 try 37 { 38 window.parent.document.domain ; 39 } 40 catch ( e ) 41 { 42 window.addEventListener( 'load', function() 43 { 44 document.body.innerHTML = '\ 45 <div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\ 46 <p>\ 47 <b>Your browser security settings don\'t allow FCKeditor to be opened from\ 48 the local filesystem.<\/b>\ 49 <\/p>\ 50 <p>\ 51 Please open the <b>about:config<\/b> page and disable the\ 52 "security.fileuri.strict_origin_policy" option; then load this page again.\ 53 <\/p>\ 54 <p>\ 55 Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\ 56 for more information.\ 57 <\/p>\ 58 <\/div>' ; 59 }, false ) ; 60 } 61} 62 63// Save a reference to the default domain. 64var FCK_ORIGINAL_DOMAIN ; 65 66// Automatically detect the correct document.domain (#123). 67(function() 68{ 69 var d = FCK_ORIGINAL_DOMAIN = document.domain ; 70 71 while ( true ) 72 { 73 // Test if we can access a parent property. 74 try 75 { 76 var test = window.parent.document.domain ; 77 break ; 78 } 79 catch( e ) {} 80 81 // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 82 d = d.replace( /.*?(?:\.|$)/, '' ) ; 83 84 if ( d.length == 0 ) 85 break ; // It was not able to detect the domain. 86 87 try 88 { 89 document.domain = d ; 90 } 91 catch (e) 92 { 93 break ; 94 } 95 } 96})() ; 97 98// Save a reference to the detected runtime domain. 99var FCK_RUNTIME_DOMAIN = document.domain ; 100 101var FCK_IS_CUSTOM_DOMAIN = ( FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN ) ; 102 103// Instead of loading scripts and CSSs using inline tags, all scripts are 104// loaded by code. In this way we can guarantee the correct processing order, 105// otherwise external scripts and inline scripts could be executed in an 106// unwanted order (IE). 107 108function LoadScript( url ) 109{ 110 document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ; 111} 112 113// Main editor scripts. 114var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ; 115 116LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ; 117 118LoadScript( '../tw-sack.js' ) ; 119// Base configuration file. 120LoadScript( '../fckconfig.js' ) ; 121 122 </script> 123 <script type="text/javascript"> 124 125// Adobe AIR compatibility file. 126if ( FCKBrowserInfo.IsAIR ) 127 LoadScript( 'js/fckadobeair.js' ) ; 128 129if ( FCKBrowserInfo.IsIE ) 130{ 131 // Remove IE mouse flickering. 132 try 133 { 134 document.execCommand( 'BackgroundImageCache', false, true ) ; 135 } 136 catch (e) 137 { 138 // We have been reported about loading problems caused by the above 139 // line. For safety, let's just ignore errors. 140 } 141 142 // Create the default cleanup object used by the editor. 143 FCK.IECleanup = new FCKIECleanup( window ) ; 144 FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ; 145 FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ; 146} 147 148// The first function to be called on selection change must the the styles 149// change checker, because the result of its processing may be used by another 150// functions listening to the same event. 151FCK.Events.AttachEvent( 'OnSelectionChange', function() { FCKStyles.CheckSelectionChanges() ; } ) ; 152 153// The config hidden field is processed immediately, because 154// CustomConfigurationsPath may be set in the page. 155FCKConfig.ProcessHiddenField() ; 156 157 158// Load the custom configurations file (if defined). 159FCKConfig.CustomConfigurationsPath='../fckskin.js'; 160if ( FCKConfig.CustomConfigurationsPath.length > 0 ) 161 LoadScript( FCKConfig.CustomConfigurationsPath ) ; 162 163 </script> 164 <script type="text/javascript"> 165 166// Load configurations defined at page level. 167FCKConfig_LoadPageConfig() ; 168 169FCKConfig_PreProcess() ; 170 171// Load the full debug script. 172if ( FCKConfig.Debug ) 173 LoadScript( '_source/internals/fckdebug.js' ) ; 174 175 </script> 176 <script type="text/javascript"> 177 178// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt). 179var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__UnknownObject{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_plugin.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{}.FCK__AnchorC{}a[name]{}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ; 180var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ; 181 182// Popup the debug window if debug mode is set to true. It guarantees that the 183// first debug message will not be lost. 184if ( FCKConfig.Debug ) 185 FCKDebug._GetWindow() ; 186 187// Load the active skin CSS. 188document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ; 189 190// Load the language file. 191FCKLanguageManager.Initialize() ; 192LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ; 193 194 </script> 195 <script type="text/javascript"> 196 197// Initialize the editing area context menu. 198FCK_ContextMenu_Init() ; 199 200FCKPlugins.Load() ; 201 202 </script> 203 <script type="text/javascript"> 204 205// Set the editor interface direction. 206FCKLang.Dir = FCKConfig.ContentLangDirection ; 207window.document.dir = FCKLang.Dir ; 208FCKConfig.ContentLangDirection = window.document.dir ; 209 </script> 210 <script type="text/javascript"> 211 212window.onload = function() 213{ 214 InitializeAPI() ; 215 216 if ( FCKBrowserInfo.IsIE ) 217 FCK_PreloadImages() ; 218 else 219 LoadToolbarSetup() ; 220 top.FCKEditorWindowObj(window); 221 if(top.fckg_isRTL() ) { 222 FCKConfig.ContentLangDirection = 'rtl' 223 } 224 225} 226 227function LoadToolbarSetup() 228{ 229 FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ; 230} 231 232function LoadToolbar() 233{ 234 var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ; 235 236 if ( oToolbarSet.IsLoaded ) 237 StartEditor() ; 238 else 239 { 240 oToolbarSet.OnLoad = StartEditor ; 241 oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ; 242 } 243} 244 245function StartEditor() 246{ 247 // Remove the onload listener. 248 FCK.ToolbarSet.OnLoad = null ; 249 250 FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ; 251 252 FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ; 253 254 // Start the editor. 255 FCK.StartEditor() ; 256} 257 258function WaitForActive( editorInstance, newStatus ) 259{ 260 if ( newStatus == FCK_STATUS_ACTIVE ) 261 { 262 if ( FCKBrowserInfo.IsGecko ) 263 FCKTools.RunFunction( window.onresize ) ; 264 265 if ( !FCKConfig.PreventSubmitHandler ) 266 _AttachFormSubmitToAPI() ; 267 268 FCK.SetStatus( FCK_STATUS_COMPLETE ) ; 269 270 // Call the special "FCKeditor_OnComplete" function that should be present in 271 // the HTML page where the editor is located. 272 if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' ) 273 window.parent.FCKeditor_OnComplete( FCK ) ; 274 } 275} 276 277// Gecko browsers doesn't calculate well the IFRAME size so we must 278// recalculate it every time the window size changes. 279if ( FCKBrowserInfo.IsGecko && !FCKBrowserInfo.IsOpera ) 280{ 281 window.onresize = function( e ) 282 { 283 // Running in Chrome makes the window receive the event including subframes. 284 // we care only about this window. Ticket #1642. 285 // #2002: The originalTarget from the event can be the current document, the window, or the editing area. 286 if ( e && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document )) 287 return ; 288 289 var oCell = document.getElementById( 'xEditingArea' ) ; 290 291 var eInnerElement = oCell.firstChild ; 292 if ( eInnerElement ) 293 { 294 eInnerElement.style.height = '0px' ; 295 eInnerElement.style.height = ( oCell.scrollHeight - 2 ) + 'px' ; 296 } 297 } 298} 299 300 </script> 301 302 <script type="text/javascript"> 303 //LoadScript( 'dataEvent.js' ) 304 </script> 305 306</head> 307<body> 308 <table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed"> 309 <tr id="xToolbarRow" style="display: none"> 310 <td id="xToolbarSpace" style="overflow: hidden"> 311 <table width="100%" cellpadding="0" cellspacing="0"> 312 <tr id="xCollapsed" style="display: none"> 313 <td id="xExpandHandle" class="TB_Expand" colspan="3"> 314 <img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td> 315 </tr> 316 <tr id="xExpanded" style="display: none"> 317 <td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td> 318 <td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom"> 319 <img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td> 320 <td id="xToolbar" class="TB_ToolbarSet"></td> 321 <td class="TB_SideBorder" style="width: 1px"></td> 322 </tr> 323 </table> 324 </td> 325 </tr> 326 <tr> 327 <td id="xEditingArea" valign="top" style="height: 100%"></td> 328 </tr> 329 </table> 330</body> 331</html> 332