/pigeoncms/Plugins/fckeditor/editor/fckeditor.html

http://pigeoncms.googlecode.com/ · HTML · 317 lines · 242 code · 53 blank · 22 comment · 0 complexity · 69e307f590219bc3d7b4549a8fa5bc3a MD5 · raw file

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