Wiki2GoEditor 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/Wiki2Go_install_editor.rb +13 -0
- data/fckeditor/editor/_source/classes/fckcontextmenu.js +134 -0
- data/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js +46 -0
- data/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js +58 -0
- data/fckeditor/editor/_source/classes/fckdomrange.js +452 -0
- data/fckeditor/editor/_source/classes/fckdomrange_gecko.js +71 -0
- data/fckeditor/editor/_source/classes/fckdomrange_ie.js +149 -0
- data/fckeditor/editor/_source/classes/fckeditingarea.js +253 -0
- data/fckeditor/editor/_source/classes/fckelementpath.js +66 -0
- data/fckeditor/editor/_source/classes/fckenterkey.js +556 -0
- data/fckeditor/editor/_source/classes/fckevents.js +53 -0
- data/fckeditor/editor/_source/classes/fckicon.js +98 -0
- data/fckeditor/editor/_source/classes/fckiecleanup.js +68 -0
- data/fckeditor/editor/_source/classes/fckimagepreloader.js +68 -0
- data/fckeditor/editor/_source/classes/fckkeystrokehandler.js +136 -0
- data/fckeditor/editor/_source/classes/fckmenublock.js +143 -0
- data/fckeditor/editor/_source/classes/fckmenublockpanel.js +54 -0
- data/fckeditor/editor/_source/classes/fckmenuitem.js +160 -0
- data/fckeditor/editor/_source/classes/fckpanel.js +303 -0
- data/fckeditor/editor/_source/classes/fckplugin.js +56 -0
- data/fckeditor/editor/_source/classes/fckspecialcombo.js +363 -0
- data/fckeditor/editor/_source/classes/fckstyledef.js +59 -0
- data/fckeditor/editor/_source/classes/fckstyledef_gecko.js +119 -0
- data/fckeditor/editor/_source/classes/fckstyledef_ie.js +142 -0
- data/fckeditor/editor/_source/classes/fckstylesloader.js +88 -0
- data/fckeditor/editor/_source/classes/fcktoolbar.js +120 -0
- data/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js +36 -0
- data/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js +38 -0
- data/fckeditor/editor/_source/classes/fcktoolbarbutton.js +74 -0
- data/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js +222 -0
- data/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js +114 -0
- data/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js +47 -0
- data/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js +52 -0
- data/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js +91 -0
- data/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js +134 -0
- data/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js +111 -0
- data/fckeditor/editor/_source/classes/fckw3crange.js +448 -0
- data/fckeditor/editor/_source/classes/fckxml_gecko.js +87 -0
- data/fckeditor/editor/_source/classes/fckxml_ie.js +90 -0
- data/fckeditor/editor/_source/commandclasses/fck_othercommands.js +380 -0
- data/fckeditor/editor/_source/commandclasses/fckfitwindow.js +169 -0
- data/fckeditor/editor/_source/commandclasses/fcknamedcommand.js +37 -0
- data/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js +38 -0
- data/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js +40 -0
- data/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js +39 -0
- data/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js +67 -0
- data/fckeditor/editor/_source/commandclasses/fckstylecommand.js +99 -0
- data/fckeditor/editor/_source/commandclasses/fcktablecommand.js +71 -0
- data/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js +175 -0
- data/fckeditor/editor/_source/fckconstants.js +52 -0
- data/fckeditor/editor/_source/fckeditorapi.js +161 -0
- data/fckeditor/editor/_source/fckjscoreextensions.js +152 -0
- data/fckeditor/editor/_source/fckscriptloader.js +108 -0
- data/fckeditor/editor/_source/internals/fck.js +859 -0
- data/fckeditor/editor/_source/internals/fck_contextmenu.js +307 -0
- data/fckeditor/editor/_source/internals/fck_gecko.js +254 -0
- data/fckeditor/editor/_source/internals/fck_ie.js +383 -0
- data/fckeditor/editor/_source/internals/fckbrowserinfo.js +48 -0
- data/fckeditor/editor/_source/internals/fckcodeformatter.js +100 -0
- data/fckeditor/editor/_source/internals/fckcommands.js +132 -0
- data/fckeditor/editor/_source/internals/fckconfig.js +199 -0
- data/fckeditor/editor/_source/internals/fckdebug.js +56 -0
- data/fckeditor/editor/_source/internals/fckdialog.js +38 -0
- data/fckeditor/editor/_source/internals/fckdialog_gecko.js +103 -0
- data/fckeditor/editor/_source/internals/fckdialog_ie.js +48 -0
- data/fckeditor/editor/_source/internals/fckdocumentprocessor.js +243 -0
- data/fckeditor/editor/_source/internals/fckdomtools.js +294 -0
- data/fckeditor/editor/_source/internals/fcklanguagemanager.js +161 -0
- data/fckeditor/editor/_source/internals/fcklisthandler.js +152 -0
- data/fckeditor/editor/_source/internals/fcklistslib.js +60 -0
- data/fckeditor/editor/_source/internals/fckplugins.js +46 -0
- data/fckeditor/editor/_source/internals/fckregexlib.js +95 -0
- data/fckeditor/editor/_source/internals/fckselection.js +24 -0
- data/fckeditor/editor/_source/internals/fckselection_gecko.js +151 -0
- data/fckeditor/editor/_source/internals/fckselection_ie.js +158 -0
- data/fckeditor/editor/_source/internals/fcktablehandler.js +385 -0
- data/fckeditor/editor/_source/internals/fcktablehandler_gecko.js +57 -0
- data/fckeditor/editor/_source/internals/fcktablehandler_ie.js +58 -0
- data/fckeditor/editor/_source/internals/fcktoolbaritems.js +121 -0
- data/fckeditor/editor/_source/internals/fcktoolbarset.js +357 -0
- data/fckeditor/editor/_source/internals/fcktools.js +225 -0
- data/fckeditor/editor/_source/internals/fcktools_gecko.js +235 -0
- data/fckeditor/editor/_source/internals/fcktools_ie.js +214 -0
- data/fckeditor/editor/_source/internals/fckundo_gecko.js +27 -0
- data/fckeditor/editor/_source/internals/fckundo_ie.js +123 -0
- data/fckeditor/editor/_source/internals/fckurlparams.js +39 -0
- data/fckeditor/editor/_source/internals/fckxhtml.js +466 -0
- data/fckeditor/editor/_source/internals/fckxhtml_gecko.js +66 -0
- data/fckeditor/editor/_source/internals/fckxhtml_ie.js +194 -0
- data/fckeditor/editor/_source/internals/fckxhtmlentities.js +345 -0
- data/fckeditor/editor/css/behaviors/disablehandles.htc +15 -0
- data/fckeditor/editor/css/behaviors/showtableborders.htc +36 -0
- data/fckeditor/editor/css/fck_editorarea.css +91 -0
- data/fckeditor/editor/css/fck_internal.css +111 -0
- data/fckeditor/editor/css/fck_showtableborders_gecko.css +42 -0
- data/fckeditor/editor/css/images/fck_anchor.gif +0 -0
- data/fckeditor/editor/css/images/fck_flashlogo.gif +0 -0
- data/fckeditor/editor/css/images/fck_hiddenfield.gif +0 -0
- data/fckeditor/editor/css/images/fck_pagebreak.gif +0 -0
- data/fckeditor/editor/dialog/common/fck_dialog_common.css +83 -0
- data/fckeditor/editor/dialog/common/fck_dialog_common.js +154 -0
- data/fckeditor/editor/dialog/common/fcknumericfield.htc +24 -0
- data/fckeditor/editor/dialog/common/images/locked.gif +0 -0
- data/fckeditor/editor/dialog/common/images/reset.gif +0 -0
- data/fckeditor/editor/dialog/common/images/unlocked.gif +0 -0
- data/fckeditor/editor/dialog/common/moz-bindings.xml +30 -0
- data/fckeditor/editor/dialog/fck_about.html +155 -0
- data/fckeditor/editor/dialog/fck_about/logo_fckeditor.gif +0 -0
- data/fckeditor/editor/dialog/fck_about/logo_fredck.gif +0 -0
- data/fckeditor/editor/dialog/fck_anchor.html +227 -0
- data/fckeditor/editor/dialog/fck_button.html +107 -0
- data/fckeditor/editor/dialog/fck_checkbox.html +107 -0
- data/fckeditor/editor/dialog/fck_colorselector.html +171 -0
- data/fckeditor/editor/dialog/fck_docprops.html +600 -0
- data/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html +113 -0
- data/fckeditor/editor/dialog/fck_find.html +173 -0
- data/fckeditor/editor/dialog/fck_flash.html +146 -0
- data/fckeditor/editor/dialog/fck_flash/fck_flash.js +288 -0
- data/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html +46 -0
- data/fckeditor/editor/dialog/fck_form.html +105 -0
- data/fckeditor/editor/dialog/fck_hiddenfield.html +116 -0
- data/fckeditor/editor/dialog/fck_image.html +252 -0
- data/fckeditor/editor/dialog/fck_image/fck_image.js +486 -0
- data/fckeditor/editor/dialog/fck_image/fck_image_preview.html +66 -0
- data/fckeditor/editor/dialog/fck_link.html +293 -0
- data/fckeditor/editor/dialog/fck_link/fck_link.js +664 -0
- data/fckeditor/editor/dialog/fck_listprop.html +116 -0
- data/fckeditor/editor/dialog/fck_paste.html +285 -0
- data/fckeditor/editor/dialog/fck_radiobutton.html +107 -0
- data/fckeditor/editor/dialog/fck_replace.html +156 -0
- data/fckeditor/editor/dialog/fck_select.html +176 -0
- data/fckeditor/editor/dialog/fck_select/fck_select.js +169 -0
- data/fckeditor/editor/dialog/fck_smiley.html +105 -0
- data/fckeditor/editor/dialog/fck_source.html +65 -0
- data/fckeditor/editor/dialog/fck_specialchar.html +113 -0
- data/fckeditor/editor/dialog/fck_spellerpages.html +64 -0
- data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html +0 -0
- data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js +87 -0
- data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html +153 -0
- data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm +174 -0
- data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php +196 -0
- data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl +180 -0
- data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js +462 -0
- data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html +71 -0
- data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css +49 -0
- data/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js +272 -0
- data/fckeditor/editor/dialog/fck_table.html +286 -0
- data/fckeditor/editor/dialog/fck_tablecell.html +255 -0
- data/fckeditor/editor/dialog/fck_template.html +242 -0
- data/fckeditor/editor/dialog/fck_template/images/template1.gif +0 -0
- data/fckeditor/editor/dialog/fck_template/images/template2.gif +0 -0
- data/fckeditor/editor/dialog/fck_template/images/template3.gif +0 -0
- data/fckeditor/editor/dialog/fck_textarea.html +94 -0
- data/fckeditor/editor/dialog/fck_textfield.html +139 -0
- data/fckeditor/editor/fckdebug.html +153 -0
- data/fckeditor/editor/fckdialog.html +324 -0
- data/fckeditor/editor/fckeditor.html +227 -0
- data/fckeditor/editor/fckeditor.original.html +319 -0
- data/fckeditor/editor/filemanager/browser/default/browser.css +88 -0
- data/fckeditor/editor/filemanager/browser/default/browser.html +154 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/asp/basexml.asp +62 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/asp/class_upload.asp +234 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/asp/commands.asp +183 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/asp/config.asp +49 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/asp/connector.asp +124 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/asp/io.asp +89 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/asp/util.asp +55 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx +30 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/cfm/config.cfm +99 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/cfm/connector.cfm +363 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/lasso/config.lasso +65 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/lasso/connector.lasso +249 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/perl/basexml.pl +63 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/perl/commands.pl +158 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/perl/connector.cgi +137 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/perl/io.pl +131 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/perl/upload_fck.pl +667 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/perl/util.pl +60 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/php/basexml.php +75 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/php/commands.php +222 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/php/config.php +56 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php +113 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/php/io.php +101 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/php/util.php +41 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/py/connector.py +785 -0
- data/fckeditor/editor/filemanager/browser/default/connectors/test.html +180 -0
- data/fckeditor/editor/filemanager/browser/default/frmactualfolder.html +67 -0
- data/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html +113 -0
- data/fckeditor/editor/filemanager/browser/default/frmfolders.html +196 -0
- data/fckeditor/editor/filemanager/browser/default/frmresourceslist.html +160 -0
- data/fckeditor/editor/filemanager/browser/default/frmresourcetype.html +65 -0
- data/fckeditor/editor/filemanager/browser/default/frmupload.html +113 -0
- data/fckeditor/editor/filemanager/browser/default/images/ButtonArrow.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/Folder.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/Folder32.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/FolderOpened.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/FolderOpened32.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/FolderUp.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/ai.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/avi.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/bmp.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/cs.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/default.icon.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/dll.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/doc.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/exe.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/fla.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/gif.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/htm.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/html.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/jpg.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/js.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/mdb.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/mp3.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/pdf.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/png.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/ppt.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/rdp.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/swf.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/swt.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/txt.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/vsd.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/xls.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/xml.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/32/zip.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/ai.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/avi.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/bmp.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/cs.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/default.icon.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/dll.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/doc.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/exe.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/fla.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/gif.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/htm.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/html.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/jpg.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/js.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/mdb.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/mp3.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/pdf.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/png.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/ppt.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/rdp.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/swf.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/swt.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/txt.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/vsd.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/xls.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/xml.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/icons/zip.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/images/spacer.gif +0 -0
- data/fckeditor/editor/filemanager/browser/default/js/common.js +55 -0
- data/fckeditor/editor/filemanager/browser/default/js/fckxml.js +130 -0
- data/fckeditor/editor/filemanager/upload/asp/class_upload.asp +234 -0
- data/fckeditor/editor/filemanager/upload/asp/config.asp +52 -0
- data/fckeditor/editor/filemanager/upload/asp/io.asp +29 -0
- data/fckeditor/editor/filemanager/upload/asp/upload.asp +121 -0
- data/fckeditor/editor/filemanager/upload/aspx/upload.aspx +30 -0
- data/fckeditor/editor/filemanager/upload/cfm/config.cfm +98 -0
- data/fckeditor/editor/filemanager/upload/cfm/upload.cfm +168 -0
- data/fckeditor/editor/filemanager/upload/lasso/config.lasso +65 -0
- data/fckeditor/editor/filemanager/upload/lasso/upload.lasso +157 -0
- data/fckeditor/editor/filemanager/upload/php/config.php +56 -0
- data/fckeditor/editor/filemanager/upload/php/upload.php +124 -0
- data/fckeditor/editor/filemanager/upload/php/util.php +40 -0
- data/fckeditor/editor/filemanager/upload/test.html +133 -0
- data/fckeditor/editor/images/anchor.gif +0 -0
- data/fckeditor/editor/images/arrow_ltr.gif +0 -0
- data/fckeditor/editor/images/arrow_rtl.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/angel_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/angry_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/broken_heart.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/cake.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/confused_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/cry_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/devil_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/embaressed_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/envelope.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/heart.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/kiss.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/lightbulb.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/omg_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/regular_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/sad_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/shades_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/teeth_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/thumbs_down.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/thumbs_up.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/tounge_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif +0 -0
- data/fckeditor/editor/images/smiley/msn/wink_smile.gif +0 -0
- data/fckeditor/editor/images/spacer.gif +0 -0
- data/fckeditor/editor/js/fckeditorcode_gecko.js +98 -0
- data/fckeditor/editor/js/fckeditorcode_ie.js +99 -0
- data/fckeditor/editor/lang/_getfontformat.html +85 -0
- data/fckeditor/editor/lang/_translationstatus.txt +76 -0
- data/fckeditor/editor/lang/af.js +504 -0
- data/fckeditor/editor/lang/ar.js +504 -0
- data/fckeditor/editor/lang/bg.js +504 -0
- data/fckeditor/editor/lang/bn.js +504 -0
- data/fckeditor/editor/lang/bs.js +504 -0
- data/fckeditor/editor/lang/ca.js +504 -0
- data/fckeditor/editor/lang/cs.js +504 -0
- data/fckeditor/editor/lang/da.js +504 -0
- data/fckeditor/editor/lang/de.js +504 -0
- data/fckeditor/editor/lang/el.js +504 -0
- data/fckeditor/editor/lang/en-au.js +504 -0
- data/fckeditor/editor/lang/en-ca.js +504 -0
- data/fckeditor/editor/lang/en-uk.js +504 -0
- data/fckeditor/editor/lang/en.js +504 -0
- data/fckeditor/editor/lang/eo.js +504 -0
- data/fckeditor/editor/lang/es.js +504 -0
- data/fckeditor/editor/lang/et.js +504 -0
- data/fckeditor/editor/lang/eu.js +505 -0
- data/fckeditor/editor/lang/fa.js +504 -0
- data/fckeditor/editor/lang/fi.js +504 -0
- data/fckeditor/editor/lang/fo.js +504 -0
- data/fckeditor/editor/lang/fr.js +504 -0
- data/fckeditor/editor/lang/gl.js +504 -0
- data/fckeditor/editor/lang/he.js +504 -0
- data/fckeditor/editor/lang/hi.js +504 -0
- data/fckeditor/editor/lang/hr.js +504 -0
- data/fckeditor/editor/lang/hu.js +504 -0
- data/fckeditor/editor/lang/it.js +504 -0
- data/fckeditor/editor/lang/ja.js +504 -0
- data/fckeditor/editor/lang/km.js +504 -0
- data/fckeditor/editor/lang/ko.js +504 -0
- data/fckeditor/editor/lang/lt.js +504 -0
- data/fckeditor/editor/lang/lv.js +504 -0
- data/fckeditor/editor/lang/mn.js +504 -0
- data/fckeditor/editor/lang/ms.js +504 -0
- data/fckeditor/editor/lang/nb.js +504 -0
- data/fckeditor/editor/lang/nl.js +504 -0
- data/fckeditor/editor/lang/no.js +504 -0
- data/fckeditor/editor/lang/pl.js +504 -0
- data/fckeditor/editor/lang/pt-br.js +504 -0
- data/fckeditor/editor/lang/pt.js +504 -0
- data/fckeditor/editor/lang/ro.js +504 -0
- data/fckeditor/editor/lang/ru.js +504 -0
- data/fckeditor/editor/lang/sk.js +504 -0
- data/fckeditor/editor/lang/sl.js +504 -0
- data/fckeditor/editor/lang/sr-latn.js +504 -0
- data/fckeditor/editor/lang/sr.js +504 -0
- data/fckeditor/editor/lang/sv.js +504 -0
- data/fckeditor/editor/lang/th.js +504 -0
- data/fckeditor/editor/lang/tr.js +504 -0
- data/fckeditor/editor/lang/uk.js +504 -0
- data/fckeditor/editor/lang/vi.js +504 -0
- data/fckeditor/editor/lang/zh-cn.js +504 -0
- data/fckeditor/editor/lang/zh.js +504 -0
- data/fckeditor/editor/plugins/autogrow/fckplugin.js +92 -0
- data/fckeditor/editor/plugins/placeholder/fck_placeholder.html +100 -0
- data/fckeditor/editor/plugins/placeholder/fckplugin.js +187 -0
- data/fckeditor/editor/plugins/placeholder/lang/de.js +27 -0
- data/fckeditor/editor/plugins/placeholder/lang/en.js +27 -0
- data/fckeditor/editor/plugins/placeholder/lang/fr.js +27 -0
- data/fckeditor/editor/plugins/placeholder/lang/it.js +27 -0
- data/fckeditor/editor/plugins/placeholder/lang/pl.js +27 -0
- data/fckeditor/editor/plugins/placeholder/placeholder.gif +0 -0
- data/fckeditor/editor/plugins/simplecommands/fckplugin.js +29 -0
- data/fckeditor/editor/plugins/tablecommands/fckplugin.js +32 -0
- data/fckeditor/editor/skins/_fckviewstrips.html +121 -0
- data/fckeditor/editor/skins/default/fck_dialog.css +137 -0
- data/fckeditor/editor/skins/default/fck_editor.css +464 -0
- data/fckeditor/editor/skins/default/fck_strip.gif +0 -0
- data/fckeditor/editor/skins/default/images/toolbar.arrowright.gif +0 -0
- data/fckeditor/editor/skins/default/images/toolbar.buttonarrow.gif +0 -0
- data/fckeditor/editor/skins/default/images/toolbar.collapse.gif +0 -0
- data/fckeditor/editor/skins/default/images/toolbar.end.gif +0 -0
- data/fckeditor/editor/skins/default/images/toolbar.expand.gif +0 -0
- data/fckeditor/editor/skins/default/images/toolbar.separator.gif +0 -0
- data/fckeditor/editor/skins/default/images/toolbar.start.gif +0 -0
- data/fckeditor/editor/skins/office2003/fck_dialog.css +138 -0
- data/fckeditor/editor/skins/office2003/fck_editor.css +476 -0
- data/fckeditor/editor/skins/office2003/fck_strip.gif +0 -0
- data/fckeditor/editor/skins/office2003/images/toolbar.arrowright.gif +0 -0
- data/fckeditor/editor/skins/office2003/images/toolbar.bg.gif +0 -0
- data/fckeditor/editor/skins/office2003/images/toolbar.buttonarrow.gif +0 -0
- data/fckeditor/editor/skins/office2003/images/toolbar.collapse.gif +0 -0
- data/fckeditor/editor/skins/office2003/images/toolbar.end.gif +0 -0
- data/fckeditor/editor/skins/office2003/images/toolbar.expand.gif +0 -0
- data/fckeditor/editor/skins/office2003/images/toolbar.separator.gif +0 -0
- data/fckeditor/editor/skins/office2003/images/toolbar.start.gif +0 -0
- data/fckeditor/editor/skins/silver/fck_dialog.css +141 -0
- data/fckeditor/editor/skins/silver/fck_editor.css +473 -0
- data/fckeditor/editor/skins/silver/fck_strip.gif +0 -0
- data/fckeditor/editor/skins/silver/images/toolbar.arrowright.gif +0 -0
- data/fckeditor/editor/skins/silver/images/toolbar.buttonarrow.gif +0 -0
- data/fckeditor/editor/skins/silver/images/toolbar.buttonbg.gif +0 -0
- data/fckeditor/editor/skins/silver/images/toolbar.collapse.gif +0 -0
- data/fckeditor/editor/skins/silver/images/toolbar.end.gif +0 -0
- data/fckeditor/editor/skins/silver/images/toolbar.expand.gif +0 -0
- data/fckeditor/editor/skins/silver/images/toolbar.separator.gif +0 -0
- data/fckeditor/editor/skins/silver/images/toolbar.start.gif +0 -0
- data/fckeditor/fckconfig.js +224 -0
- data/fckeditor/fckeditor.js +214 -0
- data/fckeditor/fckstyles.xml +53 -0
- data/fckeditor/fcktemplates.xml +103 -0
- data/lib/Wiki2GoEditor/Install/editor.rb +39 -0
- data/test/test_install.rb +40 -0
- metadata +517 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
3
|
+
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
|
4
|
+
*
|
|
5
|
+
* == BEGIN LICENSE ==
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the terms of any of the following licenses at your
|
|
8
|
+
* choice:
|
|
9
|
+
*
|
|
10
|
+
* - GNU General Public License Version 2 or later (the "GPL")
|
|
11
|
+
* http://www.gnu.org/licenses/gpl.html
|
|
12
|
+
*
|
|
13
|
+
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
14
|
+
* http://www.gnu.org/licenses/lgpl.html
|
|
15
|
+
*
|
|
16
|
+
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
17
|
+
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
18
|
+
*
|
|
19
|
+
* == END LICENSE ==
|
|
20
|
+
*
|
|
21
|
+
* Extensions to the JavaScript Core.
|
|
22
|
+
*
|
|
23
|
+
* All custom extentions functions are PascalCased to differ from the standard
|
|
24
|
+
* camelCased ones.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
String.prototype.Contains = function( textToCheck )
|
|
28
|
+
{
|
|
29
|
+
return ( this.indexOf( textToCheck ) > -1 ) ;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
String.prototype.Equals = function()
|
|
33
|
+
{
|
|
34
|
+
var aArgs = arguments ;
|
|
35
|
+
|
|
36
|
+
// The arguments could also be a single array.
|
|
37
|
+
if ( aArgs.length == 1 && aArgs[0].pop )
|
|
38
|
+
aArgs = aArgs[0] ;
|
|
39
|
+
|
|
40
|
+
for ( var i = 0 ; i < aArgs.length ; i++ )
|
|
41
|
+
{
|
|
42
|
+
if ( this == aArgs[i] )
|
|
43
|
+
return true ;
|
|
44
|
+
}
|
|
45
|
+
return false ;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
String.prototype.IEquals = function()
|
|
49
|
+
{
|
|
50
|
+
var thisUpper = this.toUpperCase() ;
|
|
51
|
+
|
|
52
|
+
var aArgs = arguments ;
|
|
53
|
+
|
|
54
|
+
// The arguments could also be a single array.
|
|
55
|
+
if ( aArgs.length == 1 && aArgs[0].pop )
|
|
56
|
+
aArgs = aArgs[0] ;
|
|
57
|
+
|
|
58
|
+
for ( var i = 0 ; i < aArgs.length ; i++ )
|
|
59
|
+
{
|
|
60
|
+
if ( thisUpper == aArgs[i].toUpperCase() )
|
|
61
|
+
return true ;
|
|
62
|
+
}
|
|
63
|
+
return false ;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
String.prototype.ReplaceAll = function( searchArray, replaceArray )
|
|
67
|
+
{
|
|
68
|
+
var replaced = this ;
|
|
69
|
+
|
|
70
|
+
for ( var i = 0 ; i < searchArray.length ; i++ )
|
|
71
|
+
{
|
|
72
|
+
replaced = replaced.replace( searchArray[i], replaceArray[i] ) ;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return replaced ;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
Array.prototype.AddItem = function( item )
|
|
79
|
+
{
|
|
80
|
+
var i = this.length ;
|
|
81
|
+
this[ i ] = item ;
|
|
82
|
+
return i ;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
Array.prototype.IndexOf = function( value )
|
|
86
|
+
{
|
|
87
|
+
for ( var i = 0 ; i < this.length ; i++ )
|
|
88
|
+
{
|
|
89
|
+
if ( this[i] == value )
|
|
90
|
+
return i ;
|
|
91
|
+
}
|
|
92
|
+
return -1 ;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
String.prototype.StartsWith = function( value )
|
|
96
|
+
{
|
|
97
|
+
return ( this.substr( 0, value.length ) == value ) ;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Extends the String object, creating a "EndsWith" method on it.
|
|
101
|
+
String.prototype.EndsWith = function( value, ignoreCase )
|
|
102
|
+
{
|
|
103
|
+
var L1 = this.length ;
|
|
104
|
+
var L2 = value.length ;
|
|
105
|
+
|
|
106
|
+
if ( L2 > L1 )
|
|
107
|
+
return false ;
|
|
108
|
+
|
|
109
|
+
if ( ignoreCase )
|
|
110
|
+
{
|
|
111
|
+
var oRegex = new RegExp( value + '$' , 'i' ) ;
|
|
112
|
+
return oRegex.test( this ) ;
|
|
113
|
+
}
|
|
114
|
+
else
|
|
115
|
+
return ( L2 == 0 || this.substr( L1 - L2, L2 ) == value ) ;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
String.prototype.Remove = function( start, length )
|
|
119
|
+
{
|
|
120
|
+
var s = '' ;
|
|
121
|
+
|
|
122
|
+
if ( start > 0 )
|
|
123
|
+
s = this.substring( 0, start ) ;
|
|
124
|
+
|
|
125
|
+
if ( start + length < this.length )
|
|
126
|
+
s += this.substring( start + length , this.length ) ;
|
|
127
|
+
|
|
128
|
+
return s ;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
String.prototype.Trim = function()
|
|
132
|
+
{
|
|
133
|
+
// We are not using \s because we don't want "non-breaking spaces to be caught".
|
|
134
|
+
return this.replace( /(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '' ) ;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
String.prototype.LTrim = function()
|
|
138
|
+
{
|
|
139
|
+
// We are not using \s because we don't want "non-breaking spaces to be caught".
|
|
140
|
+
return this.replace( /^[ \t\n\r]*/g, '' ) ;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
String.prototype.RTrim = function()
|
|
144
|
+
{
|
|
145
|
+
// We are not using \s because we don't want "non-breaking spaces to be caught".
|
|
146
|
+
return this.replace( /[ \t\n\r]*$/g, '' ) ;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
String.prototype.ReplaceNewLineChars = function( replacement )
|
|
150
|
+
{
|
|
151
|
+
return this.replace( /\n/g, replacement ) ;
|
|
152
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
3
|
+
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
|
4
|
+
*
|
|
5
|
+
* == BEGIN LICENSE ==
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the terms of any of the following licenses at your
|
|
8
|
+
* choice:
|
|
9
|
+
*
|
|
10
|
+
* - GNU General Public License Version 2 or later (the "GPL")
|
|
11
|
+
* http://www.gnu.org/licenses/gpl.html
|
|
12
|
+
*
|
|
13
|
+
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
14
|
+
* http://www.gnu.org/licenses/lgpl.html
|
|
15
|
+
*
|
|
16
|
+
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
17
|
+
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
18
|
+
*
|
|
19
|
+
* == END LICENSE ==
|
|
20
|
+
*
|
|
21
|
+
* This is a utility object which can be used to load specific components of
|
|
22
|
+
* FCKeditor, including all dependencies.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
var FCK_GENERIC = 1 ;
|
|
26
|
+
var FCK_GENERIC_SPECIFIC = 2 ;
|
|
27
|
+
var FCK_SPECIFIC = 3 ;
|
|
28
|
+
|
|
29
|
+
var FCKScriptLoader = new Object() ;
|
|
30
|
+
FCKScriptLoader.FCKeditorPath = '/fckeditor/' ;
|
|
31
|
+
|
|
32
|
+
FCKScriptLoader._Scripts = new Object() ;
|
|
33
|
+
FCKScriptLoader._LoadedScripts = new Object() ;
|
|
34
|
+
|
|
35
|
+
FCKScriptLoader._IsIE = (/msie/).test( navigator.userAgent.toLowerCase() ) ;
|
|
36
|
+
|
|
37
|
+
FCKScriptLoader.Load = function( scriptName )
|
|
38
|
+
{
|
|
39
|
+
// Check if the script has already been loaded.
|
|
40
|
+
if ( scriptName in FCKScriptLoader._LoadedScripts )
|
|
41
|
+
return ;
|
|
42
|
+
|
|
43
|
+
var oScriptInfo = this._Scripts[ scriptName ] ;
|
|
44
|
+
|
|
45
|
+
if ( !oScriptInfo )
|
|
46
|
+
{
|
|
47
|
+
alert( 'FCKScriptLoader: The script "' + scriptName + '" could not be loaded' ) ;
|
|
48
|
+
return ;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
for ( var i = 0 ; i < oScriptInfo.Dependency.length ; i++ )
|
|
52
|
+
{
|
|
53
|
+
this.Load( oScriptInfo.Dependency[i] ) ;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
var sBaseScriptName = oScriptInfo.BasePath + scriptName.toLowerCase() ;
|
|
57
|
+
|
|
58
|
+
if ( oScriptInfo.Compatibility == FCK_GENERIC || oScriptInfo.Compatibility == FCK_GENERIC_SPECIFIC )
|
|
59
|
+
this._LoadScript( sBaseScriptName + '.js' ) ;
|
|
60
|
+
|
|
61
|
+
if ( oScriptInfo.Compatibility == FCK_SPECIFIC || oScriptInfo.Compatibility == FCK_GENERIC_SPECIFIC )
|
|
62
|
+
{
|
|
63
|
+
if ( this._IsIE )
|
|
64
|
+
this._LoadScript( sBaseScriptName + '_ie.js' ) ;
|
|
65
|
+
else
|
|
66
|
+
this._LoadScript( sBaseScriptName + '_gecko.js' ) ;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
FCKScriptLoader._LoadedScripts[ scriptName ] = true ;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
FCKScriptLoader._LoadScript = function( scriptPathFromSource )
|
|
73
|
+
{
|
|
74
|
+
document.write( '<script type="text/javascript" src="' + this.FCKeditorPath + 'editor/_source/' + scriptPathFromSource + '" onerror="alert(\'Error loading \' + scriptPathFromSource);"><\/script>' ) ;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
FCKScriptLoader.AddScript = function( scriptName, scriptBasePath, dependency, compatibility )
|
|
78
|
+
{
|
|
79
|
+
this._Scripts[ scriptName ] =
|
|
80
|
+
{
|
|
81
|
+
BasePath : scriptBasePath || '',
|
|
82
|
+
Dependency : dependency || [],
|
|
83
|
+
Compatibility : compatibility || FCK_GENERIC
|
|
84
|
+
} ;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/*
|
|
88
|
+
* ####################################
|
|
89
|
+
* ### Scripts Definition List
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
FCKScriptLoader.AddScript( 'FCKConstants' ) ;
|
|
93
|
+
FCKScriptLoader.AddScript( 'FCKJSCoreExtensions' ) ;
|
|
94
|
+
FCKScriptLoader.AddScript( 'FCKImagePreloader' , 'classes/' ) ;
|
|
95
|
+
FCKScriptLoader.AddScript( 'FCKBrowserInfo' , 'internals/' , ['FCKJSCoreExtensions'] ) ;
|
|
96
|
+
FCKScriptLoader.AddScript( 'FCKConfig' , 'internals/' ) ;
|
|
97
|
+
FCKScriptLoader.AddScript( 'FCKListsLib' , 'internals/' ) ;
|
|
98
|
+
FCKScriptLoader.AddScript( 'FCKDebug' , 'internals/' , ['FCKConfig'] ) ;
|
|
99
|
+
FCKScriptLoader.AddScript( 'FCKDomTools' , 'internals/' , ['FCKJSCoreExtensions'], FCK_GENERIC ) ;
|
|
100
|
+
FCKScriptLoader.AddScript( 'FCKTools' , 'internals/' , ['FCKJSCoreExtensions','FCKBrowserInfo'], FCK_GENERIC_SPECIFIC ) ;
|
|
101
|
+
FCKScriptLoader.AddScript( 'FCKElementPath' , 'classes/' , ['FCKListsLib'], FCK_GENERIC ) ;
|
|
102
|
+
FCKScriptLoader.AddScript( 'FCKDocumentFragment', 'classes/' , ['FCKDomTools'], FCK_SPECIFIC ) ;
|
|
103
|
+
FCKScriptLoader.AddScript( 'FCKDomRange' , 'classes/' , ['FCKBrowserInfo','FCKJSCoreExtensions','FCKW3CRange','FCKElementPath','FCKDomTools','FCKTools','FCKDocumentFragment'], FCK_GENERIC_SPECIFIC ) ;
|
|
104
|
+
FCKScriptLoader.AddScript( 'FCKEnterKey' , 'classes/' , ['FCKDomRange','FCKDomTools','FCKTools','FCKKeystrokeHandler','FCKListHandler'], FCK_GENERIC ) ;
|
|
105
|
+
FCKScriptLoader.AddScript( 'FCKKeystrokeHandler', 'classes/' , ['FCKConstants','FCKBrowserInfo','FCKTools'], FCK_GENERIC ) ;
|
|
106
|
+
FCKScriptLoader.AddScript( 'FCKListHandler' , 'internals/' , ['FCKJSCoreExtensions','FCKDomTools','FCKTools'], FCK_GENERIC ) ;
|
|
107
|
+
FCKScriptLoader.AddScript( 'FCKW3CRange' , 'classes/' , ['FCKDomTools','FCKTools','FCKDocumentFragment'], FCK_GENERIC ) ;
|
|
108
|
+
// ####################################
|
|
@@ -0,0 +1,859 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
3
|
+
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
|
4
|
+
*
|
|
5
|
+
* == BEGIN LICENSE ==
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the terms of any of the following licenses at your
|
|
8
|
+
* choice:
|
|
9
|
+
*
|
|
10
|
+
* - GNU General Public License Version 2 or later (the "GPL")
|
|
11
|
+
* http://www.gnu.org/licenses/gpl.html
|
|
12
|
+
*
|
|
13
|
+
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
14
|
+
* http://www.gnu.org/licenses/lgpl.html
|
|
15
|
+
*
|
|
16
|
+
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
17
|
+
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
18
|
+
*
|
|
19
|
+
* == END LICENSE ==
|
|
20
|
+
*
|
|
21
|
+
* Creation and initialization of the "FCK" object. This is the main object
|
|
22
|
+
* that represents an editor instance.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
// FCK represents the active editor instance.
|
|
26
|
+
var FCK =
|
|
27
|
+
{
|
|
28
|
+
Name : FCKURLParams[ 'InstanceName' ],
|
|
29
|
+
Status : FCK_STATUS_NOTLOADED,
|
|
30
|
+
EditMode : FCK_EDITMODE_WYSIWYG,
|
|
31
|
+
Toolbar : null,
|
|
32
|
+
HasFocus : false,
|
|
33
|
+
|
|
34
|
+
GetLinkedFieldValue : function()
|
|
35
|
+
{
|
|
36
|
+
return this.LinkedField.value ;
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
GetParentForm : function()
|
|
40
|
+
{
|
|
41
|
+
return this.LinkedField.form ;
|
|
42
|
+
} ,
|
|
43
|
+
|
|
44
|
+
// # START : IsDirty implementation
|
|
45
|
+
|
|
46
|
+
StartupValue : '',
|
|
47
|
+
|
|
48
|
+
IsDirty : function()
|
|
49
|
+
{
|
|
50
|
+
if ( this.EditMode == FCK_EDITMODE_SOURCE )
|
|
51
|
+
return ( this.StartupValue != this.EditingArea.Textarea.value ) ;
|
|
52
|
+
else
|
|
53
|
+
return ( this.StartupValue != this.EditorDocument.body.innerHTML ) ;
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
ResetIsDirty : function()
|
|
57
|
+
{
|
|
58
|
+
if ( this.EditMode == FCK_EDITMODE_SOURCE )
|
|
59
|
+
this.StartupValue = this.EditingArea.Textarea.value ;
|
|
60
|
+
else if ( this.EditorDocument.body )
|
|
61
|
+
this.StartupValue = this.EditorDocument.body.innerHTML ;
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
// # END : IsDirty implementation
|
|
65
|
+
|
|
66
|
+
StartEditor : function()
|
|
67
|
+
{
|
|
68
|
+
this.TempBaseTag = FCKConfig.BaseHref.length > 0 ? '<base href="' + FCKConfig.BaseHref + '" _fcktemp="true"></base>' : '' ;
|
|
69
|
+
|
|
70
|
+
// Setup the keystroke handler.
|
|
71
|
+
var oKeystrokeHandler = FCK.KeystrokeHandler = new FCKKeystrokeHandler() ;
|
|
72
|
+
oKeystrokeHandler.OnKeystroke = _FCK_KeystrokeHandler_OnKeystroke ;
|
|
73
|
+
|
|
74
|
+
oKeystrokeHandler.SetKeystrokes( FCKConfig.Keystrokes ) ;
|
|
75
|
+
|
|
76
|
+
// In IE7, if the editor tries to access the clipboard by code, a dialog is
|
|
77
|
+
// shown to the user asking if the application is allowed to access or not.
|
|
78
|
+
// Due to the IE implementation of it, the KeystrokeHandler will not work
|
|
79
|
+
//well in this case, so we must leave the pasting keys to have their default behavior.
|
|
80
|
+
if ( FCKBrowserInfo.IsIE7 )
|
|
81
|
+
{
|
|
82
|
+
if ( ( CTRL + 86 /*V*/ ) in oKeystrokeHandler.Keystrokes )
|
|
83
|
+
oKeystrokeHandler.SetKeystrokes( [ CTRL + 86, true ] ) ;
|
|
84
|
+
|
|
85
|
+
if ( ( SHIFT + 45 /*INS*/ ) in oKeystrokeHandler.Keystrokes )
|
|
86
|
+
oKeystrokeHandler.SetKeystrokes( [ SHIFT + 45, true ] ) ;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
this.EditingArea = new FCKEditingArea( document.getElementById( 'xEditingArea' ) ) ;
|
|
90
|
+
this.EditingArea.FFSpellChecker = false ;
|
|
91
|
+
|
|
92
|
+
// Final setup of the lists lib.
|
|
93
|
+
FCKListsLib.Setup() ;
|
|
94
|
+
|
|
95
|
+
// Set the editor's startup contents
|
|
96
|
+
this.SetHTML( this.GetLinkedFieldValue(), true ) ;
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
Focus : function()
|
|
100
|
+
{
|
|
101
|
+
FCK.EditingArea.Focus() ;
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
SetStatus : function( newStatus )
|
|
105
|
+
{
|
|
106
|
+
this.Status = newStatus ;
|
|
107
|
+
|
|
108
|
+
if ( newStatus == FCK_STATUS_ACTIVE )
|
|
109
|
+
{
|
|
110
|
+
FCKFocusManager.AddWindow( window, true ) ;
|
|
111
|
+
|
|
112
|
+
if ( FCKBrowserInfo.IsIE )
|
|
113
|
+
FCKFocusManager.AddWindow( window.frameElement, true ) ;
|
|
114
|
+
|
|
115
|
+
// Force the focus in the editor.
|
|
116
|
+
if ( FCKConfig.StartupFocus )
|
|
117
|
+
FCK.Focus() ;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
this.Events.FireEvent( 'OnStatusChange', newStatus ) ;
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
// Fixes the body by moving all inline and text nodes to appropriate block
|
|
124
|
+
// elements.
|
|
125
|
+
FixBody : function()
|
|
126
|
+
{
|
|
127
|
+
var sBlockTag = FCKConfig.EnterMode ;
|
|
128
|
+
|
|
129
|
+
// In 'br' mode, no fix must be done.
|
|
130
|
+
if ( sBlockTag != 'p' && sBlockTag != 'div' )
|
|
131
|
+
return ;
|
|
132
|
+
|
|
133
|
+
var oDocument = this.EditorDocument ;
|
|
134
|
+
|
|
135
|
+
if ( !oDocument )
|
|
136
|
+
return ;
|
|
137
|
+
|
|
138
|
+
var oBody = oDocument.body ;
|
|
139
|
+
|
|
140
|
+
if ( !oBody )
|
|
141
|
+
return ;
|
|
142
|
+
|
|
143
|
+
FCKDomTools.TrimNode( oBody ) ;
|
|
144
|
+
|
|
145
|
+
var oNode = oBody.firstChild ;
|
|
146
|
+
var oNewBlock ;
|
|
147
|
+
|
|
148
|
+
while ( oNode )
|
|
149
|
+
{
|
|
150
|
+
var bMoveNode = false ;
|
|
151
|
+
|
|
152
|
+
switch ( oNode.nodeType )
|
|
153
|
+
{
|
|
154
|
+
// Element Node.
|
|
155
|
+
case 1 :
|
|
156
|
+
if ( !FCKListsLib.BlockElements[ oNode.nodeName.toLowerCase() ] )
|
|
157
|
+
bMoveNode = true ;
|
|
158
|
+
break ;
|
|
159
|
+
|
|
160
|
+
// Text Node.
|
|
161
|
+
case 3 :
|
|
162
|
+
// Ignore space only or empty text.
|
|
163
|
+
if ( oNewBlock || oNode.nodeValue.Trim().length > 0 )
|
|
164
|
+
bMoveNode = true ;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if ( bMoveNode )
|
|
168
|
+
{
|
|
169
|
+
var oParent = oNode.parentNode ;
|
|
170
|
+
|
|
171
|
+
if ( !oNewBlock )
|
|
172
|
+
oNewBlock = oParent.insertBefore( oDocument.createElement( sBlockTag ), oNode ) ;
|
|
173
|
+
|
|
174
|
+
oNewBlock.appendChild( oParent.removeChild( oNode ) ) ;
|
|
175
|
+
|
|
176
|
+
oNode = oNewBlock.nextSibling ;
|
|
177
|
+
}
|
|
178
|
+
else
|
|
179
|
+
{
|
|
180
|
+
if ( oNewBlock )
|
|
181
|
+
{
|
|
182
|
+
FCKDomTools.TrimNode( oNewBlock ) ;
|
|
183
|
+
oNewBlock = null ;
|
|
184
|
+
}
|
|
185
|
+
oNode = oNode.nextSibling ;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if ( oNewBlock )
|
|
190
|
+
FCKDomTools.TrimNode( oNewBlock ) ;
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
GetXHTML : function( format )
|
|
194
|
+
{
|
|
195
|
+
// We assume that if the user is in source editing, the editor value must
|
|
196
|
+
// represent the exact contents of the source, as the user wanted it to be.
|
|
197
|
+
if ( FCK.EditMode == FCK_EDITMODE_SOURCE )
|
|
198
|
+
return FCK.EditingArea.Textarea.value ;
|
|
199
|
+
|
|
200
|
+
this.FixBody() ;
|
|
201
|
+
|
|
202
|
+
var sXHTML ;
|
|
203
|
+
var oDoc = FCK.EditorDocument ;
|
|
204
|
+
|
|
205
|
+
if ( !oDoc )
|
|
206
|
+
return null ;
|
|
207
|
+
|
|
208
|
+
if ( FCKConfig.FullPage )
|
|
209
|
+
{
|
|
210
|
+
sXHTML = FCKXHtml.GetXHTML( oDoc.getElementsByTagName( 'html' )[0], true, format ) ;
|
|
211
|
+
|
|
212
|
+
if ( FCK.DocTypeDeclaration && FCK.DocTypeDeclaration.length > 0 )
|
|
213
|
+
sXHTML = FCK.DocTypeDeclaration + '\n' + sXHTML ;
|
|
214
|
+
|
|
215
|
+
if ( FCK.XmlDeclaration && FCK.XmlDeclaration.length > 0 )
|
|
216
|
+
sXHTML = FCK.XmlDeclaration + '\n' + sXHTML ;
|
|
217
|
+
}
|
|
218
|
+
else
|
|
219
|
+
{
|
|
220
|
+
sXHTML = FCKXHtml.GetXHTML( oDoc.body, false, format ) ;
|
|
221
|
+
|
|
222
|
+
if ( FCKConfig.IgnoreEmptyParagraphValue && FCKRegexLib.EmptyOutParagraph.test( sXHTML ) )
|
|
223
|
+
sXHTML = '' ;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Restore protected attributes.
|
|
227
|
+
sXHTML = FCK.ProtectEventsRestore( sXHTML ) ;
|
|
228
|
+
|
|
229
|
+
if ( FCKBrowserInfo.IsIE )
|
|
230
|
+
sXHTML = sXHTML.replace( FCKRegexLib.ToReplace, '$1' ) ;
|
|
231
|
+
|
|
232
|
+
return FCKConfig.ProtectedSource.Revert( sXHTML ) ;
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
UpdateLinkedField : function()
|
|
236
|
+
{
|
|
237
|
+
FCK.LinkedField.value = FCK.GetXHTML( FCKConfig.FormatOutput ) ;
|
|
238
|
+
FCK.Events.FireEvent( 'OnAfterLinkedFieldUpdate' ) ;
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
RegisteredDoubleClickHandlers : new Object(),
|
|
242
|
+
|
|
243
|
+
OnDoubleClick : function( element )
|
|
244
|
+
{
|
|
245
|
+
var oHandler = FCK.RegisteredDoubleClickHandlers[ element.tagName ] ;
|
|
246
|
+
if ( oHandler )
|
|
247
|
+
oHandler( element ) ;
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
// Register objects that can handle double click operations.
|
|
251
|
+
RegisterDoubleClickHandler : function( handlerFunction, tag )
|
|
252
|
+
{
|
|
253
|
+
FCK.RegisteredDoubleClickHandlers[ tag.toUpperCase() ] = handlerFunction ;
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
OnAfterSetHTML : function()
|
|
257
|
+
{
|
|
258
|
+
FCKDocumentProcessor.Process( FCK.EditorDocument ) ;
|
|
259
|
+
FCKUndo.SaveUndoStep() ;
|
|
260
|
+
|
|
261
|
+
FCK.Events.FireEvent( 'OnSelectionChange' ) ;
|
|
262
|
+
FCK.Events.FireEvent( 'OnAfterSetHTML' ) ;
|
|
263
|
+
},
|
|
264
|
+
|
|
265
|
+
// Saves URLs on links and images on special attributes, so they don't change when
|
|
266
|
+
// moving around.
|
|
267
|
+
ProtectUrls : function( html )
|
|
268
|
+
{
|
|
269
|
+
// <A> href
|
|
270
|
+
html = html.replace( FCKRegexLib.ProtectUrlsA , '$& _fcksavedurl=$1' ) ;
|
|
271
|
+
|
|
272
|
+
// <IMG> src
|
|
273
|
+
html = html.replace( FCKRegexLib.ProtectUrlsImg , '$& _fcksavedurl=$1' ) ;
|
|
274
|
+
|
|
275
|
+
return html ;
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
// Saves event attributes (like onclick) so they don't get executed while
|
|
279
|
+
// editing.
|
|
280
|
+
ProtectEvents : function( html )
|
|
281
|
+
{
|
|
282
|
+
return html.replace( FCKRegexLib.TagsWithEvent, _FCK_ProtectEvents_ReplaceTags ) ;
|
|
283
|
+
},
|
|
284
|
+
|
|
285
|
+
ProtectEventsRestore : function( html )
|
|
286
|
+
{
|
|
287
|
+
return html.replace( FCKRegexLib.ProtectedEvents, _FCK_ProtectEvents_RestoreEvents ) ;
|
|
288
|
+
},
|
|
289
|
+
|
|
290
|
+
ProtectTags : function( html )
|
|
291
|
+
{
|
|
292
|
+
var sTags = FCKConfig.ProtectedTags ;
|
|
293
|
+
|
|
294
|
+
// IE doesn't support <abbr> and it breaks it. Let's protect it.
|
|
295
|
+
if ( FCKBrowserInfo.IsIE )
|
|
296
|
+
sTags += sTags.length > 0 ? '|ABBR' : 'ABBR' ;
|
|
297
|
+
|
|
298
|
+
var oRegex ;
|
|
299
|
+
if ( sTags.length > 0 )
|
|
300
|
+
{
|
|
301
|
+
oRegex = new RegExp( '<(' + sTags + ')(?!\w|:)', 'gi' ) ;
|
|
302
|
+
html = html.replace( oRegex, '<FCK:$1' ) ;
|
|
303
|
+
|
|
304
|
+
oRegex = new RegExp( '<\/(' + sTags + ')>', 'gi' ) ;
|
|
305
|
+
html = html.replace( oRegex, '<\/FCK:$1>' ) ;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// Protect some empty elements. We must do it separately becase the
|
|
309
|
+
// original tag may not contain the closing slash, like <hr>:
|
|
310
|
+
// - <meta> tags get executed, so if you have a redirect meta, the
|
|
311
|
+
// content will move to the target page.
|
|
312
|
+
// - <hr> may destroy the document structure if not well
|
|
313
|
+
// positioned. The trick is protect it here and restore them in
|
|
314
|
+
// the FCKDocumentProcessor.
|
|
315
|
+
sTags = 'META' ;
|
|
316
|
+
if ( FCKBrowserInfo.IsIE )
|
|
317
|
+
sTags += '|HR' ;
|
|
318
|
+
|
|
319
|
+
oRegex = new RegExp( '<((' + sTags + ')(?=\s|>)[\s\S]*?)/?>', 'gi' ) ;
|
|
320
|
+
html = html.replace( oRegex, '<FCK:$1 />' ) ;
|
|
321
|
+
|
|
322
|
+
return html ;
|
|
323
|
+
},
|
|
324
|
+
|
|
325
|
+
SetHTML : function( html, resetIsDirty )
|
|
326
|
+
{
|
|
327
|
+
this.EditingArea.Mode = FCK.EditMode ;
|
|
328
|
+
|
|
329
|
+
if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
|
|
330
|
+
{
|
|
331
|
+
html = FCKConfig.ProtectedSource.Protect( html ) ;
|
|
332
|
+
|
|
333
|
+
// Fix for invalid self-closing tags (see #152).
|
|
334
|
+
html = html.replace( FCKRegexLib.InvalidSelfCloseTags, '$1></$2>' ) ;
|
|
335
|
+
|
|
336
|
+
html = FCK.ProtectEvents( html ) ;
|
|
337
|
+
html = FCK.ProtectUrls( html ) ;
|
|
338
|
+
html = FCK.ProtectTags( html ) ;
|
|
339
|
+
|
|
340
|
+
// Firefox can't handle correctly the editing of the STRONG and EM tags.
|
|
341
|
+
// We must replace them with B and I.
|
|
342
|
+
if ( FCKBrowserInfo.IsGecko )
|
|
343
|
+
{
|
|
344
|
+
html = html.replace( FCKRegexLib.StrongOpener, '<b$1' ) ;
|
|
345
|
+
html = html.replace( FCKRegexLib.StrongCloser, '<\/b>' ) ;
|
|
346
|
+
html = html.replace( FCKRegexLib.EmOpener, '<i$1' ) ;
|
|
347
|
+
html = html.replace( FCKRegexLib.EmCloser, '<\/i>' ) ;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
this._ForceResetIsDirty = ( resetIsDirty === true ) ;
|
|
351
|
+
|
|
352
|
+
var sHtml = '' ;
|
|
353
|
+
|
|
354
|
+
if ( FCKConfig.FullPage )
|
|
355
|
+
{
|
|
356
|
+
// The HTML must be fixed if the <head> is not available.
|
|
357
|
+
if ( !FCKRegexLib.HeadOpener.test( html ) )
|
|
358
|
+
{
|
|
359
|
+
// Check if the <html> is available.
|
|
360
|
+
if ( !FCKRegexLib.HtmlOpener.test( html ) )
|
|
361
|
+
html = '<html dir="' + FCKConfig.ContentLangDirection + '">' + html + '</html>' ;
|
|
362
|
+
|
|
363
|
+
// Add the <head>.
|
|
364
|
+
html = html.replace( FCKRegexLib.HtmlOpener, '$&<head></head>' ) ;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// Save the DOCTYPE.
|
|
368
|
+
FCK.DocTypeDeclaration = html.match( FCKRegexLib.DocTypeTag ) ;
|
|
369
|
+
|
|
370
|
+
if ( FCKBrowserInfo.IsIE )
|
|
371
|
+
sHtml = FCK._GetBehaviorsStyle() ;
|
|
372
|
+
else if ( FCKConfig.ShowBorders )
|
|
373
|
+
sHtml = '<link href="' + FCKConfig.FullBasePath + 'css/fck_showtableborders_gecko.css" rel="stylesheet" type="text/css" _fcktemp="true" />' ;
|
|
374
|
+
|
|
375
|
+
sHtml += '<link href="' + FCKConfig.FullBasePath + 'css/fck_internal.css' + '" rel="stylesheet" type="text/css" _fcktemp="true" />' ;
|
|
376
|
+
|
|
377
|
+
// Attention: do not change it before testing it well (sample07)!
|
|
378
|
+
// This is tricky... if the head ends with <meta ... content type>,
|
|
379
|
+
// Firefox will break. But, it works if we include the temporary
|
|
380
|
+
// links as the last elements in the HEAD.
|
|
381
|
+
sHtml = html.replace( FCKRegexLib.HeadCloser, sHtml + '$&' ) ;
|
|
382
|
+
|
|
383
|
+
// Insert the base tag (FCKConfig.BaseHref), if not exists in the source.
|
|
384
|
+
// The base must be the first tag in the HEAD, to get relative
|
|
385
|
+
// links on styles, for example.
|
|
386
|
+
if ( FCK.TempBaseTag.length > 0 && !FCKRegexLib.HasBaseTag.test( html ) )
|
|
387
|
+
sHtml = sHtml.replace( FCKRegexLib.HeadOpener, '$&' + FCK.TempBaseTag ) ;
|
|
388
|
+
}
|
|
389
|
+
else
|
|
390
|
+
{
|
|
391
|
+
sHtml =
|
|
392
|
+
FCKConfig.DocType +
|
|
393
|
+
'<html dir="' + FCKConfig.ContentLangDirection + '"' ;
|
|
394
|
+
|
|
395
|
+
// On IE, if you are use a DOCTYPE differenft of HTML 4 (like
|
|
396
|
+
// XHTML), you must force the vertical scroll to show, otherwise
|
|
397
|
+
// the horizontal one may appear when the page needs vertical scrolling.
|
|
398
|
+
if ( FCKBrowserInfo.IsIE && !FCKRegexLib.Html4DocType.test( FCKConfig.DocType ) )
|
|
399
|
+
sHtml += ' style="overflow-y: scroll"' ;
|
|
400
|
+
|
|
401
|
+
sHtml +=
|
|
402
|
+
'><head><title></title>' +
|
|
403
|
+
_FCK_GetEditorAreaStyleTags() +
|
|
404
|
+
'<link href="' + FCKConfig.FullBasePath + 'css/fck_internal.css' + '" rel="stylesheet" type="text/css" _fcktemp="true" />' ;
|
|
405
|
+
|
|
406
|
+
if ( FCKBrowserInfo.IsIE )
|
|
407
|
+
sHtml += FCK._GetBehaviorsStyle() ;
|
|
408
|
+
else if ( FCKConfig.ShowBorders )
|
|
409
|
+
sHtml += '<link href="' + FCKConfig.FullBasePath + 'css/fck_showtableborders_gecko.css" rel="stylesheet" type="text/css" _fcktemp="true" />' ;
|
|
410
|
+
|
|
411
|
+
sHtml += FCK.TempBaseTag ;
|
|
412
|
+
|
|
413
|
+
// Add ID and Class to the body
|
|
414
|
+
var sBodyTag = '<body' ;
|
|
415
|
+
if ( FCKConfig.BodyId && FCKConfig.BodyId.length > 0 )
|
|
416
|
+
sBodyTag += ' id="' + FCKConfig.BodyId + '"' ;
|
|
417
|
+
if ( FCKConfig.BodyClass && FCKConfig.BodyClass.length > 0 )
|
|
418
|
+
sBodyTag += ' class="' + FCKConfig.BodyClass + '"' ;
|
|
419
|
+
sHtml += '</head>' + sBodyTag + '>' ;
|
|
420
|
+
|
|
421
|
+
if ( FCKBrowserInfo.IsGecko && ( html.length == 0 || FCKRegexLib.EmptyParagraph.test( html ) ) )
|
|
422
|
+
sHtml += GECKO_BOGUS ;
|
|
423
|
+
else
|
|
424
|
+
sHtml += html ;
|
|
425
|
+
|
|
426
|
+
sHtml += '</body></html>' ;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
this.EditingArea.OnLoad = _FCK_EditingArea_OnLoad ;
|
|
430
|
+
this.EditingArea.Start( sHtml ) ;
|
|
431
|
+
}
|
|
432
|
+
else
|
|
433
|
+
{
|
|
434
|
+
// Remove the references to the following elements, as the editing area
|
|
435
|
+
// IFRAME will be removed.
|
|
436
|
+
FCK.EditorWindow = null ;
|
|
437
|
+
FCK.EditorDocument = null ;
|
|
438
|
+
|
|
439
|
+
this.EditingArea.OnLoad = null ;
|
|
440
|
+
this.EditingArea.Start( html ) ;
|
|
441
|
+
|
|
442
|
+
// Enables the context menu in the textarea.
|
|
443
|
+
this.EditingArea.Textarea._FCKShowContextMenu = true ;
|
|
444
|
+
|
|
445
|
+
// Removes the enter key handler.
|
|
446
|
+
FCK.EnterKeyHandler = null ;
|
|
447
|
+
|
|
448
|
+
if ( resetIsDirty )
|
|
449
|
+
this.ResetIsDirty() ;
|
|
450
|
+
|
|
451
|
+
// Listen for keystroke events.
|
|
452
|
+
FCK.KeystrokeHandler.AttachToElement( this.EditingArea.Textarea ) ;
|
|
453
|
+
|
|
454
|
+
this.EditingArea.Textarea.focus() ;
|
|
455
|
+
|
|
456
|
+
FCK.Events.FireEvent( 'OnAfterSetHTML' ) ;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
if ( FCKBrowserInfo.IsGecko )
|
|
460
|
+
window.onresize() ;
|
|
461
|
+
},
|
|
462
|
+
|
|
463
|
+
// For the FocusManager
|
|
464
|
+
HasFocus : false,
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
// This collection is used by the browser specific implementations to tell
|
|
468
|
+
// wich named commands must be handled separately.
|
|
469
|
+
RedirectNamedCommands : new Object(),
|
|
470
|
+
|
|
471
|
+
ExecuteNamedCommand : function( commandName, commandParameter, noRedirect )
|
|
472
|
+
{
|
|
473
|
+
FCKUndo.SaveUndoStep() ;
|
|
474
|
+
|
|
475
|
+
if ( !noRedirect && FCK.RedirectNamedCommands[ commandName ] != null )
|
|
476
|
+
FCK.ExecuteRedirectedNamedCommand( commandName, commandParameter ) ;
|
|
477
|
+
else
|
|
478
|
+
{
|
|
479
|
+
FCK.Focus() ;
|
|
480
|
+
FCK.EditorDocument.execCommand( commandName, false, commandParameter ) ;
|
|
481
|
+
FCK.Events.FireEvent( 'OnSelectionChange' ) ;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
FCKUndo.SaveUndoStep() ;
|
|
485
|
+
},
|
|
486
|
+
|
|
487
|
+
GetNamedCommandState : function( commandName )
|
|
488
|
+
{
|
|
489
|
+
try
|
|
490
|
+
{
|
|
491
|
+
|
|
492
|
+
if ( !FCK.EditorDocument.queryCommandEnabled( commandName ) )
|
|
493
|
+
return FCK_TRISTATE_DISABLED ;
|
|
494
|
+
else
|
|
495
|
+
return FCK.EditorDocument.queryCommandState( commandName ) ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ;
|
|
496
|
+
}
|
|
497
|
+
catch ( e )
|
|
498
|
+
{
|
|
499
|
+
return FCK_TRISTATE_OFF ;
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
|
|
503
|
+
GetNamedCommandValue : function( commandName )
|
|
504
|
+
{
|
|
505
|
+
var sValue = '' ;
|
|
506
|
+
var eState = FCK.GetNamedCommandState( commandName ) ;
|
|
507
|
+
|
|
508
|
+
if ( eState == FCK_TRISTATE_DISABLED )
|
|
509
|
+
return null ;
|
|
510
|
+
|
|
511
|
+
try
|
|
512
|
+
{
|
|
513
|
+
sValue = this.EditorDocument.queryCommandValue( commandName ) ;
|
|
514
|
+
}
|
|
515
|
+
catch(e) {}
|
|
516
|
+
|
|
517
|
+
return sValue ? sValue : '' ;
|
|
518
|
+
},
|
|
519
|
+
|
|
520
|
+
PasteFromWord : function()
|
|
521
|
+
{
|
|
522
|
+
FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.PasteFromWord, 'dialog/fck_paste.html', 400, 330, 'Word' ) ;
|
|
523
|
+
},
|
|
524
|
+
|
|
525
|
+
Preview : function()
|
|
526
|
+
{
|
|
527
|
+
var iWidth = FCKConfig.ScreenWidth * 0.8 ;
|
|
528
|
+
var iHeight = FCKConfig.ScreenHeight * 0.7 ;
|
|
529
|
+
var iLeft = ( FCKConfig.ScreenWidth - iWidth ) / 2 ;
|
|
530
|
+
var oWindow = window.open( '', null, 'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' + iWidth + ',height=' + iHeight + ',left=' + iLeft ) ;
|
|
531
|
+
|
|
532
|
+
var sHTML ;
|
|
533
|
+
|
|
534
|
+
if ( FCKConfig.FullPage )
|
|
535
|
+
{
|
|
536
|
+
if ( FCK.TempBaseTag.length > 0 )
|
|
537
|
+
sHTML = FCK.TempBaseTag + FCK.GetXHTML() ;
|
|
538
|
+
else
|
|
539
|
+
sHTML = FCK.GetXHTML() ;
|
|
540
|
+
}
|
|
541
|
+
else
|
|
542
|
+
{
|
|
543
|
+
sHTML =
|
|
544
|
+
FCKConfig.DocType +
|
|
545
|
+
'<html dir="' + FCKConfig.ContentLangDirection + '">' +
|
|
546
|
+
'<head>' +
|
|
547
|
+
FCK.TempBaseTag +
|
|
548
|
+
'<title>' + FCKLang.Preview + '</title>' +
|
|
549
|
+
_FCK_GetEditorAreaStyleTags() +
|
|
550
|
+
'</head><body>' +
|
|
551
|
+
FCK.GetXHTML() +
|
|
552
|
+
'</body></html>' ;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
oWindow.document.write( sHTML );
|
|
556
|
+
oWindow.document.close();
|
|
557
|
+
},
|
|
558
|
+
|
|
559
|
+
SwitchEditMode : function( noUndo )
|
|
560
|
+
{
|
|
561
|
+
var bIsWysiwyg = ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) ;
|
|
562
|
+
|
|
563
|
+
// Save the current IsDirty state, so we may restore it after the switch.
|
|
564
|
+
var bIsDirty = FCK.IsDirty() ;
|
|
565
|
+
|
|
566
|
+
var sHtml ;
|
|
567
|
+
|
|
568
|
+
// Update the HTML in the view output to show.
|
|
569
|
+
if ( bIsWysiwyg )
|
|
570
|
+
{
|
|
571
|
+
if ( !noUndo && FCKBrowserInfo.IsIE )
|
|
572
|
+
FCKUndo.SaveUndoStep() ;
|
|
573
|
+
|
|
574
|
+
sHtml = FCK.GetXHTML( FCKConfig.FormatSource ) ;
|
|
575
|
+
|
|
576
|
+
if ( sHtml == null )
|
|
577
|
+
return false ;
|
|
578
|
+
}
|
|
579
|
+
else
|
|
580
|
+
sHtml = this.EditingArea.Textarea.value ;
|
|
581
|
+
|
|
582
|
+
FCK.EditMode = bIsWysiwyg ? FCK_EDITMODE_SOURCE : FCK_EDITMODE_WYSIWYG ;
|
|
583
|
+
|
|
584
|
+
FCK.SetHTML( sHtml, !bIsDirty ) ;
|
|
585
|
+
|
|
586
|
+
// Set the Focus.
|
|
587
|
+
FCK.Focus() ;
|
|
588
|
+
|
|
589
|
+
// Update the toolbar (Running it directly causes IE to fail).
|
|
590
|
+
FCKTools.RunFunction( FCK.ToolbarSet.RefreshModeState, FCK.ToolbarSet ) ;
|
|
591
|
+
|
|
592
|
+
return true ;
|
|
593
|
+
},
|
|
594
|
+
|
|
595
|
+
CreateElement : function( tag )
|
|
596
|
+
{
|
|
597
|
+
var e = FCK.EditorDocument.createElement( tag ) ;
|
|
598
|
+
return FCK.InsertElementAndGetIt( e ) ;
|
|
599
|
+
},
|
|
600
|
+
|
|
601
|
+
InsertElementAndGetIt : function( e )
|
|
602
|
+
{
|
|
603
|
+
e.setAttribute( 'FCKTempLabel', 'true' ) ;
|
|
604
|
+
|
|
605
|
+
this.InsertElement( e ) ;
|
|
606
|
+
|
|
607
|
+
var aEls = FCK.EditorDocument.getElementsByTagName( e.tagName ) ;
|
|
608
|
+
|
|
609
|
+
for ( var i = 0 ; i < aEls.length ; i++ )
|
|
610
|
+
{
|
|
611
|
+
if ( aEls[i].getAttribute( 'FCKTempLabel' ) )
|
|
612
|
+
{
|
|
613
|
+
aEls[i].removeAttribute( 'FCKTempLabel' ) ;
|
|
614
|
+
return aEls[i] ;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
return null ;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
} ;
|
|
621
|
+
|
|
622
|
+
FCK.Events = new FCKEvents( FCK ) ;
|
|
623
|
+
// GetHTML is Deprecated : returns the same value as GetXHTML.
|
|
624
|
+
FCK.GetHTML = FCK.GetXHTML ;
|
|
625
|
+
|
|
626
|
+
// Replace all events attributes (like onclick).
|
|
627
|
+
function _FCK_ProtectEvents_ReplaceTags( tagMatch )
|
|
628
|
+
{
|
|
629
|
+
return tagMatch.replace( FCKRegexLib.EventAttributes, _FCK_ProtectEvents_ReplaceEvents ) ;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
// Replace an event attribute with its respective __fckprotectedatt attribute.
|
|
633
|
+
// The original event markup will be encoded and saved as the value of the new
|
|
634
|
+
// attribute.
|
|
635
|
+
function _FCK_ProtectEvents_ReplaceEvents( eventMatch, attName )
|
|
636
|
+
{
|
|
637
|
+
return ' ' + attName + '_fckprotectedatt="' + eventMatch.ReplaceAll( [/&/g,/'/g,/"/g,/=/g,/</g,/>/g,/\r/g,/\n/g], [''',''','"','=','<','>',' ',' '] ) + '"' ;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
function _FCK_ProtectEvents_RestoreEvents( match, encodedOriginal )
|
|
641
|
+
{
|
|
642
|
+
return encodedOriginal.ReplaceAll( [/'/g,/"/g,/=/g,/</g,/>/g,/ /g,/ /g,/'/g], ["'",'"','=','<','>','\r','\n','&'] ) ;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
function _FCK_EditingArea_OnLoad()
|
|
646
|
+
{
|
|
647
|
+
// Get the editor's window and document (DOM)
|
|
648
|
+
FCK.EditorWindow = FCK.EditingArea.Window ;
|
|
649
|
+
FCK.EditorDocument = FCK.EditingArea.Document ;
|
|
650
|
+
|
|
651
|
+
FCK.InitializeBehaviors() ;
|
|
652
|
+
|
|
653
|
+
// Create the enter key handler
|
|
654
|
+
if ( !FCKConfig.DisableEnterKeyHandler )
|
|
655
|
+
FCK.EnterKeyHandler = new FCKEnterKey( FCK.EditorWindow, FCKConfig.EnterMode, FCKConfig.ShiftEnterMode ) ;
|
|
656
|
+
|
|
657
|
+
// Listen for keystroke events.
|
|
658
|
+
FCK.KeystrokeHandler.AttachToElement( FCK.EditorDocument ) ;
|
|
659
|
+
|
|
660
|
+
if ( FCK._ForceResetIsDirty )
|
|
661
|
+
FCK.ResetIsDirty() ;
|
|
662
|
+
|
|
663
|
+
// This is a tricky thing for IE. In some cases, even if the cursor is
|
|
664
|
+
// blinking in the editing, the keystroke handler doesn't catch keyboard
|
|
665
|
+
// events. We must activate the editing area to make it work. (#142).
|
|
666
|
+
if ( FCKBrowserInfo.IsIE && FCK.HasFocus )
|
|
667
|
+
FCK.EditorDocument.body.setActive() ;
|
|
668
|
+
|
|
669
|
+
FCK.OnAfterSetHTML() ;
|
|
670
|
+
|
|
671
|
+
// Check if it is not a startup call, otherwise complete the startup.
|
|
672
|
+
if ( FCK.Status != FCK_STATUS_NOTLOADED )
|
|
673
|
+
return ;
|
|
674
|
+
|
|
675
|
+
FCK.SetStatus( FCK_STATUS_ACTIVE ) ;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
function _FCK_GetEditorAreaStyleTags()
|
|
679
|
+
{
|
|
680
|
+
var sTags = '' ;
|
|
681
|
+
var aCSSs = FCKConfig.EditorAreaCSS ;
|
|
682
|
+
|
|
683
|
+
for ( var i = 0 ; i < aCSSs.length ; i++ )
|
|
684
|
+
sTags += '<link href="' + aCSSs[i] + '" rel="stylesheet" type="text/css" />' ;
|
|
685
|
+
|
|
686
|
+
return sTags ;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
function _FCK_KeystrokeHandler_OnKeystroke( keystroke, keystrokeValue )
|
|
690
|
+
{
|
|
691
|
+
if ( FCK.Status != FCK_STATUS_COMPLETE )
|
|
692
|
+
return false ;
|
|
693
|
+
|
|
694
|
+
if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
|
|
695
|
+
{
|
|
696
|
+
if ( keystrokeValue == 'Paste' )
|
|
697
|
+
return !FCK.Events.FireEvent( 'OnPaste' ) ;
|
|
698
|
+
}
|
|
699
|
+
else
|
|
700
|
+
{
|
|
701
|
+
// In source mode, some actions must have their default behavior.
|
|
702
|
+
if ( keystrokeValue.Equals( 'Paste', 'Undo', 'Redo', 'SelectAll' ) )
|
|
703
|
+
return false ;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
// The return value indicates if the default behavior of the keystroke must
|
|
707
|
+
// be cancelled. Let's do that only if the Execute() call explicitelly returns "false".
|
|
708
|
+
var oCommand = FCK.Commands.GetCommand( keystrokeValue ) ;
|
|
709
|
+
return ( oCommand.Execute.apply( oCommand, FCKTools.ArgumentsToArray( arguments, 2 ) ) !== false ) ;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
// Set the FCK.LinkedField reference to the field that will be used to post the
|
|
713
|
+
// editor data.
|
|
714
|
+
(function()
|
|
715
|
+
{
|
|
716
|
+
// There is a bug on IE... getElementById returns any META tag that has the
|
|
717
|
+
// name set to the ID you are looking for. So the best way in to get the array
|
|
718
|
+
// by names and look for the correct one.
|
|
719
|
+
// As ASP.Net generates a ID that is different from the Name, we must also
|
|
720
|
+
// look for the field based on the ID (the first one is the ID).
|
|
721
|
+
|
|
722
|
+
var oDocument = window.parent.document ;
|
|
723
|
+
|
|
724
|
+
// Try to get the field using the ID.
|
|
725
|
+
var eLinkedField = oDocument.getElementById( FCK.Name ) ;
|
|
726
|
+
|
|
727
|
+
var i = 0;
|
|
728
|
+
while ( eLinkedField || i == 0 )
|
|
729
|
+
{
|
|
730
|
+
if ( eLinkedField && eLinkedField.tagName.toLowerCase().Equals( 'input', 'textarea' ) )
|
|
731
|
+
{
|
|
732
|
+
FCK.LinkedField = eLinkedField ;
|
|
733
|
+
break ;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
eLinkedField = oDocument.getElementsByName( FCK.Name )[i++] ;
|
|
737
|
+
}
|
|
738
|
+
})() ;
|
|
739
|
+
|
|
740
|
+
var FCKTempBin =
|
|
741
|
+
{
|
|
742
|
+
Elements : new Array(),
|
|
743
|
+
|
|
744
|
+
AddElement : function( element )
|
|
745
|
+
{
|
|
746
|
+
var iIndex = this.Elements.length ;
|
|
747
|
+
this.Elements[ iIndex ] = element ;
|
|
748
|
+
return iIndex ;
|
|
749
|
+
},
|
|
750
|
+
|
|
751
|
+
RemoveElement : function( index )
|
|
752
|
+
{
|
|
753
|
+
var e = this.Elements[ index ] ;
|
|
754
|
+
this.Elements[ index ] = null ;
|
|
755
|
+
return e ;
|
|
756
|
+
},
|
|
757
|
+
|
|
758
|
+
Reset : function()
|
|
759
|
+
{
|
|
760
|
+
var i = 0 ;
|
|
761
|
+
while ( i < this.Elements.length )
|
|
762
|
+
this.Elements[ i++ ] == null ;
|
|
763
|
+
this.Elements.length = 0 ;
|
|
764
|
+
}
|
|
765
|
+
} ;
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
// # Focus Manager: Manages the focus in the editor.
|
|
770
|
+
var FCKFocusManager = FCK.FocusManager =
|
|
771
|
+
{
|
|
772
|
+
IsLocked : false,
|
|
773
|
+
|
|
774
|
+
AddWindow : function( win, sendToEditingArea )
|
|
775
|
+
{
|
|
776
|
+
var oTarget ;
|
|
777
|
+
|
|
778
|
+
if ( FCKBrowserInfo.IsIE )
|
|
779
|
+
oTarget = win.nodeType == 1 ? win : win.frameElement ? win.frameElement : win.document ;
|
|
780
|
+
else
|
|
781
|
+
oTarget = win.document ;
|
|
782
|
+
|
|
783
|
+
FCKTools.AddEventListener( oTarget, 'blur', FCKFocusManager_Win_OnBlur ) ;
|
|
784
|
+
FCKTools.AddEventListener( oTarget, 'focus', sendToEditingArea ? FCKFocusManager_Win_OnFocus_Area : FCKFocusManager_Win_OnFocus ) ;
|
|
785
|
+
},
|
|
786
|
+
|
|
787
|
+
RemoveWindow : function( win )
|
|
788
|
+
{
|
|
789
|
+
if ( FCKBrowserInfo.IsIE )
|
|
790
|
+
oTarget = win.nodeType == 1 ? win : win.frameElement ? win.frameElement : win.document ;
|
|
791
|
+
else
|
|
792
|
+
oTarget = win.document ;
|
|
793
|
+
|
|
794
|
+
FCKTools.RemoveEventListener( oTarget, 'blur', FCKFocusManager_Win_OnBlur ) ;
|
|
795
|
+
FCKTools.RemoveEventListener( oTarget, 'focus', FCKFocusManager_Win_OnFocus_Area ) ;
|
|
796
|
+
FCKTools.RemoveEventListener( oTarget, 'focus', FCKFocusManager_Win_OnFocus ) ;
|
|
797
|
+
},
|
|
798
|
+
|
|
799
|
+
Lock : function()
|
|
800
|
+
{
|
|
801
|
+
this.IsLocked = true ;
|
|
802
|
+
},
|
|
803
|
+
|
|
804
|
+
Unlock : function()
|
|
805
|
+
{
|
|
806
|
+
if ( this._HasPendingBlur )
|
|
807
|
+
FCKFocusManager._Timer = window.setTimeout( FCKFocusManager_FireOnBlur, 100 ) ;
|
|
808
|
+
|
|
809
|
+
this.IsLocked = false ;
|
|
810
|
+
},
|
|
811
|
+
|
|
812
|
+
_ResetTimer : function()
|
|
813
|
+
{
|
|
814
|
+
this._HasPendingBlur = false ;
|
|
815
|
+
|
|
816
|
+
if ( this._Timer )
|
|
817
|
+
{
|
|
818
|
+
window.clearTimeout( this._Timer ) ;
|
|
819
|
+
delete this._Timer ;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
} ;
|
|
823
|
+
|
|
824
|
+
function FCKFocusManager_Win_OnBlur()
|
|
825
|
+
{
|
|
826
|
+
if ( typeof(FCK) != 'undefined' && FCK.HasFocus )
|
|
827
|
+
{
|
|
828
|
+
FCKFocusManager._ResetTimer() ;
|
|
829
|
+
FCKFocusManager._Timer = window.setTimeout( FCKFocusManager_FireOnBlur, 100 ) ;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
function FCKFocusManager_FireOnBlur()
|
|
834
|
+
{
|
|
835
|
+
if ( FCKFocusManager.IsLocked )
|
|
836
|
+
FCKFocusManager._HasPendingBlur = true ;
|
|
837
|
+
else
|
|
838
|
+
{
|
|
839
|
+
FCK.HasFocus = false ;
|
|
840
|
+
FCK.Events.FireEvent( "OnBlur" ) ;
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
function FCKFocusManager_Win_OnFocus_Area()
|
|
845
|
+
{
|
|
846
|
+
FCK.Focus() ;
|
|
847
|
+
FCKFocusManager_Win_OnFocus() ;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
function FCKFocusManager_Win_OnFocus()
|
|
851
|
+
{
|
|
852
|
+
FCKFocusManager._ResetTimer() ;
|
|
853
|
+
|
|
854
|
+
if ( !FCK.HasFocus && !FCKFocusManager.IsLocked )
|
|
855
|
+
{
|
|
856
|
+
FCK.HasFocus = true ;
|
|
857
|
+
FCK.Events.FireEvent( "OnFocus" ) ;
|
|
858
|
+
}
|
|
859
|
+
}
|