Wiki2GoEditor 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,48 @@
|
|
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
|
+
* Dialog windows operations. (IE specific implementations)
|
22
|
+
*/
|
23
|
+
|
24
|
+
FCKDialog.Show = function( dialogInfo, dialogName, pageUrl, dialogWidth, dialogHeight, parentWindow, resizable )
|
25
|
+
{
|
26
|
+
if ( !parentWindow )
|
27
|
+
parentWindow = window ;
|
28
|
+
|
29
|
+
var sOptions = 'help:no;scroll:no;status:no' +
|
30
|
+
';resizable:' + ( resizable ? 'yes' : 'no' ) +
|
31
|
+
';dialogWidth:' + dialogWidth + 'px' +
|
32
|
+
';dialogHeight:' + dialogHeight + 'px' ;
|
33
|
+
|
34
|
+
FCKFocusManager.Lock() ;
|
35
|
+
|
36
|
+
var oReturn = 'B' ;
|
37
|
+
|
38
|
+
try
|
39
|
+
{
|
40
|
+
oReturn = parentWindow.showModalDialog( pageUrl, dialogInfo, sOptions ) ;
|
41
|
+
}
|
42
|
+
catch( e ) {}
|
43
|
+
|
44
|
+
if ( 'B' === oReturn )
|
45
|
+
alert( FCKLang.DialogBlocked ) ;
|
46
|
+
|
47
|
+
FCKFocusManager.Unlock() ;
|
48
|
+
}
|
@@ -0,0 +1,243 @@
|
|
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
|
+
* Advanced document processors.
|
22
|
+
*/
|
23
|
+
|
24
|
+
var FCKDocumentProcessor = new Object() ;
|
25
|
+
FCKDocumentProcessor._Items = new Array() ;
|
26
|
+
|
27
|
+
FCKDocumentProcessor.AppendNew = function()
|
28
|
+
{
|
29
|
+
var oNewItem = new Object() ;
|
30
|
+
this._Items.AddItem( oNewItem ) ;
|
31
|
+
return oNewItem ;
|
32
|
+
}
|
33
|
+
|
34
|
+
FCKDocumentProcessor.Process = function( document )
|
35
|
+
{
|
36
|
+
var oProcessor, i = 0 ;
|
37
|
+
while( ( oProcessor = this._Items[i++] ) )
|
38
|
+
oProcessor.ProcessDocument( document ) ;
|
39
|
+
}
|
40
|
+
|
41
|
+
var FCKDocumentProcessor_CreateFakeImage = function( fakeClass, realElement )
|
42
|
+
{
|
43
|
+
var oImg = FCK.EditorDocument.createElement( 'IMG' ) ;
|
44
|
+
oImg.className = fakeClass ;
|
45
|
+
oImg.src = FCKConfig.FullBasePath + 'images/spacer.gif' ;
|
46
|
+
oImg.setAttribute( '_fckfakelement', 'true', 0 ) ;
|
47
|
+
oImg.setAttribute( '_fckrealelement', FCKTempBin.AddElement( realElement ), 0 ) ;
|
48
|
+
return oImg ;
|
49
|
+
}
|
50
|
+
|
51
|
+
// Link Anchors
|
52
|
+
if ( FCKBrowserInfo.IsIE || FCKBrowserInfo.IsOpera )
|
53
|
+
{
|
54
|
+
var FCKAnchorsProcessor = FCKDocumentProcessor.AppendNew() ;
|
55
|
+
FCKAnchorsProcessor.ProcessDocument = function( document )
|
56
|
+
{
|
57
|
+
var aLinks = document.getElementsByTagName( 'A' ) ;
|
58
|
+
|
59
|
+
var oLink ;
|
60
|
+
var i = aLinks.length - 1 ;
|
61
|
+
while ( i >= 0 && ( oLink = aLinks[i--] ) )
|
62
|
+
{
|
63
|
+
// If it is anchor. Doesn't matter if it's also a link (even better: we show that it's both a link and an anchor)
|
64
|
+
if ( oLink.name.length > 0 )
|
65
|
+
{
|
66
|
+
//if the anchor has some content then we just add a temporary class
|
67
|
+
if ( oLink.innerHTML != '' )
|
68
|
+
{
|
69
|
+
if ( FCKBrowserInfo.IsIE )
|
70
|
+
oLink.className += ' FCK__AnchorC' ;
|
71
|
+
}
|
72
|
+
else
|
73
|
+
{
|
74
|
+
var oImg = FCKDocumentProcessor_CreateFakeImage( 'FCK__Anchor', oLink.cloneNode(true) ) ;
|
75
|
+
oImg.setAttribute( '_fckanchor', 'true', 0 ) ;
|
76
|
+
|
77
|
+
oLink.parentNode.insertBefore( oImg, oLink ) ;
|
78
|
+
oLink.parentNode.removeChild( oLink ) ;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
// Page Breaks
|
86
|
+
var FCKPageBreaksProcessor = FCKDocumentProcessor.AppendNew() ;
|
87
|
+
FCKPageBreaksProcessor.ProcessDocument = function( document )
|
88
|
+
{
|
89
|
+
var aDIVs = document.getElementsByTagName( 'DIV' ) ;
|
90
|
+
|
91
|
+
var eDIV ;
|
92
|
+
var i = aDIVs.length - 1 ;
|
93
|
+
while ( i >= 0 && ( eDIV = aDIVs[i--] ) )
|
94
|
+
{
|
95
|
+
if ( eDIV.style.pageBreakAfter == 'always' && eDIV.childNodes.length == 1 && eDIV.childNodes[0].style && eDIV.childNodes[0].style.display == 'none' )
|
96
|
+
{
|
97
|
+
var oFakeImage = FCKDocumentProcessor_CreateFakeImage( 'FCK__PageBreak', eDIV.cloneNode(true) ) ;
|
98
|
+
|
99
|
+
eDIV.parentNode.insertBefore( oFakeImage, eDIV ) ;
|
100
|
+
eDIV.parentNode.removeChild( eDIV ) ;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
/*
|
104
|
+
var aCenters = document.getElementsByTagName( 'CENTER' ) ;
|
105
|
+
|
106
|
+
var oCenter ;
|
107
|
+
var i = aCenters.length - 1 ;
|
108
|
+
while ( i >= 0 && ( oCenter = aCenters[i--] ) )
|
109
|
+
{
|
110
|
+
if ( oCenter.style.pageBreakAfter == 'always' && oCenter.innerHTML.Trim().length == 0 )
|
111
|
+
{
|
112
|
+
var oFakeImage = FCKDocumentProcessor_CreateFakeImage( 'FCK__PageBreak', oCenter.cloneNode(true) ) ;
|
113
|
+
|
114
|
+
oCenter.parentNode.insertBefore( oFakeImage, oCenter ) ;
|
115
|
+
oCenter.parentNode.removeChild( oCenter ) ;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
*/
|
119
|
+
}
|
120
|
+
|
121
|
+
// Flash Embeds.
|
122
|
+
var FCKFlashProcessor = FCKDocumentProcessor.AppendNew() ;
|
123
|
+
FCKFlashProcessor.ProcessDocument = function( document )
|
124
|
+
{
|
125
|
+
/*
|
126
|
+
Sample code:
|
127
|
+
This is some <embed src="/UserFiles/Flash/Yellow_Runners.swf"></embed><strong>sample text</strong>. You are <a name="fred"></a> using <a href="http://www.fckeditor.net/">FCKeditor</a>.
|
128
|
+
*/
|
129
|
+
|
130
|
+
var aEmbeds = document.getElementsByTagName( 'EMBED' ) ;
|
131
|
+
|
132
|
+
var oEmbed ;
|
133
|
+
var i = aEmbeds.length - 1 ;
|
134
|
+
while ( i >= 0 && ( oEmbed = aEmbeds[i--] ) )
|
135
|
+
{
|
136
|
+
// IE doesn't return the type attribute with oEmbed.type or oEmbed.getAttribute("type")
|
137
|
+
// But it turns out that after accessing it then it doesn't gets copied later
|
138
|
+
var oType = oEmbed.attributes[ 'type' ] ;
|
139
|
+
|
140
|
+
// Check the extension and the type. Now it should be enough with just the type
|
141
|
+
// Opera doesn't return oEmbed.src so oEmbed.src.EndsWith will fail
|
142
|
+
if ( (oEmbed.src && oEmbed.src.EndsWith( '.swf', true )) || ( oType && oType.nodeValue == 'application/x-shockwave-flash' ) )
|
143
|
+
{
|
144
|
+
var oCloned = oEmbed.cloneNode( true ) ;
|
145
|
+
|
146
|
+
// On IE, some properties are not getting clonned properly, so we
|
147
|
+
// must fix it. Thanks to Alfonso Martinez.
|
148
|
+
if ( FCKBrowserInfo.IsIE )
|
149
|
+
{
|
150
|
+
var aAttributes = [ 'scale', 'play', 'loop', 'menu', 'wmode', 'quality' ] ;
|
151
|
+
for ( var iAtt = 0 ; iAtt < aAttributes.length ; iAtt++ )
|
152
|
+
{
|
153
|
+
var oAtt = oEmbed.getAttribute( aAttributes[iAtt] ) ;
|
154
|
+
if ( oAtt ) oCloned.setAttribute( aAttributes[iAtt], oAtt ) ;
|
155
|
+
}
|
156
|
+
// It magically gets lost after reading it in oType
|
157
|
+
oCloned.setAttribute( 'type', oType.nodeValue ) ;
|
158
|
+
}
|
159
|
+
|
160
|
+
var oImg = FCKDocumentProcessor_CreateFakeImage( 'FCK__Flash', oCloned ) ;
|
161
|
+
oImg.setAttribute( '_fckflash', 'true', 0 ) ;
|
162
|
+
|
163
|
+
FCKFlashProcessor.RefreshView( oImg, oEmbed ) ;
|
164
|
+
|
165
|
+
oEmbed.parentNode.insertBefore( oImg, oEmbed ) ;
|
166
|
+
oEmbed.parentNode.removeChild( oEmbed ) ;
|
167
|
+
|
168
|
+
// oEmbed.setAttribute( '_fcktemp', 'true', 0) ;
|
169
|
+
// oEmbed.style.display = 'none' ;
|
170
|
+
// oEmbed.hidden = true ;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
}
|
174
|
+
|
175
|
+
FCKFlashProcessor.RefreshView = function( placholderImage, originalEmbed )
|
176
|
+
{
|
177
|
+
if ( originalEmbed.width > 0 )
|
178
|
+
placholderImage.style.width = FCKTools.ConvertHtmlSizeToStyle( originalEmbed.width ) ;
|
179
|
+
|
180
|
+
if ( originalEmbed.height > 0 )
|
181
|
+
placholderImage.style.height = FCKTools.ConvertHtmlSizeToStyle( originalEmbed.height ) ;
|
182
|
+
}
|
183
|
+
|
184
|
+
FCK.GetRealElement = function( fakeElement )
|
185
|
+
{
|
186
|
+
var e = FCKTempBin.Elements[ fakeElement.getAttribute('_fckrealelement') ] ;
|
187
|
+
|
188
|
+
if ( fakeElement.getAttribute('_fckflash') )
|
189
|
+
{
|
190
|
+
if ( fakeElement.style.width.length > 0 )
|
191
|
+
e.width = FCKTools.ConvertStyleSizeToHtml( fakeElement.style.width ) ;
|
192
|
+
|
193
|
+
if ( fakeElement.style.height.length > 0 )
|
194
|
+
e.height = FCKTools.ConvertStyleSizeToHtml( fakeElement.style.height ) ;
|
195
|
+
}
|
196
|
+
|
197
|
+
return e ;
|
198
|
+
}
|
199
|
+
|
200
|
+
// HR Processor.
|
201
|
+
// This is a IE only (tricky) thing. We protect all HR tags before loading them
|
202
|
+
// (see FCK.ProtectTags). Here we put the HRs back.
|
203
|
+
if ( FCKBrowserInfo.IsIE )
|
204
|
+
{
|
205
|
+
FCKDocumentProcessor.AppendNew().ProcessDocument = function( document )
|
206
|
+
{
|
207
|
+
var aHRs = document.getElementsByTagName( 'HR' ) ;
|
208
|
+
|
209
|
+
var eHR ;
|
210
|
+
var i = aHRs.length - 1 ;
|
211
|
+
while ( i >= 0 && ( eHR = aHRs[i--] ) )
|
212
|
+
{
|
213
|
+
// Create the replacement HR.
|
214
|
+
var newHR = document.createElement( 'hr' ) ;
|
215
|
+
newHR.mergeAttributes( eHR, true ) ;
|
216
|
+
|
217
|
+
// We must insert the new one after it. insertBefore will not work in all cases.
|
218
|
+
FCKDomTools.InsertAfterNode( eHR, newHR ) ;
|
219
|
+
|
220
|
+
eHR.parentNode.removeChild( eHR ) ;
|
221
|
+
}
|
222
|
+
}
|
223
|
+
}
|
224
|
+
|
225
|
+
// INPUT:hidden Processor.
|
226
|
+
FCKDocumentProcessor.AppendNew().ProcessDocument = function( document )
|
227
|
+
{
|
228
|
+
var aInputs = document.getElementsByTagName( 'INPUT' ) ;
|
229
|
+
|
230
|
+
var oInput ;
|
231
|
+
var i = aInputs.length - 1 ;
|
232
|
+
while ( i >= 0 && ( oInput = aInputs[i--] ) )
|
233
|
+
{
|
234
|
+
if ( oInput.type == 'hidden' )
|
235
|
+
{
|
236
|
+
var oImg = FCKDocumentProcessor_CreateFakeImage( 'FCK__InputHidden', oInput.cloneNode(true) ) ;
|
237
|
+
oImg.setAttribute( '_fckinputhidden', 'true', 0 ) ;
|
238
|
+
|
239
|
+
oInput.parentNode.insertBefore( oImg, oInput ) ;
|
240
|
+
oInput.parentNode.removeChild( oInput ) ;
|
241
|
+
}
|
242
|
+
}
|
243
|
+
}
|
@@ -0,0 +1,294 @@
|
|
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
|
+
* Utility functions to work with the DOM.
|
22
|
+
*/
|
23
|
+
|
24
|
+
var FCKDomTools =
|
25
|
+
{
|
26
|
+
MoveChildren : function( source, target )
|
27
|
+
{
|
28
|
+
if ( source == target )
|
29
|
+
return ;
|
30
|
+
|
31
|
+
var eChild ;
|
32
|
+
while ( (eChild = source.firstChild) )
|
33
|
+
target.appendChild( source.removeChild( eChild ) ) ;
|
34
|
+
},
|
35
|
+
|
36
|
+
// Remove blank spaces from the beginning and the end of the contents of a node.
|
37
|
+
TrimNode : function( node, ignoreEndBRs )
|
38
|
+
{
|
39
|
+
this.LTrimNode( node ) ;
|
40
|
+
this.RTrimNode( node, ignoreEndBRs ) ;
|
41
|
+
},
|
42
|
+
|
43
|
+
LTrimNode : function( node )
|
44
|
+
{
|
45
|
+
var eChildNode ;
|
46
|
+
|
47
|
+
while ( (eChildNode = node.firstChild) )
|
48
|
+
{
|
49
|
+
if ( eChildNode.nodeType == 3 )
|
50
|
+
{
|
51
|
+
var sTrimmed = eChildNode.nodeValue.LTrim() ;
|
52
|
+
var iOriginalLength = eChildNode.nodeValue.length ;
|
53
|
+
|
54
|
+
if ( sTrimmed.length == 0 )
|
55
|
+
{
|
56
|
+
node.removeChild( eChildNode ) ;
|
57
|
+
continue ;
|
58
|
+
}
|
59
|
+
else if ( sTrimmed.length < iOriginalLength )
|
60
|
+
{
|
61
|
+
eChildNode.splitText( iOriginalLength - sTrimmed.length ) ;
|
62
|
+
node.removeChild( node.firstChild ) ;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
break ;
|
66
|
+
}
|
67
|
+
},
|
68
|
+
|
69
|
+
RTrimNode : function( node, ignoreEndBRs )
|
70
|
+
{
|
71
|
+
var eChildNode ;
|
72
|
+
|
73
|
+
while ( (eChildNode = node.lastChild) )
|
74
|
+
{
|
75
|
+
switch ( eChildNode.nodeType )
|
76
|
+
{
|
77
|
+
case 1 :
|
78
|
+
if ( eChildNode.nodeName.toUpperCase() == 'BR' && ( ignoreEndBRs || eChildNode.getAttribute( 'type', 2 ) == '_moz' ) )
|
79
|
+
{
|
80
|
+
node.removeChild( eChildNode ) ;
|
81
|
+
continue ;
|
82
|
+
}
|
83
|
+
break ;
|
84
|
+
|
85
|
+
case 3 :
|
86
|
+
var sTrimmed = eChildNode.nodeValue.RTrim() ;
|
87
|
+
var iOriginalLength = eChildNode.nodeValue.length ;
|
88
|
+
|
89
|
+
if ( sTrimmed.length == 0 )
|
90
|
+
{
|
91
|
+
// If the trimmed text node is empty, just remove it.
|
92
|
+
|
93
|
+
// Use "eChildNode.parentNode" instead of "node" to avoid IE bug (#81).
|
94
|
+
eChildNode.parentNode.removeChild( eChildNode ) ;
|
95
|
+
continue ;
|
96
|
+
}
|
97
|
+
else if ( sTrimmed.length < iOriginalLength )
|
98
|
+
{
|
99
|
+
// If the trimmed text lenght is less than the original
|
100
|
+
// lenght, strip all spaces from the end by splitting
|
101
|
+
// the text and removing the resulting useless node.
|
102
|
+
|
103
|
+
eChildNode.splitText( sTrimmed.length ) ;
|
104
|
+
// Use "node.lastChild.parentNode" instead of "node" to avoid IE bug (#81).
|
105
|
+
node.lastChild.parentNode.removeChild( node.lastChild ) ;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
break ;
|
109
|
+
}
|
110
|
+
},
|
111
|
+
|
112
|
+
RemoveNode : function( node, excludeChildren )
|
113
|
+
{
|
114
|
+
if ( excludeChildren )
|
115
|
+
{
|
116
|
+
// Move all children before the node.
|
117
|
+
var eChild ;
|
118
|
+
while ( (eChild = node.firstChild) )
|
119
|
+
node.parentNode.insertBefore( node.removeChild( eChild ), node ) ;
|
120
|
+
}
|
121
|
+
|
122
|
+
return node.parentNode.removeChild( node ) ;
|
123
|
+
},
|
124
|
+
|
125
|
+
GetFirstChild : function( node, childNames )
|
126
|
+
{
|
127
|
+
// If childNames is a string, transform it in a Array.
|
128
|
+
if ( typeof ( childNames ) == 'string' )
|
129
|
+
childNames = [ childNames ] ;
|
130
|
+
|
131
|
+
var eChild = node.firstChild ;
|
132
|
+
while( eChild )
|
133
|
+
{
|
134
|
+
if ( eChild.nodeType == 1 && eChild.tagName.Equals.apply( eChild.tagName, childNames ) )
|
135
|
+
return eChild ;
|
136
|
+
|
137
|
+
eChild = eChild.nextSibling ;
|
138
|
+
}
|
139
|
+
|
140
|
+
return null ;
|
141
|
+
},
|
142
|
+
|
143
|
+
GetLastChild : function( node, childNames )
|
144
|
+
{
|
145
|
+
// If childNames is a string, transform it in a Array.
|
146
|
+
if ( typeof ( childNames ) == 'string' )
|
147
|
+
childNames = [ childNames ] ;
|
148
|
+
|
149
|
+
var eChild = node.lastChild ;
|
150
|
+
while( eChild )
|
151
|
+
{
|
152
|
+
if ( eChild.nodeType == 1 && ( !childNames || eChild.tagName.Equals( childNames ) ) )
|
153
|
+
return eChild ;
|
154
|
+
|
155
|
+
eChild = eChild.previousSibling ;
|
156
|
+
}
|
157
|
+
|
158
|
+
return null ;
|
159
|
+
},
|
160
|
+
|
161
|
+
/*
|
162
|
+
* Gets the previous element (nodeType=1) in the source order. Returns
|
163
|
+
* "null" If no element is found.
|
164
|
+
* @param {Object} currentNode The node to start searching from.
|
165
|
+
* @param {Boolean} ignoreSpaceTextOnly Sets how text nodes will be
|
166
|
+
* handled. If set to "true", only white spaces text nodes
|
167
|
+
* will be ignored, while non white space text nodes will stop
|
168
|
+
* the search, returning null. If "false" or ommitted, all
|
169
|
+
* text nodes are ignored.
|
170
|
+
* @param {string[]} stopSearchElements An array of element names that
|
171
|
+
* will cause the search to stop when found, returning null.
|
172
|
+
* May be ommitted (or null).
|
173
|
+
* @param {string[]} ignoreElements An array of element names that
|
174
|
+
* must be ignored during the search.
|
175
|
+
*/
|
176
|
+
GetPreviousSourceElement : function( currentNode, ignoreSpaceTextOnly, stopSearchElements, ignoreElements )
|
177
|
+
{
|
178
|
+
if ( !currentNode )
|
179
|
+
return null ;
|
180
|
+
|
181
|
+
if ( stopSearchElements && currentNode.nodeType == 1 && currentNode.nodeName.IEquals( stopSearchElements ) )
|
182
|
+
return null ;
|
183
|
+
|
184
|
+
if ( currentNode.previousSibling )
|
185
|
+
currentNode = currentNode.previousSibling ;
|
186
|
+
else
|
187
|
+
return this.GetPreviousSourceElement( currentNode.parentNode, ignoreSpaceTextOnly, stopSearchElements, ignoreElements ) ;
|
188
|
+
|
189
|
+
while ( currentNode )
|
190
|
+
{
|
191
|
+
if ( currentNode.nodeType == 1 )
|
192
|
+
{
|
193
|
+
if ( stopSearchElements && currentNode.nodeName.IEquals( stopSearchElements ) )
|
194
|
+
break ;
|
195
|
+
|
196
|
+
if ( !ignoreElements || !currentNode.nodeName.IEquals( ignoreElements ) )
|
197
|
+
return currentNode ;
|
198
|
+
}
|
199
|
+
else if ( ignoreSpaceTextOnly && currentNode.nodeType == 3 && currentNode.nodeValue.RTrim().length > 0 )
|
200
|
+
break ;
|
201
|
+
|
202
|
+
if ( currentNode.lastChild )
|
203
|
+
currentNode = currentNode.lastChild ;
|
204
|
+
else
|
205
|
+
return this.GetPreviousSourceElement( currentNode, ignoreSpaceTextOnly, stopSearchElements, ignoreElements ) ;
|
206
|
+
}
|
207
|
+
|
208
|
+
return null ;
|
209
|
+
},
|
210
|
+
|
211
|
+
/*
|
212
|
+
* Gets the next element (nodeType=1) in the source order. Returns
|
213
|
+
* "null" If no element is found.
|
214
|
+
* @param {Object} currentNode The node to start searching from.
|
215
|
+
* @param {Boolean} ignoreSpaceTextOnly Sets how text nodes will be
|
216
|
+
* handled. If set to "true", only white spaces text nodes
|
217
|
+
* will be ignored, while non white space text nodes will stop
|
218
|
+
* the search, returning null. If "false" or ommitted, all
|
219
|
+
* text nodes are ignored.
|
220
|
+
* @param {string[]} stopSearchElements An array of element names that
|
221
|
+
* will cause the search to stop when found, returning null.
|
222
|
+
* May be ommitted (or null).
|
223
|
+
* @param {string[]} ignoreElements An array of element names that
|
224
|
+
* must be ignored during the search.
|
225
|
+
*/
|
226
|
+
GetNextSourceElement : function( currentNode, ignoreSpaceTextOnly, stopSearchElements, ignoreElements )
|
227
|
+
{
|
228
|
+
if ( !currentNode )
|
229
|
+
return null ;
|
230
|
+
|
231
|
+
if ( currentNode.nextSibling )
|
232
|
+
currentNode = currentNode.nextSibling ;
|
233
|
+
else
|
234
|
+
return this.GetNextSourceElement( currentNode.parentNode, ignoreSpaceTextOnly, stopSearchElements, ignoreElements ) ;
|
235
|
+
|
236
|
+
while ( currentNode )
|
237
|
+
{
|
238
|
+
if ( currentNode.nodeType == 1 )
|
239
|
+
{
|
240
|
+
if ( stopSearchElements && currentNode.nodeName.IEquals( stopSearchElements ) )
|
241
|
+
break ;
|
242
|
+
|
243
|
+
if ( !ignoreElements || !currentNode.nodeName.IEquals( ignoreElements ) )
|
244
|
+
return currentNode ;
|
245
|
+
}
|
246
|
+
else if ( ignoreSpaceTextOnly && currentNode.nodeType == 3 && currentNode.nodeValue.RTrim().length > 0 )
|
247
|
+
break ;
|
248
|
+
|
249
|
+
if ( currentNode.firstChild )
|
250
|
+
currentNode = currentNode.firstChild ;
|
251
|
+
else
|
252
|
+
return this.GetNextSourceElement( currentNode, ignoreSpaceTextOnly, stopSearchElements, ignoreElements ) ;
|
253
|
+
}
|
254
|
+
|
255
|
+
return null ;
|
256
|
+
},
|
257
|
+
|
258
|
+
// Inserts a element after a existing one.
|
259
|
+
InsertAfterNode : function( existingNode, newNode )
|
260
|
+
{
|
261
|
+
return existingNode.parentNode.insertBefore( newNode, existingNode.nextSibling ) ;
|
262
|
+
},
|
263
|
+
|
264
|
+
GetParents : function( node )
|
265
|
+
{
|
266
|
+
var parents = new Array() ;
|
267
|
+
|
268
|
+
while ( node )
|
269
|
+
{
|
270
|
+
parents.splice( 0, 0, node ) ;
|
271
|
+
node = node.parentNode ;
|
272
|
+
}
|
273
|
+
|
274
|
+
return parents ;
|
275
|
+
},
|
276
|
+
|
277
|
+
GetIndexOf : function( node )
|
278
|
+
{
|
279
|
+
var currentNode = node.parentNode ? node.parentNode.firstChild : null ;
|
280
|
+
var currentIndex = -1 ;
|
281
|
+
|
282
|
+
while ( currentNode )
|
283
|
+
{
|
284
|
+
currentIndex++ ;
|
285
|
+
|
286
|
+
if ( currentNode == node )
|
287
|
+
return currentIndex ;
|
288
|
+
|
289
|
+
currentNode = currentNode.nextSibling ;
|
290
|
+
}
|
291
|
+
|
292
|
+
return -1 ;
|
293
|
+
}
|
294
|
+
} ;
|