OSDN Git Service

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