fckeditor.original.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  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-2010 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. <!-- @Packager.RemoveLine
  30. <meta http-equiv="Cache-Control" content="public">
  31. @Packager.RemoveLine -->
  32. <script type="text/javascript">
  33. // #1645: Alert the user if opening FCKeditor in FF3 from local filesystem
  34. // without security.fileuri.strict_origin_policy disabled.
  35. if ( document.location.protocol == 'file:' )
  36. {
  37. try
  38. {
  39. window.parent.document.domain ;
  40. }
  41. catch ( e )
  42. {
  43. window.addEventListener( 'load', function()
  44. {
  45. document.body.innerHTML = '\
  46. <div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\
  47. <p>\
  48. <b>Your browser security settings don\'t allow FCKeditor to be opened from\
  49. the local filesystem.<\/b>\
  50. <\/p>\
  51. <p>\
  52. Please open the <b>about:config<\/b> page and disable the\
  53. &quot;security.fileuri.strict_origin_policy&quot; option; then load this page again.\
  54. <\/p>\
  55. <p>\
  56. Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\
  57. for more information.\
  58. <\/p>\
  59. <\/div>' ;
  60. }, false ) ;
  61. }
  62. }
  63. // Save a reference to the default domain.
  64. var FCK_ORIGINAL_DOMAIN ;
  65. // Automatically detect the correct document.domain (#123).
  66. (function()
  67. {
  68. var d = FCK_ORIGINAL_DOMAIN = document.domain ;
  69. while ( true )
  70. {
  71. // Test if we can access a parent property.
  72. try
  73. {
  74. var test = window.parent.document.domain ;
  75. break ;
  76. }
  77. catch( e ) {}
  78. // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
  79. d = d.replace( /.*?(?:\.|$)/, '' ) ;
  80. if ( d.length == 0 )
  81. break ; // It was not able to detect the domain.
  82. try
  83. {
  84. document.domain = d ;
  85. }
  86. catch (e)
  87. {
  88. break ;
  89. }
  90. }
  91. })() ;
  92. // Save a reference to the detected runtime domain.
  93. var FCK_RUNTIME_DOMAIN = document.domain ;
  94. var FCK_IS_CUSTOM_DOMAIN = ( FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN ) ;
  95. // Instead of loading scripts and CSSs using inline tags, all scripts are
  96. // loaded by code. In this way we can guarantee the correct processing order,
  97. // otherwise external scripts and inline scripts could be executed in an
  98. // unwanted order (IE).
  99. function LoadScript( url )
  100. {
  101. document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ;
  102. }
  103. // Main editor scripts.
  104. var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ;
  105. /* @Packager.RemoveLine
  106. LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
  107. @Packager.RemoveLine */
  108. // @Packager.Remove.Start
  109. LoadScript( '_source/fckconstants.js' ) ;
  110. LoadScript( '_source/fckjscoreextensions.js' ) ;
  111. if ( sSuffix == 'ie' )
  112. LoadScript( '_source/classes/fckiecleanup.js' ) ;
  113. LoadScript( '_source/internals/fckbrowserinfo.js' ) ;
  114. LoadScript( '_source/internals/fckurlparams.js' ) ;
  115. LoadScript( '_source/classes/fckevents.js' ) ;
  116. LoadScript( '_source/classes/fckdataprocessor.js' ) ;
  117. LoadScript( '_source/internals/fck.js' ) ;
  118. LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ;
  119. LoadScript( '_source/internals/fckconfig.js' ) ;
  120. LoadScript( '_source/internals/fckdebug_empty.js' ) ;
  121. LoadScript( '_source/internals/fckdomtools.js' ) ;
  122. LoadScript( '_source/internals/fcktools.js' ) ;
  123. LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;
  124. LoadScript( '_source/fckeditorapi.js' ) ;
  125. LoadScript( '_source/classes/fckimagepreloader.js' ) ;
  126. LoadScript( '_source/internals/fckregexlib.js' ) ;
  127. LoadScript( '_source/internals/fcklistslib.js' ) ;
  128. LoadScript( '_source/internals/fcklanguagemanager.js' ) ;
  129. LoadScript( '_source/internals/fckxhtmlentities.js' ) ;
  130. LoadScript( '_source/internals/fckxhtml.js' ) ;
  131. LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ;
  132. LoadScript( '_source/internals/fckcodeformatter.js' ) ;
  133. LoadScript( '_source/internals/fckundo.js' ) ;
  134. LoadScript( '_source/classes/fckeditingarea.js' ) ;
  135. LoadScript( '_source/classes/fckkeystrokehandler.js' ) ;
  136. LoadScript( 'dtd/fck_xhtml10transitional.js' ) ;
  137. LoadScript( '_source/classes/fckstyle.js' ) ;
  138. LoadScript( '_source/internals/fckstyles.js' ) ;
  139. LoadScript( '_source/internals/fcklisthandler.js' ) ;
  140. LoadScript( '_source/classes/fckelementpath.js' ) ;
  141. LoadScript( '_source/classes/fckdomrange.js' ) ;
  142. LoadScript( '_source/classes/fckdocumentfragment_' + sSuffix + '.js' ) ;
  143. LoadScript( '_source/classes/fckw3crange.js' ) ;
  144. LoadScript( '_source/classes/fckdomrange_' + sSuffix + '.js' ) ;
  145. LoadScript( '_source/classes/fckdomrangeiterator.js' ) ;
  146. LoadScript( '_source/classes/fckenterkey.js' ) ;
  147. LoadScript( '_source/internals/fckdocumentprocessor.js' ) ;
  148. LoadScript( '_source/internals/fckselection.js' ) ;
  149. LoadScript( '_source/internals/fckselection_' + sSuffix + '.js' ) ;
  150. LoadScript( '_source/internals/fcktablehandler.js' ) ;
  151. LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ;
  152. LoadScript( '_source/classes/fckxml.js' ) ;
  153. LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ;
  154. LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ;
  155. LoadScript( '_source/commandclasses/fckstylecommand.js' ) ;
  156. LoadScript( '_source/commandclasses/fck_othercommands.js' ) ;
  157. LoadScript( '_source/commandclasses/fckshowblocks.js' ) ;
  158. LoadScript( '_source/commandclasses/fckspellcheckcommand_' + sSuffix + '.js' ) ;
  159. LoadScript( '_source/commandclasses/fcktextcolorcommand.js' ) ;
  160. LoadScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ;
  161. LoadScript( '_source/commandclasses/fckpastewordcommand.js' ) ;
  162. LoadScript( '_source/commandclasses/fcktablecommand.js' ) ;
  163. LoadScript( '_source/commandclasses/fckfitwindow.js' ) ;
  164. LoadScript( '_source/commandclasses/fcklistcommands.js' ) ;
  165. LoadScript( '_source/commandclasses/fckjustifycommands.js' ) ;
  166. LoadScript( '_source/commandclasses/fckindentcommands.js' ) ;
  167. LoadScript( '_source/commandclasses/fckblockquotecommand.js' ) ;
  168. LoadScript( '_source/commandclasses/fckcorestylecommand.js' ) ;
  169. LoadScript( '_source/commandclasses/fckremoveformatcommand.js' ) ;
  170. LoadScript( '_source/internals/fckcommands.js' ) ;
  171. LoadScript( '_source/classes/fckpanel.js' ) ;
  172. LoadScript( '_source/classes/fckicon.js' ) ;
  173. LoadScript( '_source/classes/fcktoolbarbuttonui.js' ) ;
  174. LoadScript( '_source/classes/fcktoolbarbutton.js' ) ;
  175. LoadScript( '_source/classes/fckspecialcombo.js' ) ;
  176. LoadScript( '_source/classes/fcktoolbarspecialcombo.js' ) ;
  177. LoadScript( '_source/classes/fcktoolbarstylecombo.js' ) ;
  178. LoadScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ;
  179. LoadScript( '_source/classes/fcktoolbarfontscombo.js' ) ;
  180. LoadScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ;
  181. LoadScript( '_source/classes/fcktoolbarpanelbutton.js' ) ;
  182. LoadScript( '_source/internals/fckscayt.js' ) ;
  183. LoadScript( '_source/internals/fcktoolbaritems.js' ) ;
  184. LoadScript( '_source/classes/fcktoolbar.js' ) ;
  185. LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ;
  186. LoadScript( '_source/internals/fcktoolbarset.js' ) ;
  187. LoadScript( '_source/internals/fckdialog.js' ) ;
  188. LoadScript( '_source/classes/fckmenuitem.js' ) ;
  189. LoadScript( '_source/classes/fckmenublock.js' ) ;
  190. LoadScript( '_source/classes/fckmenublockpanel.js' ) ;
  191. LoadScript( '_source/classes/fckcontextmenu.js' ) ;
  192. LoadScript( '_source/internals/fck_contextmenu.js' ) ;
  193. LoadScript( '_source/classes/fckhtmliterator.js' ) ;
  194. LoadScript( '_source/classes/fckplugin.js' ) ;
  195. LoadScript( '_source/internals/fckplugins.js' ) ;
  196. // @Packager.Remove.End
  197. // Base configuration file.
  198. LoadScript( '../fckconfig.js' ) ;
  199. </script>
  200. <script type="text/javascript">
  201. // Adobe AIR compatibility file.
  202. if ( FCKBrowserInfo.IsAIR )
  203. LoadScript( 'js/fckadobeair.js' ) ;
  204. if ( FCKBrowserInfo.IsIE )
  205. {
  206. // Remove IE mouse flickering.
  207. try
  208. {
  209. document.execCommand( 'BackgroundImageCache', false, true ) ;
  210. }
  211. catch (e)
  212. {
  213. // We have been reported about loading problems caused by the above
  214. // line. For safety, let's just ignore errors.
  215. }
  216. // Create the default cleanup object used by the editor.
  217. FCK.IECleanup = new FCKIECleanup( window ) ;
  218. FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
  219. FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
  220. }
  221. // The first function to be called on selection change must the the styles
  222. // change checker, because the result of its processing may be used by another
  223. // functions listening to the same event.
  224. FCK.Events.AttachEvent( 'OnSelectionChange', function() { FCKStyles.CheckSelectionChanges() ; } ) ;
  225. // The config hidden field is processed immediately, because
  226. // CustomConfigurationsPath may be set in the page.
  227. FCKConfig.ProcessHiddenField() ;
  228. // Load the custom configurations file (if defined).
  229. if ( FCKConfig.CustomConfigurationsPath.length > 0 )
  230. LoadScript( FCKConfig.CustomConfigurationsPath ) ;
  231. </script>
  232. <script type="text/javascript">
  233. // Load configurations defined at page level.
  234. FCKConfig_LoadPageConfig() ;
  235. FCKConfig_PreProcess() ;
  236. // Load the full debug script.
  237. if ( FCKConfig.Debug )
  238. LoadScript( '_source/internals/fckdebug.js' ) ;
  239. </script>
  240. <script type="text/javascript">
  241. var FCK_InternalCSS = FCKConfig.BasePath + 'css/fck_internal.css' ; // @Packager.RemoveLine
  242. var FCK_ShowTableBordersCSS = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ; // @Packager.RemoveLine
  243. /* @Packager.RemoveLine
  244. // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt).
  245. 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)}' ) ;
  246. 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}' ) ;
  247. @Packager.RemoveLine */
  248. // Popup the debug window if debug mode is set to true. It guarantees that the
  249. // first debug message will not be lost.
  250. if ( FCKConfig.Debug )
  251. FCKDebug._GetWindow() ;
  252. // Load the active skin CSS.
  253. document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ;
  254. // Load the language file.
  255. FCKLanguageManager.Initialize() ;
  256. LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
  257. </script>
  258. <script type="text/javascript">
  259. // Initialize the editing area context menu.
  260. FCK_ContextMenu_Init() ;
  261. FCKPlugins.Load() ;
  262. </script>
  263. <script type="text/javascript">
  264. // Set the editor interface direction.
  265. window.document.dir = FCKLang.Dir ;
  266. </script>
  267. <script type="text/javascript">
  268. window.onload = function()
  269. {
  270. InitializeAPI() ;
  271. if ( FCKBrowserInfo.IsIE )
  272. FCK_PreloadImages() ;
  273. else
  274. LoadToolbarSetup() ;
  275. }
  276. function LoadToolbarSetup()
  277. {
  278. FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
  279. }
  280. function LoadToolbar()
  281. {
  282. var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
  283. if ( oToolbarSet.IsLoaded )
  284. StartEditor() ;
  285. else
  286. {
  287. oToolbarSet.OnLoad = StartEditor ;
  288. oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
  289. }
  290. }
  291. function StartEditor()
  292. {
  293. // Remove the onload listener.
  294. FCK.ToolbarSet.OnLoad = null ;
  295. FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
  296. FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
  297. // Start the editor.
  298. FCK.StartEditor() ;
  299. }
  300. function WaitForActive( editorInstance, newStatus )
  301. {
  302. if ( newStatus == FCK_STATUS_ACTIVE )
  303. {
  304. if ( FCKBrowserInfo.IsGecko )
  305. FCKTools.RunFunction( window.onresize ) ;
  306. if ( !FCKConfig.PreventSubmitHandler )
  307. _AttachFormSubmitToAPI() ;
  308. FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
  309. // Call the special "FCKeditor_OnComplete" function that should be present in
  310. // the HTML page where the editor is located.
  311. if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
  312. window.parent.FCKeditor_OnComplete( FCK ) ;
  313. }
  314. }
  315. // Gecko and Webkit browsers don't calculate well the IFRAME size so we must
  316. // recalculate it every time the window size changes.
  317. if ( FCKBrowserInfo.IsGecko || ( FCKBrowserInfo.IsSafari && !FCKBrowserInfo.IsSafari3 ) )
  318. {
  319. window.onresize = function( e )
  320. {
  321. // Running in Firefox's chrome makes the window receive the event including subframes.
  322. // we care only about this window. Ticket #1642.
  323. // #2002: The originalTarget from the event can be the current document, the window, or the editing area.
  324. if ( e && e.originalTarget && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document ))
  325. return ;
  326. var oCell = document.getElementById( 'xEditingArea' ) ;
  327. var eInnerElement = oCell.firstChild ;
  328. if ( eInnerElement )
  329. {
  330. eInnerElement.style.height = '0px' ;
  331. eInnerElement.style.height = ( oCell.scrollHeight - 2 ) + 'px' ;
  332. }
  333. }
  334. }
  335. </script>
  336. </head>
  337. <body>
  338. <table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
  339. <tr id="xToolbarRow" style="display: none">
  340. <td id="xToolbarSpace" style="overflow: hidden">
  341. <table width="100%" cellpadding="0" cellspacing="0">
  342. <tr id="xCollapsed" style="display: none">
  343. <td id="xExpandHandle" class="TB_Expand" colspan="3">
  344. <img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
  345. </tr>
  346. <tr id="xExpanded" style="display: none">
  347. <td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
  348. <td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
  349. <img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
  350. <td id="xToolbar" class="TB_ToolbarSet"></td>
  351. <td class="TB_SideBorder" style="width: 1px"></td>
  352. </tr>
  353. </table>
  354. </td>
  355. </tr>
  356. <tr>
  357. <td id="xEditingArea" valign="top" style="height: 100%"></td>
  358. </tr>
  359. </table>
  360. </body>
  361. </html>