summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Tite2005-01-24 20:08:22 (GMT)
committer Jorge Tite2005-01-24 20:08:22 (GMT)
commit44a01756b3d91f4cc8ce6b242d892245e65102ea (patch)
treea4820f6f7f188c4cfcf7f8dcdfd4464c71b185e4
*** empty log message ***
-rw-r--r--lib/editor/_source/classes/fckcontextmenugroup.js66
-rw-r--r--lib/editor/_source/classes/fckcontextmenuitem.js100
-rw-r--r--lib/editor/_source/classes/fckcontextmenuseparator.js56
-rw-r--r--lib/editor/_source/classes/fckevents.js54
-rw-r--r--lib/editor/_source/classes/fckpanel_gecko.js174
-rw-r--r--lib/editor/_source/classes/fckpanel_ie.js75
-rw-r--r--lib/editor/_source/classes/fckplugin.js54
-rw-r--r--lib/editor/_source/classes/fckspecialcombo.js206
-rw-r--r--lib/editor/_source/classes/fckstyledef.js56
-rw-r--r--lib/editor/_source/classes/fckstyledef_gecko.js108
-rw-r--r--lib/editor/_source/classes/fckstyledef_ie.js131
-rw-r--r--lib/editor/_source/classes/fckstylesloader.js85
-rw-r--r--lib/editor/_source/classes/fcktoolbar.js66
-rw-r--r--lib/editor/_source/classes/fcktoolbarbutton.js130
-rw-r--r--lib/editor/_source/classes/fcktoolbarcombo.js150
-rw-r--r--lib/editor/_source/classes/fcktoolbarfontformatcombo.js60
-rw-r--r--lib/editor/_source/classes/fcktoolbarfontscombo.js40
-rw-r--r--lib/editor/_source/classes/fcktoolbarfontsizecombo.js45
-rw-r--r--lib/editor/_source/classes/fcktoolbarpanelbutton.js117
-rw-r--r--lib/editor/_source/classes/fcktoolbarspecialcombo.js92
-rw-r--r--lib/editor/_source/classes/fcktoolbarstylecombo.js89
-rw-r--r--lib/editor/_source/classes/fckxml.js109
-rw-r--r--lib/editor/_source/internals/fck.js30
-rw-r--r--lib/editor/_source/internals/fck_1.js124
-rw-r--r--lib/editor/_source/internals/fck_1_gecko.js156
-rw-r--r--lib/editor/_source/internals/fck_1_ie.js181
-rw-r--r--lib/editor/_source/internals/fck_2.js156
-rw-r--r--lib/editor/_source/internals/fck_2_gecko.js204
-rw-r--r--lib/editor/_source/internals/fck_2_ie.js152
-rw-r--r--lib/editor/_source/internals/fck_last.js56
-rw-r--r--lib/editor/_source/internals/fck_onload.js109
-rw-r--r--lib/editor/_source/internals/fckbrowserinfo.js41
-rw-r--r--lib/editor/_source/internals/fckcommands.js95
-rw-r--r--lib/editor/_source/internals/fckconfig.js75
-rw-r--r--lib/editor/_source/internals/fckcontextmenu.js192
-rw-r--r--lib/editor/_source/internals/fckcontextmenu_gecko.js91
-rw-r--r--lib/editor/_source/internals/fckcontextmenu_ie.js68
-rw-r--r--lib/editor/_source/internals/fckcoreextensions.js70
-rw-r--r--lib/editor/_source/internals/fckdebug.js41
-rw-r--r--lib/editor/_source/internals/fckdialog.js36
-rw-r--r--lib/editor/_source/internals/fckdialog_gecko.js73
-rw-r--r--lib/editor/_source/internals/fckdialog_ie.js28
-rw-r--r--lib/editor/_source/internals/fcklanguagemanager.js97
-rw-r--r--lib/editor/_source/internals/fckplugins.js43
-rw-r--r--lib/editor/_source/internals/fckregexlib.js30
-rw-r--r--lib/editor/_source/internals/fckscriptloader.js115
-rw-r--r--lib/editor/_source/internals/fckselection.js23
-rw-r--r--lib/editor/_source/internals/fckselection_gecko.js127
-rw-r--r--lib/editor/_source/internals/fckselection_ie.js121
-rw-r--r--lib/editor/_source/internals/fcktablehandler.js353
-rw-r--r--lib/editor/_source/internals/fcktablehandler_gecko.js49
-rw-r--r--lib/editor/_source/internals/fcktablehandler_ie.js54
-rw-r--r--lib/editor/_source/internals/fcktoolbaritems.js101
-rw-r--r--lib/editor/_source/internals/fcktoolbarset.js121
-rw-r--r--lib/editor/_source/internals/fcktools.js192
-rw-r--r--lib/editor/_source/internals/fcktools_gecko.js77
-rw-r--r--lib/editor/_source/internals/fcktools_ie.js49
-rw-r--r--lib/editor/_source/internals/fckurlparams.js33
-rw-r--r--lib/editor/_source/internals/fckxhtml.js280
-rw-r--r--lib/editor/_source/internals/fckxhtmlentities.js295
-rw-r--r--lib/editor/filemanager/browser/default/images/ButtonArrow.gifbin0 -> 138 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/Folder.gifbin0 -> 128 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/Folder32.gifbin0 -> 281 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/FolderOpened.gifbin0 -> 132 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/FolderOpened32.gifbin0 -> 264 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/FolderUp.gifbin0 -> 132 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/ai.gifbin0 -> 403 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/avi.gifbin0 -> 249 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/bmp.gifbin0 -> 126 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/cs.gifbin0 -> 128 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/default.icon.gifbin0 -> 113 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/dll.gifbin0 -> 132 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/doc.gifbin0 -> 140 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/exe.gifbin0 -> 109 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/fla.gifbin0 -> 382 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/gif.gifbin0 -> 125 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/htm.gifbin0 -> 621 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/html.gifbin0 -> 621 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/jpg.gifbin0 -> 125 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/js.gifbin0 -> 139 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/mdb.gifbin0 -> 146 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/mp3.gifbin0 -> 249 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/pdf.gifbin0 -> 230 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/ppt.gifbin0 -> 139 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/rdp.gifbin0 -> 606 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/swf.gifbin0 -> 388 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/swt.gifbin0 -> 388 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/txt.gifbin0 -> 122 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/vsd.gifbin0 -> 136 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/xls.gifbin0 -> 138 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/xml.gifbin0 -> 231 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/icons/zip.gifbin0 -> 235 bytes
-rw-r--r--lib/editor/filemanager/browser/default/images/spacer.gifbin0 -> 43 bytes
-rw-r--r--lib/editor/images/smiley/fun/aiua.gifbin0 -> 1171 bytes
-rw-r--r--lib/editor/images/smiley/fun/ak.gifbin0 -> 434 bytes
-rw-r--r--lib/editor/images/smiley/fun/alien.gifbin0 -> 454 bytes
-rw-r--r--lib/editor/images/smiley/fun/alien2.gifbin0 -> 240 bytes
-rw-r--r--lib/editor/images/smiley/fun/angry.gifbin0 -> 583 bytes
-rw-r--r--lib/editor/images/smiley/fun/angry1.gifbin0 -> 1818 bytes
-rw-r--r--lib/editor/images/smiley/fun/apophys.gifbin0 -> 956 bytes
-rw-r--r--lib/editor/images/smiley/fun/assjani.gifbin0 -> 1638 bytes
-rw-r--r--lib/editor/images/smiley/fun/asthanos.gifbin0 -> 5154 bytes
-rw-r--r--lib/editor/images/smiley/fun/bazuzeus.gifbin0 -> 603 bytes
-rw-r--r--lib/editor/images/smiley/fun/beaute.gifbin0 -> 471 bytes
-rw-r--r--lib/editor/images/smiley/fun/bigsmile.gifbin0 -> 166 bytes
-rw-r--r--lib/editor/images/smiley/fun/blush.gifbin0 -> 476 bytes
-rw-r--r--lib/editor/images/smiley/fun/boid.gifbin0 -> 340 bytes
-rw-r--r--lib/editor/images/smiley/fun/bonk.gifbin0 -> 1372 bytes
-rw-r--r--lib/editor/images/smiley/fun/bored.gifbin0 -> 235 bytes
-rw-r--r--lib/editor/images/smiley/fun/borg.gifbin0 -> 160 bytes
-rw-r--r--lib/editor/images/smiley/fun/capo.gifbin0 -> 1702 bytes
-rw-r--r--lib/editor/images/smiley/fun/confused.gifbin0 -> 1111 bytes
-rw-r--r--lib/editor/images/smiley/fun/cool.gifbin0 -> 172 bytes
-rw-r--r--lib/editor/images/smiley/fun/crazy.gifbin0 -> 453 bytes
-rw-r--r--lib/editor/images/smiley/fun/cwm14.gifbin0 -> 1053 bytes
-rw-r--r--lib/editor/images/smiley/fun/demis_roussos.gifbin0 -> 386 bytes
-rw-r--r--lib/editor/images/smiley/fun/devil.gifbin0 -> 506 bytes
-rw-r--r--lib/editor/images/smiley/fun/devil2.gifbin0 -> 3536 bytes
-rw-r--r--lib/editor/images/smiley/fun/double0smile.gifbin0 -> 6276 bytes
-rw-r--r--lib/editor/images/smiley/fun/eek3.gifbin0 -> 3957 bytes
-rw-r--r--lib/editor/images/smiley/fun/eltaf.gifbin0 -> 4446 bytes
-rw-r--r--lib/editor/images/smiley/fun/gele.gifbin0 -> 584 bytes
-rw-r--r--lib/editor/images/smiley/fun/halm.gifbin0 -> 439 bytes
-rw-r--r--lib/editor/images/smiley/fun/happy.gifbin0 -> 239 bytes
-rw-r--r--lib/editor/images/smiley/fun/icon12.gifbin0 -> 585 bytes
-rw-r--r--lib/editor/images/smiley/fun/icon23.gifbin0 -> 252 bytes
-rw-r--r--lib/editor/images/smiley/fun/icon26.gifbin0 -> 378 bytes
-rw-r--r--lib/editor/images/smiley/fun/icon_angel.gifbin0 -> 496 bytes
-rw-r--r--lib/editor/images/smiley/fun/icon_bandit.gifbin0 -> 490 bytes
-rw-r--r--lib/editor/images/smiley/fun/icon_bravo.gifbin0 -> 1727 bytes
-rw-r--r--lib/editor/images/smiley/fun/icon_clown.gifbin0 -> 603 bytes
-rw-r--r--lib/editor/images/smiley/fun/jesors.gifbin0 -> 1315 bytes
-rw-r--r--lib/editor/images/smiley/fun/jesors1.gifbin0 -> 1031 bytes
-rw-r--r--lib/editor/images/smiley/fun/lol3.gifbin0 -> 5922 bytes
-rw-r--r--lib/editor/images/smiley/fun/love.gifbin0 -> 379 bytes
-rw-r--r--lib/editor/images/smiley/fun/mad.gifbin0 -> 170 bytes
-rw-r--r--lib/editor/images/smiley/fun/megaphone.gifbin0 -> 1035 bytes
-rw-r--r--lib/editor/images/smiley/fun/mmm.gifbin0 -> 509 bytes
-rw-r--r--lib/editor/images/smiley/fun/music.gifbin0 -> 359 bytes
-rw-r--r--lib/editor/images/smiley/fun/notify.gifbin0 -> 473 bytes
-rw-r--r--lib/editor/images/smiley/fun/nuts.gifbin0 -> 533 bytes
-rw-r--r--lib/editor/images/smiley/fun/obanon.gifbin0 -> 1090 bytes
-rw-r--r--lib/editor/images/smiley/fun/ouaip.gifbin0 -> 241 bytes
-rw-r--r--lib/editor/images/smiley/fun/pleure.gifbin0 -> 1967 bytes
-rw-r--r--lib/editor/images/smiley/fun/plugin.gifbin0 -> 1410 bytes
-rw-r--r--lib/editor/images/smiley/fun/question.gifbin0 -> 248 bytes
-rw-r--r--lib/editor/images/smiley/fun/question2.gifbin0 -> 359 bytes
-rw-r--r--lib/editor/images/smiley/fun/rasta2.gifbin0 -> 1078 bytes
-rw-r--r--lib/editor/images/smiley/fun/rastapop.gifbin0 -> 234 bytes
-rw-r--r--lib/editor/images/smiley/fun/rosebud.gifbin0 -> 350 bytes
-rw-r--r--lib/editor/images/smiley/fun/sad.gifbin0 -> 171 bytes
-rw-r--r--lib/editor/images/smiley/fun/sad2.gifbin0 -> 240 bytes
-rw-r--r--lib/editor/images/smiley/fun/shocked.gifbin0 -> 170 bytes
-rw-r--r--lib/editor/images/smiley/fun/sick.gifbin0 -> 894 bytes
-rw-r--r--lib/editor/images/smiley/fun/sick2.gifbin0 -> 243 bytes
-rw-r--r--lib/editor/images/smiley/fun/slaap.gifbin0 -> 979 bytes
-rw-r--r--lib/editor/images/smiley/fun/sleep.gifbin0 -> 3050 bytes
-rw-r--r--lib/editor/images/smiley/fun/smile.gifbin0 -> 174 bytes
-rw-r--r--lib/editor/images/smiley/fun/smiley_peur.gifbin0 -> 8277 bytes
-rw-r--r--lib/editor/images/smiley/fun/sors.gifbin0 -> 1329 bytes
-rw-r--r--lib/editor/images/smiley/fun/sovxx.gifbin0 -> 939 bytes
-rw-r--r--lib/editor/images/smiley/fun/spamafote.gifbin0 -> 1032 bytes
-rw-r--r--lib/editor/images/smiley/fun/tap67.gifbin0 -> 379 bytes
-rw-r--r--lib/editor/images/smiley/fun/thumbdown.gifbin0 -> 247 bytes
-rw-r--r--lib/editor/images/smiley/fun/thumbup.gifbin0 -> 249 bytes
-rw-r--r--lib/editor/images/smiley/fun/tigi.gifbin0 -> 724 bytes
-rw-r--r--lib/editor/images/smiley/fun/toad666.gifbin0 -> 2975 bytes
-rw-r--r--lib/editor/images/smiley/fun/tongue.gifbin0 -> 230 bytes
-rw-r--r--lib/editor/images/smiley/fun/tuffgong.gifbin0 -> 265 bytes
-rw-r--r--lib/editor/images/smiley/fun/urgeman.gifbin0 -> 273 bytes
-rw-r--r--lib/editor/images/smiley/fun/vanadium.gifbin0 -> 3585 bytes
-rw-r--r--lib/editor/images/smiley/fun/wink.gifbin0 -> 170 bytes
-rw-r--r--lib/editor/images/smiley/fun/worship.gifbin0 -> 1779 bytes
-rw-r--r--lib/editor/images/smiley/fun/wouaf.gifbin0 -> 1129 bytes
-rw-r--r--lib/editor/images/smiley/fun/wow.gifbin0 -> 1097 bytes
-rw-r--r--lib/editor/images/smiley/fun/xp1700.gifbin0 -> 278 bytes
-rw-r--r--lib/editor/images/smiley/fun/yltype.gifbin0 -> 1300 bytes
-rw-r--r--lib/editor/images/smiley/fun/yopyopyop.gifbin0 -> 9910 bytes
-rw-r--r--lib/editor/images/smiley/fun/youpi.gifbin0 -> 1503 bytes
-rw-r--r--lib/editor/images/smiley/fun/zoor.gifbin0 -> 1169 bytes
-rw-r--r--lib/editor/skins/default/images/toolbar.arrowright.gifbin0 -> 53 bytes
-rw-r--r--lib/editor/skins/default/images/toolbar.buttonarrow.gifbin0 -> 46 bytes
-rw-r--r--lib/editor/skins/default/images/toolbar.collapse.gifbin0 -> 152 bytes
-rw-r--r--lib/editor/skins/default/images/toolbar.end.gifbin0 -> 43 bytes
-rw-r--r--lib/editor/skins/default/images/toolbar.expand.gifbin0 -> 152 bytes
-rw-r--r--lib/editor/skins/default/images/toolbar.separator.gifbin0 -> 58 bytes
-rw-r--r--lib/editor/skins/default/images/toolbar.start.gifbin0 -> 112 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.about.gifbin0 -> 146 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.bgcolor.gifbin0 -> 178 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.bold.gifbin0 -> 77 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.copy.gifbin0 -> 113 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.cut.gifbin0 -> 95 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.find.gifbin0 -> 106 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.image.gifbin0 -> 150 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.indent.gifbin0 -> 90 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.inserthorizontalrule.gifbin0 -> 90 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.insertorderedlist.gifbin0 -> 86 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.insertunorderedlist.gifbin0 -> 83 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.italic.gifbin0 -> 80 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.justifycenter.gifbin0 -> 72 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.justifyfull.gifbin0 -> 72 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.justifyleft.gifbin0 -> 72 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.justifyright.gifbin0 -> 72 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.link.gifbin0 -> 196 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.newpage.gifbin0 -> 146 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.outdent.gifbin0 -> 90 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.paste.gifbin0 -> 149 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.pastetext.gifbin0 -> 144 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.pasteword.gifbin0 -> 180 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.preview.gifbin0 -> 139 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.print.gifbin0 -> 134 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.redo.gifbin0 -> 84 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.removeformat.gifbin0 -> 121 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.replace.gifbin0 -> 103 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.save.gifbin0 -> 111 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.selectall.gifbin0 -> 156 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.showdetails.gifbin0 -> 107 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.showtableborders.gifbin0 -> 118 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.smiley.gifbin0 -> 264 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.source.gifbin0 -> 127 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.specialchar.gifbin0 -> 146 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.spellcheck.gifbin0 -> 103 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.strikethrough.gifbin0 -> 84 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.subscript.gifbin0 -> 79 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.superscript.gifbin0 -> 80 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.table.gifbin0 -> 133 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.tablecell.gifbin0 -> 517 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.tabledeletecells.gifbin0 -> 118 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.tabledeletecolumns.gifbin0 -> 118 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.tabledeleterows.gifbin0 -> 121 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.tableinsertcell.gifbin0 -> 120 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.tableinsertcolumn.gifbin0 -> 125 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.tableinsertrow.gifbin0 -> 115 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.tablemergecells.gifbin0 -> 114 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.tablesplitcell.gifbin0 -> 118 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.textcolor.gifbin0 -> 164 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.underline.gifbin0 -> 89 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.undo.gifbin0 -> 85 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.unlink.gifbin0 -> 203 bytes
-rw-r--r--lib/editor/skins/silver/toolbar/button.unorderedlist.gifbin0 -> 83 bytes
240 files changed, 6201 insertions, 0 deletions
diff --git a/lib/editor/_source/classes/fckcontextmenugroup.js b/lib/editor/_source/classes/fckcontextmenugroup.js
new file mode 100644
index 0000000..51c11f5
--- /dev/null
+++ b/lib/editor/_source/classes/fckcontextmenugroup.js
@@ -0,0 +1,66 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckcontextmenugroup.js
+ * FCKContextMenuGroup Class: represents a group of items in the context
+ * menu. Generaly a group of items is directly dependent of the same rules.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-05-31 23:07:47
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKContextMenuGroup = function()
+{
+ this.IsVisible = true ;
+
+ // Array with all available context menu items of this group.
+ this.Items = new Array() ;
+
+ // This OPTIONAL function checks if the group must be shown.
+ this.ValidationFunction = null ;
+}
+
+// Adds an item to the group's items collecion.
+FCKContextMenuGroup.prototype.Add = function( contextMenuItem )
+{
+ this.Items[ this.Items.length ] = contextMenuItem ;
+}
+
+// Creates the <TR> elements that represent the item in a table (usually the rendered context menu).
+FCKContextMenuGroup.prototype.CreateTableRows = function( table )
+{
+ for ( var i = 0 ; i < this.Items.length ; i++ )
+ {
+ this.Items[i].CreateTableRow( table ) ;
+ }
+}
+
+FCKContextMenuGroup.prototype.SetVisible = function( isVisible )
+{
+ for ( var i = 0 ; i < this.Items.length ; i++ )
+ {
+ this.Items[i].SetVisible( isVisible ) ;
+ }
+
+ this.IsVisible = isVisible ;
+}
+
+FCKContextMenuGroup.prototype.RefreshState = function()
+{
+ if ( ! this.IsVisible ) return ;
+
+ for ( var i = 0 ; i < this.Items.length ; i++ )
+ {
+ this.Items[i].RefreshState() ;
+ }
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fckcontextmenuitem.js b/lib/editor/_source/classes/fckcontextmenuitem.js
new file mode 100644
index 0000000..3ce5107
--- /dev/null
+++ b/lib/editor/_source/classes/fckcontextmenuitem.js
@@ -0,0 +1,100 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckcontextmenuitem.js
+ * FCKContextMenuItem Class: represents a item in the context menu.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-10 17:14:48
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKContextMenuItem = function( contextMenu, commandName, label, hasIcon )
+{
+ this.ContextMenu = contextMenu ;
+ this.Command = FCKCommands.GetCommand( commandName ) ;
+ this.Label = label ? label : commandName ;
+ this.HasIcon = hasIcon ? true : false ;
+}
+
+FCKContextMenuItem.prototype.CreateTableRow = function( targetTable )
+{
+ // Creates the <TR> element.
+ this._Row = targetTable.insertRow(-1) ;
+ this._Row.className = 'CM_Disabled' ;
+ this._Row.FCKContextMenuItem = this ;
+
+ // Sets the mouse over event.
+ this._Row.onmouseover = function()
+ {
+ if ( this.className != 'CM_Disabled' )
+ this.className = 'CM_Over' ;
+ }
+
+ // Sets the mouse out event.
+ this._Row.onmouseout = function()
+ {
+ if ( this.className != 'CM_Disabled' )
+ this.className = 'CM_Option' ;
+ }
+
+ this._Row.onclick = function()
+ {
+ this.FCKContextMenuItem.ContextMenu.Hide() ;
+ this.FCKContextMenuItem.Command.Execute() ;
+ return false ;
+ }
+
+ var oCell = this._Row.insertCell(-1) ;
+ oCell.className = 'CM_Icon' ;
+
+ if ( this.HasIcon ) oCell.innerHTML = '<img alt="" src="' + FCKConfig.SkinPath + 'toolbar/button.' + this.Command.Name.toLowerCase() + '.gif" width="21" height="20" unselectable="on">' ;
+
+ oCell = this._Row.insertCell(-1) ;
+ oCell.className = 'CM_Label' ;
+ oCell.unselectable = 'on' ;
+ oCell.noWrap = true ;
+ oCell.innerHTML = this.Label ;
+}
+
+FCKContextMenuItem.prototype.SetVisible = function( isVisible )
+{
+ this._Row.style.display = isVisible ? '' : 'none' ;
+}
+
+FCKContextMenuItem.prototype.RefreshState = function()
+{
+ switch ( this.Command.GetState() )
+ {
+ case FCK_TRISTATE_ON :
+ case FCK_TRISTATE_OFF :
+ this._Row.className = 'CM_Option' ;
+ break ;
+ default :
+ this._Row.className = 'CM_Disabled' ;
+ break ;
+ }
+}
+
+/*
+Sample output.
+-----------------------------------------
+<tr class="CM_Disabled">
+ <td class="CM_Icon"><img alt="" src="icons/button.cut.gif" width="21" height="20" unselectable="on"></td>
+ <td class="CM_Label" unselectable="on">Cut</td>
+</tr>
+-----------------------------------------
+<tr class="CM_Option" onmouseover="OnOver(this);" onmouseout="OnOut(this);">
+ <td class="CM_Icon"></td>
+ <td class="CM_Label">Do Something</td>
+</tr>
+*/ \ No newline at end of file
diff --git a/lib/editor/_source/classes/fckcontextmenuseparator.js b/lib/editor/_source/classes/fckcontextmenuseparator.js
new file mode 100644
index 0000000..09f0e79
--- /dev/null
+++ b/lib/editor/_source/classes/fckcontextmenuseparator.js
@@ -0,0 +1,56 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckcontextmenuseparator.js
+ * FCKContextMenuSeparator Class: represents a separator in the toolbar.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-05-31 23:07:47
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKContextMenuSeparator = function()
+{
+}
+
+FCKContextMenuSeparator.prototype.CreateTableRow = function( targetTable )
+{
+ // Creates the <TR> element.
+ this._Row = targetTable.insertRow(-1) ;
+ this._Row.className = 'CM_Separator' ;
+
+ var oCell = this._Row.insertCell(-1) ;
+ oCell.className = 'CM_Icon' ;
+
+ oCell = this._Row.insertCell(-1) ;
+ oCell.className = 'CM_Label' ;
+ oCell.innerHTML = '<div></div>' ;
+}
+
+FCKContextMenuSeparator.prototype.SetVisible = function( isVisible )
+{
+ this._Row.style.display = isVisible ? '' : 'none' ;
+}
+
+FCKContextMenuSeparator.prototype.RefreshState = function()
+{
+ // Do nothing... its state doesn't change.
+}
+
+/*
+Sample output.
+-----------------------------------------
+<tr class="CM_Separator">
+ <td class="CM_Icon"></td>
+ <td class="CM_Label"><div></div></td>
+</tr>
+*/ \ No newline at end of file
diff --git a/lib/editor/_source/classes/fckevents.js b/lib/editor/_source/classes/fckevents.js
new file mode 100644
index 0000000..8ce0f85
--- /dev/null
+++ b/lib/editor/_source/classes/fckevents.js
@@ -0,0 +1,54 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckevents.js
+ * FCKEvents Class: used to handle events is a advanced way.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-04 16:52:36
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKEvents = function( eventsOwner )
+{
+ this.Owner = eventsOwner ;
+ this.RegisteredEvents = new Object() ;
+}
+
+FCKEvents.prototype.AttachEvent = function( eventName, functionPointer, params )
+{
+ if ( ! this.RegisteredEvents[ eventName ] ) this.RegisteredEvents[ eventName ] = new Array() ;
+
+ this.RegisteredEvents[ eventName ][ this.RegisteredEvents[ eventName ].length ] = functionPointer ;
+}
+
+FCKEvents.prototype.FireEvent = function( eventName, params )
+{
+ var bReturnValue = true ;
+
+ FCKDebug.Output( 'Firing event: ' + eventName, 'Fuchsia' ) ;
+
+ var oCalls = this.RegisteredEvents[ eventName ] ;
+ if ( oCalls )
+ {
+ for ( var i = 0 ; i < oCalls.length ; i++ )
+ {
+ if ( typeof( oCalls[ i ] ) == "function" ) // A Function Pointer
+ bReturnValue = ( bReturnValue && oCalls[ i ]( params ) ) ;
+ else // A string (code to run)
+ bReturnValue = ( bReturnValue && eval( oCalls[ i ] ) ) ;
+ }
+ }
+
+ return bReturnValue ;
+}
+
diff --git a/lib/editor/_source/classes/fckpanel_gecko.js b/lib/editor/_source/classes/fckpanel_gecko.js
new file mode 100644
index 0000000..9d62d5b
--- /dev/null
+++ b/lib/editor/_source/classes/fckpanel_gecko.js
@@ -0,0 +1,174 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckpanel_gecko.js
+ * FCKPanel Class: Creates and manages floating panels in Gecko Browsers.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-10 13:22:16
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKPanel = function( parentWindow )
+{
+ if ( parentWindow )
+ this.Window = parentWindow ;
+ else
+ {
+ this.Window = window ;
+
+ while ( this.Window != window.top && this.Window.parent.document.body.tagName != 'FRAMESET' )
+ {
+ this.Window = this.Window.parent ;
+ }
+ }
+}
+
+FCKPanel.prototype.Create = function()
+{
+ this._IFrame = this.Window.document.body.appendChild( this.Window.document.createElement('IFRAME') ) ;
+ this._IFrame.src = 'about:blank' ;
+ this._IFrame.frameBorder = '0';
+ this._IFrame.scrolling = 'no' ;
+ this._IFrame.style.left = '0px' ;
+ this._IFrame.style.top = '0px' ;
+ this._IFrame.width = 10 ;
+ this._IFrame.height = 10 ;
+ this._IFrame.style.position = 'absolute';
+ this._IFrame.style.visibility = 'hidden' ;
+
+ this._IFrame.IsFCKPanel = true ;
+ this._IFrame.Panel = this ;
+
+ this.Document = this._IFrame.contentWindow.document ;
+
+ // Initialize the IFRAME document body.
+ this.Document.open() ;
+ this.Document.write( '<html><head></head><body><\/body><\/html>' ) ;
+ this.Document.close() ;
+
+ // Remove the default margins.
+ this.Document.body.style.margin = this.Document.body.style.padding = '0px' ;
+
+ // Add the defined Style Sheet to the document.
+ if ( this.StyleSheet )
+ FCKTools.AppendStyleSheet( this.Document, this.StyleSheet ) ;
+
+
+ this.OuterDiv = this.Document.body.appendChild( this.Document.createElement('DIV') ) ;
+ this.OuterDiv.style.cssFloat = 'left' ;
+
+ this.PanelDiv = this.OuterDiv.appendChild( this.Document.createElement('DIV') ) ;
+ this.PanelDiv.className = 'FCK_Panel' ;
+
+ this.Created = true ;
+}
+
+FCKPanel.prototype.Show = function( panelX, panelY, relElement, width, height, autoSize )
+{
+ if ( ! this.Created )
+ this.Create() ;
+
+ if ( width != null && autoSize && width < this.OuterDiv.offsetWidth )
+ this.PanelDiv.style.width = width ;
+
+ if ( height != null && autoSize && height < this.PanelDiv.offsetHeight )
+ this.PanelDiv.style.height = height + 'px' ;
+
+ var oPos = this.GetElementPosition( relElement ) ;
+
+ panelX += oPos.X ;
+ panelY += oPos.Y ;
+
+ if ( panelX + this.OuterDiv.offsetWidth > this.Window.innerWidth )
+ {
+ // The following line aligns the panel to the other side of the refElement.
+ // panelX = oPos.X - ( this.PanelDiv.offsetWidth - relElement.offsetWidth ) ;
+
+ panelX -= panelX + this.OuterDiv.offsetWidth - this.Window.innerWidth ;
+ }
+
+ // Set the context menu DIV in the specified location.
+ this._IFrame.style.left = panelX + 'px' ;
+ this._IFrame.style.top = panelY + 'px' ;
+
+ // Watch the "OnClick" event for all windows to close the Context Menu.
+ function SetOnClickListener( targetWindow, targetFunction )
+ {
+ if ( targetWindow == null || ( targetWindow.frameElement && targetWindow.frameElement.IsFCKPanel ) )
+ return ;
+
+ targetWindow.document.addEventListener( 'click', targetFunction, false ) ;
+
+ for ( var i = 0 ; i < targetWindow.frames.length ; i++ )
+ SetOnClickListener( targetWindow.frames[i], targetFunction ) ;
+ }
+ SetOnClickListener( window.top, FCKPanelEventHandlers.OnDocumentClick ) ;
+
+ this._IFrame.width = this.OuterDiv.offsetWidth ;
+ this._IFrame.height = this.OuterDiv.offsetHeight ;
+
+ // Show it.
+ this._IFrame.style.visibility = '' ;
+}
+
+FCKPanel.prototype.GetElementPosition = function( el )
+{
+ // Initializes the Coordinates object that will be returned by the function.
+ var c = { X:0, Y:0 } ;
+
+ // Loop throw the offset chain.
+ while ( el )
+ {
+ c.X += el.offsetLeft ;
+ c.Y += el.offsetTop ;
+
+ if ( el.offsetParent == null && el.ownerDocument.defaultView != this.Window )
+ el = el.ownerDocument.defaultView.frameElement ;
+ else
+ el = el.offsetParent ;
+ }
+
+ // Return the Coordinates object
+ return c ;
+}
+
+FCKPanel.prototype.Hide = function()
+{
+ this._IFrame.style.visibility = 'hidden' ;
+// this._IFrame.style.left = this._IFrame.style.top = '0px' ;
+}
+
+var FCKPanelEventHandlers = new Object() ;
+
+FCKPanelEventHandlers.OnDocumentClick = function( e )
+{
+ var oWindow = e.target.ownerDocument.defaultView ;
+
+ if ( ! oWindow.IsFCKPanel )
+ {
+ function RemoveOnClickListener( targetWindow )
+ {
+ if ( targetWindow == null )
+ return ;
+
+ if ( targetWindow.frameElement && targetWindow.frameElement.IsFCKPanel )
+ targetWindow.frameElement.Panel.Hide() ;
+ else
+ targetWindow.document.removeEventListener( 'click', FCKPanelEventHandlers.OnDocumentClick, false ) ;
+
+ for ( var i = 0 ; i < targetWindow.frames.length ; i++ )
+ RemoveOnClickListener( targetWindow.frames[i] ) ;
+ }
+ RemoveOnClickListener( window.top ) ;
+ }
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fckpanel_ie.js b/lib/editor/_source/classes/fckpanel_ie.js
new file mode 100644
index 0000000..af9b2dd
--- /dev/null
+++ b/lib/editor/_source/classes/fckpanel_ie.js
@@ -0,0 +1,75 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckpanel_ie.js
+ * FCKPanel Class: Creates and manages floating panels in IE Browsers.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-10 13:20:42
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKPanel = function( parentWindow )
+{
+ this.Window = parentWindow ? parentWindow : window ;
+}
+
+FCKPanel.prototype.Create = function()
+{
+ // Create the Popup that will hold the panel.
+ this._Popup = this.Window.createPopup() ;
+
+ this.Document = this._Popup.document ;
+
+ this.Document.oncontextmenu = function() { return false ; }
+
+ if ( this.StyleSheet )
+ FCKTools.AppendStyleSheet( this.Document, this.StyleSheet ) ;
+
+ // Create the main DIV that is used as the panel base.
+ this.PanelDiv = this.Document.body.appendChild( this.Document.createElement('DIV') ) ;
+ this.PanelDiv.className = 'FCK_Panel' ;
+
+ this.Created = true ;
+}
+
+FCKPanel.prototype.Show = function( panelX, panelY, relElement, width, height, autoSize )
+{
+ if ( ! this.Created )
+ this._Create() ;
+
+ // The offsetWidth and offsetHeight properties are not available if the
+ // element is not visible. So we must "show" the popup with no size to
+ // be able to use that values in the second call.
+ this._Popup.show( panelX, panelY, 0, 0, relElement ) ;
+
+ if ( width == null || ( autoSize && width > this.PanelDiv.offsetWidth ) )
+ var iWidth = this.PanelDiv.offsetWidth ;
+ else
+ var iWidth = width ;
+
+ if ( height == null || ( autoSize && height > this.PanelDiv.offsetHeight ) )
+ var iHeight = this.PanelDiv.offsetHeight ;
+ else
+ var iHeight = height ;
+
+ this.PanelDiv.style.height = iHeight ;
+
+ // Second call: Show the Popup at the specified location.
+ this._Popup.show( panelX, panelY, iWidth, iHeight, relElement ) ;
+}
+
+FCKPanel.prototype.Hide = function()
+{
+ if ( this._Popup )
+ this._Popup.hide() ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fckplugin.js b/lib/editor/_source/classes/fckplugin.js
new file mode 100644
index 0000000..7ff356e
--- /dev/null
+++ b/lib/editor/_source/classes/fckplugin.js
@@ -0,0 +1,54 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckplugin.js
+ * FCKPlugin Class: Represents a single plugin.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-22 11:12:10
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// Certifies that the "PluginsPath" configuration ends with a slash.
+if ( !FCKConfig.PluginsPath.endsWith('/') )
+ FCKConfig.PluginsPath += '/' ;
+
+var FCKPlugin = function( name, availableLangs )
+{
+ this.Name = name ;
+ this.Path = FCKConfig.PluginsPath + name + '/' ;
+
+ if ( availableLangs.length == 0 )
+ this.AvailableLangs = new Array() ;
+ else
+ this.AvailableLangs = availableLangs.split(',') ;
+}
+
+FCKPlugin.prototype.Load = function()
+{
+ // Load the language file, if defined.
+ if ( this.AvailableLangs.length > 0 )
+ {
+ // Check if the plugin has the language file for the active language.
+ if ( this.AvailableLangs.indexOf( FCKLanguageManager.ActiveLanguage.Code ) >= 0 )
+ var sLang = FCKLanguageManager.ActiveLanguage.Code ;
+ else
+ // Load the default language file (first one) if the current one is not available.
+ var sLang = this.AvailableLangs[0] ;
+
+ // Add the main plugin script.
+ FCKScriptLoader.AddScript( this.Path + 'lang/' + sLang + '.js' ) ;
+ }
+
+ // Add the main plugin script.
+ FCKScriptLoader.AddScript( this.Path + 'fckplugin.js' ) ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fckspecialcombo.js b/lib/editor/_source/classes/fckspecialcombo.js
new file mode 100644
index 0000000..4163d40
--- /dev/null
+++ b/lib/editor/_source/classes/fckspecialcombo.js
@@ -0,0 +1,206 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckspecialcombo.js
+ * FCKSpecialCombo Class: represents a special combo.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-22 11:10:06
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKSpecialCombo = function( caption )
+{
+ // Default properties values.
+ this.FieldWidth = 80 ;
+ this.PanelWidth = 130 ;
+ this.PanelMaxHeight = 150 ;
+ this.Label = '&nbsp;' ;
+ this.Caption = caption ;
+
+ this.Enabled = true ;
+
+ this.Items = new Object() ;
+
+ this._Panel = new FCKPanel() ;
+ this._Panel.StyleSheet = FCKConfig.SkinPath + 'fck_contextmenu.css' ;
+ this._Panel.Create() ;
+ this._Panel.PanelDiv.className += ' SC_Panel' ;
+ this._Panel.PanelDiv.innerHTML = '<table cellpadding="0" cellspacing="0" width="100%" style="TABLE-LAYOUT: fixed"><tr><td nowrap></td></tr></table>' ;
+
+ this._ItemsHolderEl = this._Panel.PanelDiv.getElementsByTagName('TD')[0] ;
+}
+
+FCKSpecialCombo.prototype.AddItem = function( id, html, label )
+{
+ // <div class="SC_Item" onmouseover="this.className='SC_Item SC_ItemOver';" onmouseout="this.className='SC_Item';"><b>Bold 1</b></div>
+ var oDiv = this._ItemsHolderEl.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ;
+ oDiv.className = oDiv.originalClass = 'SC_Item' ;
+ oDiv.innerHTML = html ;
+ oDiv.FCKItemID = id ;
+ oDiv.FCKItemLabel = label ? label : id ;
+ oDiv.FCKSpecialCombo = this ;
+ oDiv.Selected = false ;
+
+ oDiv.onmouseover = function()
+ {
+ this.className += ' SC_ItemOver' ;
+ }
+
+ oDiv.onmouseout = function()
+ {
+ this.className = this.originalClass ;
+ }
+
+ oDiv.onclick = function()
+ {
+ this.FCKSpecialCombo._Panel.Hide() ;
+
+ this.FCKSpecialCombo.SetLabel( this.FCKItemLabel ) ;
+
+ if ( typeof( this.FCKSpecialCombo.OnSelect ) == 'function' )
+ this.FCKSpecialCombo.OnSelect( this.FCKItemID, this ) ;
+ }
+
+ this.Items[ id.toString().toLowerCase() ] = oDiv ;
+
+ return oDiv ;
+}
+
+FCKSpecialCombo.prototype.SelectItem = function( itemId )
+{
+ itemId = itemId ? itemId.toString().toLowerCase() : '' ;
+
+ var oDiv = this.Items[ itemId ] ;
+ if ( oDiv )
+ {
+ oDiv.className = oDiv.originalClass = 'SC_ItemSelected' ;
+ oDiv.Selected = true ;
+ }
+}
+
+FCKSpecialCombo.prototype.DeselectAll = function()
+{
+ for ( var i in this.Items )
+ {
+ this.Items[i].className = this.Items[i].originalClass = 'SC_Item' ;
+ this.Items[i].Selected = false ;
+ }
+}
+
+FCKSpecialCombo.prototype.SetLabelById = function( id )
+{
+ FCKDebug.Output( this.Caption + ': ' + id, '#0000FF' ) ;
+
+ id = id ? id.toString().toLowerCase() : '' ;
+
+ var oDiv = this.Items[ id ] ;
+ this.SetLabel( oDiv ? oDiv.FCKItemLabel : '' ) ;
+}
+
+FCKSpecialCombo.prototype.SetLabel = function( text )
+{
+ this.Label = text.length == 0 ? '&nbsp;' : text ;
+
+ if ( this._LabelEl )
+ this._LabelEl.innerHTML = this.Label ;
+}
+
+FCKSpecialCombo.prototype.SetEnabled = function( isEnabled )
+{
+ this.Enabled = isEnabled ;
+
+ this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ;
+}
+
+FCKSpecialCombo.prototype.Create = function( targetElement )
+{
+ this._OuterTable = targetElement.appendChild( document.createElement( 'TABLE' ) ) ;
+ this._OuterTable.cellPadding = 0 ;
+ this._OuterTable.cellSpacing = 0 ;
+
+ this._OuterTable.insertRow(-1) ;
+
+ if ( this.Caption && this.Caption.length > 0 )
+ {
+ var oCaptionCell = this._OuterTable.rows[0].insertCell(-1) ;
+ oCaptionCell.unselectable = 'on' ;
+ oCaptionCell.innerHTML = this.Caption ;
+ oCaptionCell.className = 'SC_FieldCaption' ;
+ }
+
+ // Create the main DIV element.
+ var oField = this._OuterTable.rows[0].insertCell(-1).appendChild( document.createElement( 'DIV' ) ) ;
+ oField.className = 'SC_Field' ;
+ oField.style.width = this.FieldWidth + 'px' ;
+ oField.innerHTML = '<table width="100%" cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;" unselectable="on"><tbody><tr><td class="SC_FieldLabel" unselectable="on"><label unselectable="on">&nbsp;</label></td><td class="SC_FieldButton" unselectable="on">&nbsp;</td></tr></tbody></table>' ;
+
+ this._LabelEl = oField.getElementsByTagName('label')[0] ;
+ this._LabelEl.innerHTML = this.Label ;
+
+ /* Events Handlers */
+
+ oField.SpecialCombo = this ;
+
+ oField.onmouseover = function()
+ {
+ if ( this.SpecialCombo.Enabled )
+ this.className='SC_Field SC_FieldOver' ;
+ }
+
+ oField.onmouseout = function()
+ {
+ this.className='SC_Field' ;
+ }
+
+ oField.onclick = function( e )
+ {
+ // For Mozilla we must stop the event propagation to avoid it hiding
+ // the panel because of a click outside of it.
+ if ( e )
+ {
+ e.stopPropagation() ;
+ FCKPanelEventHandlers.OnDocumentClick( e ) ;
+ }
+
+ if ( this.SpecialCombo.Enabled )
+ {
+ if ( typeof( this.SpecialCombo.OnBeforeClick ) == 'function' )
+ this.SpecialCombo.OnBeforeClick( this.SpecialCombo ) ;
+
+ if ( this.SpecialCombo._ItemsHolderEl.offsetHeight > this.SpecialCombo.PanelMaxHeight )
+ this.SpecialCombo._Panel.PanelDiv.style.height = this.SpecialCombo.PanelMaxHeight + 'px' ;
+ else
+ this.SpecialCombo._Panel.PanelDiv.style.height = this.SpecialCombo._ItemsHolderEl.offsetHeight + 'px' ;
+
+ this.SpecialCombo._Panel.PanelDiv.style.width = this.SpecialCombo.PanelWidth + 'px' ;
+ this.SpecialCombo._Panel.Show( 0, this.offsetHeight, this, null, this.SpecialCombo.PanelMaxHeight, true ) ;
+ }
+
+ return false ;
+ }
+}
+
+/*
+Sample Combo Field HTML output:
+
+<div class="SC_Field" style="width: 80px;">
+ <table width="100%" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
+ <tbody>
+ <tr>
+ <td class="SC_FieldLabel"><label>&nbsp;</label></td>
+ <td class="SC_FieldButton">&nbsp;</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+*/ \ No newline at end of file
diff --git a/lib/editor/_source/classes/fckstyledef.js b/lib/editor/_source/classes/fckstyledef.js
new file mode 100644
index 0000000..f982abf
--- /dev/null
+++ b/lib/editor/_source/classes/fckstyledef.js
@@ -0,0 +1,56 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckstyledef.js
+ * FCKStyleDef Class: represents a single stylke definition.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-22 11:09:42
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKStyleDef = function( name, element )
+{
+ this.Name = name ;
+ this.Element = element.toUpperCase() ;
+ this.IsObjectElement = FCKRegexLib.ObjectElements.test( this.Element ) ;
+ this.Attributes = new Object() ;
+}
+
+FCKStyleDef.prototype.AddAttribute = function( name, value )
+{
+ this.Attributes[ name ] = value ;
+}
+
+FCKStyleDef.prototype.GetOpenerTag = function()
+{
+ var s = '<' + this.Element ;
+
+ for ( var a in this.Attributes )
+ s += ' ' + a + '="' + this.Attributes[a] + '"' ;
+
+ return s + '>' ;
+}
+
+FCKStyleDef.prototype.GetCloserTag = function()
+{
+ return '</' + this.Element + '>' ;
+}
+
+
+FCKStyleDef.prototype.RemoveFromSelection = function()
+{
+ if ( FCKSelection.GetType() == 'Control' )
+ this._RemoveMe( FCKSelection.GetSelectedElement() ) ;
+ else
+ this._RemoveMe( FCKSelection.GetParentElement() ) ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fckstyledef_gecko.js b/lib/editor/_source/classes/fckstyledef_gecko.js
new file mode 100644
index 0000000..4a2a6d1
--- /dev/null
+++ b/lib/editor/_source/classes/fckstyledef_gecko.js
@@ -0,0 +1,108 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckstyledef_gecko.js
+ * FCKStyleDef Class: represents a single stylke definition. (Gecko specific)
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-22 11:09:45
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+FCKStyleDef.prototype.ApplyToSelection = function()
+{
+ if ( FCKSelection.GetType() == 'Text' && !this.IsObjectElement )
+ {
+ var oSelection = FCK.EditorWindow.getSelection() ;
+
+ // Create the main element.
+ var e = FCK.EditorDocument.createElement( this.Element ) ;
+
+ for ( var i = 0 ; i < oSelection.rangeCount ; i++ )
+ {
+ e.appendChild( oSelection.getRangeAt(i).extractContents() ) ;
+ }
+
+ // Set the attributes.
+ this._AddAttributes( e ) ;
+
+ // Remove the duplicated elements.
+ this._RemoveDuplicates( e ) ;
+
+ var oRange = oSelection.getRangeAt(0) ;
+ oRange.insertNode( e ) ;
+ }
+ else
+ {
+ var oControl = FCKSelection.GetSelectedElement() ;
+ if ( oControl.tagName == this.Element )
+ this._AddAttributes( oControl ) ;
+ }
+}
+
+FCKStyleDef.prototype._AddAttributes = function( targetElement )
+{
+ for ( var a in this.Attributes )
+ targetElement.setAttribute( a, this.Attributes[a], 0 ) ;
+}
+
+FCKStyleDef.prototype._RemoveDuplicates = function( parent )
+{
+ for ( var i = 0 ; i < parent.childNodes.length ; i++ )
+ {
+ var oChild = parent.childNodes[i] ;
+
+ if ( oChild.nodeType != 1 )
+ continue ;
+
+ this._RemoveDuplicates( oChild ) ;
+
+ if ( this.IsEqual( oChild ) )
+ FCKTools.RemoveOuterTags( oChild ) ;
+ }
+}
+
+FCKStyleDef.prototype.IsEqual = function( e )
+{
+ if ( e.tagName != this.Element )
+ return false ;
+
+ for ( var a in this.Attributes )
+ {
+ if ( e.getAttribute( a ) != this.Attributes[a] )
+ return false ;
+ }
+
+ return true ;
+}
+
+FCKStyleDef.prototype._RemoveMe = function( elementToCheck )
+{
+ if ( ! elementToCheck )
+ return ;
+
+ var oParent = elementToCheck.parentNode ;
+
+ if ( elementToCheck.nodeType == 1 && this.IsEqual( elementToCheck ) )
+ {
+ if ( this.IsObjectElement )
+ {
+ for ( var a in this.Attributes )
+ elementToCheck.removeAttribute( a, 0 ) ;
+ return ;
+ }
+ else
+ FCKTools.RemoveOuterTags( elementToCheck ) ;
+ }
+
+ this._RemoveMe( oParent ) ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fckstyledef_ie.js b/lib/editor/_source/classes/fckstyledef_ie.js
new file mode 100644
index 0000000..b3a16a3
--- /dev/null
+++ b/lib/editor/_source/classes/fckstyledef_ie.js
@@ -0,0 +1,131 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckstyledef_ie.js
+ * FCKStyleDef Class: represents a single stylke definition. (IE specific)
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-22 11:09:44
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+FCKStyleDef.prototype.ApplyToSelection = function()
+{
+ var oSelection = FCK.EditorDocument.selection ;
+
+ if ( oSelection.type == 'Text' )
+ {
+ var oRange = oSelection.createRange() ;
+
+ // Create the main element.
+ var e = document.createElement( this.Element ) ;
+ e.innerHTML = oRange.htmlText ;
+
+ // Set the attributes.
+ this._AddAttributes( e ) ;
+
+ // Remove the duplicated elements.
+ this._RemoveDuplicates( e ) ;
+
+ // Replace the selection with the resulting HTML.
+ oRange.pasteHTML( e.outerHTML ) ;
+ }
+ else if ( oSelection.type == 'Control' )
+ {
+ var oControl = FCKSelection.GetSelectedElement() ;
+ if ( oControl.tagName == this.Element )
+ this._AddAttributes( oControl ) ;
+ }
+}
+
+FCKStyleDef.prototype._AddAttributes = function( targetElement )
+{
+ for ( var a in this.Attributes )
+ {
+ if ( a.toLowerCase() == 'style' )
+ targetElement.style.cssText = this.Attributes[a] ;
+ else
+ targetElement.setAttribute( a, this.Attributes[a], 0 ) ;
+ }
+}
+
+FCKStyleDef.prototype._RemoveDuplicates = function( parent )
+{
+ for ( var i = 0 ; i < parent.children.length ; i++ )
+ {
+ var oChild = parent.children[i] ;
+ this._RemoveDuplicates( oChild ) ;
+
+ if ( this.IsEqual( oChild ) )
+ {
+ oChild.insertAdjacentHTML( 'beforeBegin', oChild.innerHTML ) ;
+ oChild.parentElement.removeChild( oChild ) ;
+ }
+ }
+}
+
+FCKStyleDef.prototype.IsEqual = function( e )
+{
+ if ( e.tagName != this.Element )
+ return false ;
+
+ for ( var a in this.Attributes )
+ {
+ switch ( a.toLowerCase() )
+ {
+ case 'style' :
+ if ( e.style.cssText.toLowerCase() != this.Attributes[a].toLowerCase() )
+ return false ;
+ break ;
+ case 'class' :
+ if ( e.getAttribute( 'className', 0 ) != this.Attributes[a] )
+ return false ;
+ break ;
+ default :
+ if ( e.getAttribute( a, 0 ) != this.Attributes[a] )
+ return false ;
+ }
+ }
+
+ return true ;
+}
+
+FCKStyleDef.prototype._RemoveMe = function( elementToCheck )
+{
+ if ( ! elementToCheck )
+ return ;
+
+ var oParent = elementToCheck.parentElement ;
+
+ if ( this.IsEqual( elementToCheck ) )
+ {
+ if ( this.IsObjectElement )
+ {
+ for ( var a in this.Attributes )
+ {
+ switch ( a.toLowerCase() )
+ {
+ case 'class' :
+ elementToCheck.removeAttribute( 'className', 0 ) ;
+ break ;
+ default :
+ elementToCheck.removeAttribute( a, 0 ) ;
+ }
+ }
+ return ;
+ }
+ else
+ FCKTools.RemoveOuterTags( elementToCheck ) ;
+ }
+
+ this._RemoveMe( oParent ) ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fckstylesloader.js b/lib/editor/_source/classes/fckstylesloader.js
new file mode 100644
index 0000000..165a192
--- /dev/null
+++ b/lib/editor/_source/classes/fckstylesloader.js
@@ -0,0 +1,85 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckstylesloader.js
+ * FCKStylesLoader Class: this class define objects that are responsible
+ * for loading the styles defined in the XML file.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-22 18:08:11
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKStylesLoader = function()
+{
+ this.Styles = new Object() ;
+ this.StyleGroups = new Object() ;
+ this.Loaded = false ;
+ this.HasObjectElements = false ;
+}
+
+FCKStylesLoader.prototype.Load = function( stylesXmlUrl )
+{
+ // Load the XML file into a FCKXml object.
+ var oXml = new FCKXml() ;
+ oXml.LoadUrl( stylesXmlUrl ) ;
+
+ // Get the "Style" nodes defined in the XML file.
+ var aStyleNodes = oXml.SelectNodes( 'Styles/Style' ) ;
+
+ // Add each style to our "Styles" collection.
+ for ( var i = 0 ; i < aStyleNodes.length ; i++ )
+ {
+ var sElement = aStyleNodes[i].attributes.getNamedItem('element').value.toUpperCase() ;
+
+ // Create the style definition object.
+ var oStyleDef = new FCKStyleDef( aStyleNodes[i].attributes.getNamedItem('name').value, sElement ) ;
+
+ if ( oStyleDef.IsObjectElement )
+ this.HasObjectElements = true ;
+
+ // Get the attributes defined for the style (if any).
+ var aAttNodes = oXml.SelectNodes( 'Attribute', aStyleNodes[i] ) ;
+
+ // Add the attributes to the style definition object.
+ for ( var j = 0 ; j < aAttNodes.length ; j++ )
+ {
+ var sAttName = aAttNodes[j].attributes.getNamedItem('name').value ;
+ var sAttValue = aAttNodes[j].attributes.getNamedItem('value').value ;
+
+ // IE changes the "style" attribute value when applied to an element
+ // so we must get the final resulting value (for comparision issues).
+ if ( sAttName.toLowerCase() == 'style' )
+ {
+ var oTempE = document.createElement( 'SPAN' ) ;
+ oTempE.style.cssText = sAttValue ;
+ sAttValue = oTempE.style.cssText ;
+ }
+
+ oStyleDef.AddAttribute( sAttName, sAttValue ) ;
+ }
+
+ // Add the style to the "Styles" collection using it's name as the key.
+ this.Styles[ oStyleDef.Name ] = oStyleDef ;
+
+ // Add the style to the "StyleGroups" collection.
+ var aGroup = this.StyleGroups[sElement] ;
+ if ( aGroup == null )
+ {
+ this.StyleGroups[sElement] = new Array() ;
+ aGroup = this.StyleGroups[sElement] ;
+ }
+ aGroup[aGroup.length] = oStyleDef ;
+ }
+
+ this.Loaded = true ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbar.js b/lib/editor/_source/classes/fcktoolbar.js
new file mode 100644
index 0000000..c4967f6
--- /dev/null
+++ b/lib/editor/_source/classes/fcktoolbar.js
@@ -0,0 +1,66 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktoolbar.js
+ * FCKToolbar Class: represents a toolbar. A toolbar is not the complete
+ * toolbar set visible, but just a strip on it... a group of items.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-05-31 23:07:47
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKToolbar = function()
+{
+ this.Items = new Array() ;
+
+ this.DOMTable = document.createElement( 'table' ) ;
+ this.DOMTable.className = 'TB_Toolbar' ;
+ with ( this.DOMTable )
+ {
+ // Sets the toolbar direction. IE uses "styleFloat" and Gecko uses "cssFloat".
+ style.styleFloat = style.cssFloat = FCKLang.Dir == 'rtl' ? 'right' : 'left' ;
+
+ cellPadding = 0 ;
+ cellSpacing = 0 ;
+ border = 0 ;
+ }
+
+ this.DOMRow = this.DOMTable.insertRow(-1) ;
+
+ var oCell = this.DOMRow.insertCell(-1) ;
+ oCell.className = 'TB_Start' ;
+ oCell.innerHTML = '<img src="' + FCKConfig.SkinPath + 'images/toolbar.start.gif" width="7" height="21" style="VISIBILITY: hidden" onload="this.style.visibility = \'\';" unselectable="on">' ;
+
+ FCKToolbarSet.DOMElement.appendChild( this.DOMTable ) ;
+}
+
+FCKToolbar.prototype.AddItem = function( toolbarItem )
+{
+ this.Items[ this.Items.length ] = toolbarItem ;
+ toolbarItem.CreateInstance( this ) ;
+}
+
+FCKToolbar.prototype.AddSeparator = function()
+{
+ var oCell = this.DOMRow.insertCell(-1) ;
+ oCell.unselectable = 'on' ;
+ oCell.innerHTML = '<img src="' + FCKConfig.SkinPath + 'images/toolbar.separator.gif" width="5" height="21" style="VISIBILITY: hidden" onload="this.style.visibility = \'\';" unselectable="on">' ;
+}
+
+FCKToolbar.prototype.AddTerminator = function()
+{
+ var oCell = this.DOMRow.insertCell(-1) ;
+ oCell.className = 'TB_End' ;
+ oCell.innerHTML = '<img src="' + FCKConfig.SkinPath + 'images/toolbar.end.gif" width="12" height="21" style="VISIBILITY: hidden" onload="this.style.visibility = \'\';" unselectable="on">' ;
+}
+
diff --git a/lib/editor/_source/classes/fcktoolbarbutton.js b/lib/editor/_source/classes/fcktoolbarbutton.js
new file mode 100644
index 0000000..249f316
--- /dev/null
+++ b/lib/editor/_source/classes/fcktoolbarbutton.js
@@ -0,0 +1,130 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktoolbarbutton.js
+ * FCKToolbarButton Class: represents a button in the toolbar.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-16 00:40:01
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKToolbarButton = function( commandName, label, tooltip, style, sourceView )
+{
+ this.Command = FCKCommands.GetCommand( commandName ) ;
+ this.Label = label ? label : commandName ;
+ this.Tooltip = tooltip ? tooltip : ( label ? label : commandName) ;
+ this.Style = style ? style : FCK_TOOLBARITEM_ONLYICON ;
+ this.SourceView = sourceView ? true : false ;
+ this.IconPath = FCKConfig.SkinPath + 'toolbar/button.' + commandName.toLowerCase() + '.gif' ;
+ this.State = FCK_UNKNOWN ;
+}
+
+FCKToolbarButton.prototype.CreateInstance = function( parentToolbar )
+{
+/*
+ <td title="Bold" class="TB_Button_Off" unselectable="on" onmouseover="Button_OnMouseOver(this);" onmouseout="Button_OnMouseOut(this);">
+ <table class="TB_ButtonType_Icon" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td class="TB_Icon"><img src="icons/button.redo.gif" width="21" height="21"></td>
+ <td class="TB_Text" unselectable="on">Redo</td>
+ </tr>
+ </table>
+ </td>
+*/
+ this.DOMDiv = document.createElement( 'div' ) ;
+ this.DOMDiv.className = 'TB_Button_Off' ;
+
+ this.DOMDiv.FCKToolbarButton = this ;
+
+ this.DOMDiv.onmouseover = function()
+ {
+ if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED )
+ {
+ this.className = 'TB_Button_On' ;
+ }
+ }
+
+ this.DOMDiv.onmouseout = function()
+ {
+ if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED && this.FCKToolbarButton.State != FCK_TRISTATE_ON )
+ {
+ this.className = 'TB_Button_Off' ;
+ }
+ }
+
+ this.DOMDiv.onclick = function()
+ {
+ if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED )
+ this.FCKToolbarButton.Command.Execute() ;
+ return false ;
+ }
+
+ // Gets the correct CSS class to use for the specified style (param).
+ var sClass ;
+ switch ( this.Style )
+ {
+ case FCK_TOOLBARITEM_ONLYICON :
+ sClass = 'TB_ButtonType_Icon' ;
+ break ;
+ case FCK_TOOLBARITEM_ONLYTEXT :
+ sClass = 'TB_ButtonType_Text' ;
+ break ;
+ case FCK_TOOLBARITEM_ICONTEXT :
+ sClass = '' ;
+ break ;
+ }
+
+ this.DOMDiv.innerHTML =
+ '<table title="' + this.Tooltip + '" class="' + sClass + '" cellspacing="0" cellpadding="0" border="0" unselectable="on">' +
+ '<tr>' +
+ '<td class="TB_Icon" unselectable="on"><img src="' + this.IconPath + '" width="21" height="21" unselectable="on"></td>' +
+ '<td class="TB_Text" unselectable="on">' + this.Label + '</td>' +
+ '</tr>' +
+ '</table>' ;
+
+
+ var oCell = parentToolbar.DOMRow.insertCell(-1) ;
+ oCell.appendChild( this.DOMDiv ) ;
+
+ this.RefreshState() ;
+}
+
+FCKToolbarButton.prototype.RefreshState = function()
+{
+ // Gets the actual state.
+ var eState ;
+
+ if ( FCK.EditMode == FCK_EDITMODE_SOURCE && ! this.SourceView )
+ eState = FCK_TRISTATE_DISABLED ;
+ else
+ eState = this.Command.GetState() ;
+
+ // If there are no state changes than do nothing and return.
+ if ( eState == this.State ) return ;
+
+ // Sets the actual state.
+ this.State = eState ;
+
+ switch ( this.State )
+ {
+ case FCK_TRISTATE_ON :
+ this.DOMDiv.className = 'TB_Button_On' ;
+ break ;
+ case FCK_TRISTATE_OFF :
+ this.DOMDiv.className = 'TB_Button_Off' ;
+ break ;
+ default :
+ this.DOMDiv.className = 'TB_Button_Disabled' ;
+ break ;
+ }
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbarcombo.js b/lib/editor/_source/classes/fcktoolbarcombo.js
new file mode 100644
index 0000000..6ac6a71
--- /dev/null
+++ b/lib/editor/_source/classes/fcktoolbarcombo.js
@@ -0,0 +1,150 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktoolbarcombo.js
+ * FCKToolbarCombo Class: represents a combo in the toolbar.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-10 17:14:48
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKToolbarCombo = function( commandName, label, itemsValues, itemsNames, tooltip, style, firstIsBlank, itemsSeparator, sourceView )
+{
+ this.Command = FCKCommands.GetCommand( commandName ) ;
+
+ this.Label = label ? label : commandName ;
+ this.Tooltip = tooltip ? tooltip : ( label ? label : commandName) ;
+ this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ;
+ this.SourceView = sourceView ? true : false ;
+ this.State = FCK_UNKNOWN ;
+
+ this.ItemsValues = itemsValues ;
+ this.ItemsNames = itemsNames ? itemsNames : itemsValues ;
+ this.ItemsSeparator = itemsSeparator ? itemsSeparator : ';' ;
+
+ this.FirstIsBlank = firstIsBlank != null ? firstIsBlank : true ;
+}
+
+FCKToolbarCombo.prototype.CreateInstance = function( parentToolbar )
+{
+/*
+ <td class="TB_Combo_Disabled" unselectable="on">
+ <table class="ButtonType_IconText" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td class="TB_Text" unselectable="on">Style</td>
+ <td><select title="Style"><option>Style 1</option><option>Style 2</option></select></td>
+ </tr>
+ </table>
+ </td>
+*/
+ this.DOMDiv = document.createElement( 'div' ) ;
+ this.DOMDiv.className = 'TB_Combo_Off' ;
+
+ // Gets the correct CSS class to use for the specified style (param).
+ var sClass ;
+ switch ( this.Style )
+ {
+ case FCK_TOOLBARITEM_ONLYICON :
+ sClass = 'TB_ButtonType_Icon' ;
+ break ;
+ case FCK_TOOLBARITEM_ONLYTEXT :
+ sClass = 'TB_ButtonType_Text' ;
+ break ;
+ case FCK_TOOLBARITEM_ICONTEXT :
+ sClass = '' ;
+ break ;
+ }
+
+ this.DOMDiv.innerHTML =
+ '<table class="' + sClass + '" cellspacing="0" cellpadding="0" border="0" unselectable="on">' +
+ '<tr>' +
+ '<td class="TB_Text" unselectable="on" nowrap>' + this.Label + '</td>' +
+ '<td unselectable="on"><select title="' + this.Tooltip + '"></select></td>' +
+ '</tr>' +
+ '</table>' ;
+
+ // Gets the SELECT element.
+ this.SelectElement = this.DOMDiv.firstChild.firstChild.firstChild.childNodes.item(1).firstChild ;
+
+ this.SelectElement.FCKToolbarCombo = this ;
+
+ this.SelectElement.onchange = function()
+ {
+ this.FCKToolbarCombo.Command.Execute( this.value ) ;
+ return false ;
+ }
+
+ var oCell = parentToolbar.DOMRow.insertCell(-1) ;
+ oCell.appendChild( this.DOMDiv ) ;
+
+ // Loads all combo items.
+ this.RefreshItems() ;
+
+ // Sets its initial state (probably disabled).
+ this.RefreshState() ;
+}
+
+FCKToolbarCombo.prototype.RefreshItems = function()
+{
+ // Create the empty arrays of items to add (names and values)
+ var aNames = FCKTools.GetResultingArray( this.ItemsNames, this.ItemsSeparator ) ;
+ var aValues = FCKTools.GetResultingArray( this.ItemsValues, this.ItemsSeparator ) ;
+
+ // Clean up the combo.
+ FCKTools.RemoveAllSelectOptions( this.SelectElement ) ;
+
+ // Verifies if the first item in the combo must be blank.
+ if ( this.FirstIsBlank )
+ FCKTools.AddSelectOption( document, this.SelectElement, '', '' ) ;
+
+ // Add all items to the combo.
+ for ( var i = 0 ; i < aValues.length ; i++ )
+ {
+ FCKTools.AddSelectOption( document, this.SelectElement, aNames[i], aValues[i] ) ;
+ }
+}
+
+FCKToolbarCombo.prototype.RefreshState = function()
+{
+ // Gets the actual state.
+ var eState ;
+
+ if ( FCK.EditMode == FCK_EDITMODE_SOURCE && ! this.SourceView )
+ {
+ eState = FCK_TRISTATE_DISABLED ;
+
+ // Cleans the actual selection.
+ this.SelectElement.value = '' ;
+ }
+ else
+ {
+ var sValue = this.Command.GetState() ;
+
+ // Sets the combo value.
+ FCKTools.SelectNoCase( this.SelectElement, sValue ? sValue : '', '' ) ;
+
+ // Gets the actual state.
+ eState = sValue == null ? FCK_TRISTATE_DISABLED : FCK_TRISTATE_ON ;
+ }
+
+ // If there are no state changes then do nothing and return.
+ if ( eState == this.State ) return ;
+
+ // Sets the actual state.
+ this.State = eState ;
+
+ // Updates the graphical state.
+ this.DOMDiv.className = ( eState == FCK_TRISTATE_ON ? 'TB_Combo_Off' : 'TB_Combo_Disabled' ) ;
+ this.SelectElement.disabled = ( eState == FCK_TRISTATE_DISABLED ) ;
+}
+
diff --git a/lib/editor/_source/classes/fcktoolbarfontformatcombo.js b/lib/editor/_source/classes/fcktoolbarfontformatcombo.js
new file mode 100644
index 0000000..4d702ae
--- /dev/null
+++ b/lib/editor/_source/classes/fcktoolbarfontformatcombo.js
@@ -0,0 +1,60 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktoolbarfontformatcombo.js
+ * FCKToolbarPanelButton Class: Handles the Fonts combo selector.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-05 22:25:20
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKToolbarFontFormatCombo = function()
+{
+ this.Command = FCKCommands.GetCommand( 'FontFormat' ) ;
+}
+
+// Inherit from FCKToolbarSpecialCombo.
+FCKToolbarFontFormatCombo.prototype = new FCKToolbarSpecialCombo ;
+
+FCKToolbarFontFormatCombo.prototype.GetLabel = function()
+{
+ return FCKLang.FontFormat ;
+}
+
+FCKToolbarFontFormatCombo.prototype.CreateItems = function( targetSpecialCombo )
+{
+ // Get the format names from the language file.
+ var aNames = FCKLang['FontFormats'].split(';') ;
+ var oNames = {
+ p : aNames[0],
+ pre : aNames[1],
+ address : aNames[2],
+ h1 : aNames[3],
+ h2 : aNames[4],
+ h3 : aNames[5],
+ h4 : aNames[6],
+ h5 : aNames[7],
+ h6 : aNames[8],
+ div : aNames[9]
+ } ;
+
+ // Get the available formats from the configuration file.
+ var aTags = FCKConfig.FontFormats.split(';') ;
+
+ for ( var i = 0 ; i < aTags.length ; i++ )
+ {
+ if ( aTags[i] == 'div' && FCKBrowserInfo.IsGecko )
+ continue ;
+ this._Combo.AddItem( aTags[i], '<' + aTags[i] + '>' + oNames[aTags[i]] + '</' + aTags[i] + '>', oNames[aTags[i]] ) ;
+ }
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbarfontscombo.js b/lib/editor/_source/classes/fcktoolbarfontscombo.js
new file mode 100644
index 0000000..153ca50
--- /dev/null
+++ b/lib/editor/_source/classes/fcktoolbarfontscombo.js
@@ -0,0 +1,40 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktoolbarfontscombo.js
+ * FCKToolbarPanelButton Class: Handles the Fonts combo selector.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-19 07:50:38
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKToolbarFontsCombo = function()
+{
+ this.Command = FCKCommands.GetCommand( 'FontName' ) ;
+}
+
+// Inherit from FCKToolbarSpecialCombo.
+FCKToolbarFontsCombo.prototype = new FCKToolbarSpecialCombo ;
+
+FCKToolbarFontsCombo.prototype.GetLabel = function()
+{
+ return FCKLang.Font ;
+}
+
+FCKToolbarFontsCombo.prototype.CreateItems = function( targetSpecialCombo )
+{
+ var aFonts = FCKConfig.FontNames.split(';') ;
+
+ for ( var i = 0 ; i < aFonts.length ; i++ )
+ this._Combo.AddItem( aFonts[i], '<span style="font-family: \'' + aFonts[i] + '\'; font-size: 12px;">' + aFonts[i] + '</span>' ) ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbarfontsizecombo.js b/lib/editor/_source/classes/fcktoolbarfontsizecombo.js
new file mode 100644
index 0000000..00bd2eb
--- /dev/null
+++ b/lib/editor/_source/classes/fcktoolbarfontsizecombo.js
@@ -0,0 +1,45 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktoolbarfontsizecombo.js
+ * FCKToolbarPanelButton Class: Handles the Fonts combo selector.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-19 07:50:29
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKToolbarFontSizeCombo = function()
+{
+ this.Command = FCKCommands.GetCommand( 'FontSize' ) ;
+}
+
+// Inherit from FCKToolbarSpecialCombo.
+FCKToolbarFontSizeCombo.prototype = new FCKToolbarSpecialCombo ;
+
+FCKToolbarFontSizeCombo.prototype.GetLabel = function()
+{
+ return FCKLang.FontSize ;
+}
+
+FCKToolbarFontSizeCombo.prototype.CreateItems = function( targetSpecialCombo )
+{
+ targetSpecialCombo.FieldWidth = 70 ;
+
+ var aSizes = FCKConfig.FontSizes.split(';') ;
+
+ for ( var i = 0 ; i < aSizes.length ; i++ )
+ {
+ var aSizeParts = aSizes[i].split('/') ;
+ this._Combo.AddItem( aSizeParts[0], '<font size="' + aSizeParts[0] + '">' + aSizeParts[1] + '</font>', aSizeParts[1] ) ;
+ }
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbarpanelbutton.js b/lib/editor/_source/classes/fcktoolbarpanelbutton.js
new file mode 100644
index 0000000..c0c16c7
--- /dev/null
+++ b/lib/editor/_source/classes/fcktoolbarpanelbutton.js
@@ -0,0 +1,117 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktoolbarpanelbutton.js
+ * FCKToolbarPanelButton Class: represents a special button in the toolbar
+ * that shows a panel when pressed.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-30 09:26:22
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKToolbarPanelButton = function( commandName, label, tooltip, style )
+{
+ this.Command = FCKCommands.GetCommand( commandName ) ;
+ this.Label = label ? label : commandName ;
+ this.Tooltip = tooltip ? tooltip : ( label ? label : commandName) ;
+ this.Style = style ? style : FCK_TOOLBARITEM_ONLYICON ;
+ this.State = FCK_UNKNOWN ;
+}
+
+FCKToolbarPanelButton.prototype.CreateInstance = function( parentToolbar )
+{
+/*
+ <td title="Bold" class="TB_Button_Off" unselectable="on" onmouseover="Button_OnMouseOver(this);" onmouseout="Button_OnMouseOut(this);">
+ <table class="TB_ButtonType_Icon" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td class="TB_Icon"><img src="icons/button.redo.gif" width="21" height="21" style="VISIBILITY: hidden" onload="this.style.visibility = '';"></td>
+ <td class="TB_Text" unselectable="on">Redo</td>
+ <td class="TB_ButtonArrow"><img src="skin/images/toolbar_buttonarrow.gif" width="5" height="3"></td>
+ </tr>
+ </table>
+ </td>
+*/
+ this.DOMDiv = document.createElement( 'div' ) ;
+ this.DOMDiv.className = 'TB_Button_Off' ;
+
+ this.DOMDiv.FCKToolbarButton = this ;
+
+ this.DOMDiv.onmouseover = function()
+ {
+ if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED )
+ {
+ this.className = 'TB_Button_On' ;
+ }
+ }
+
+ this.DOMDiv.onmouseout = function()
+ {
+ if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED && this.FCKToolbarButton.State != FCK_TRISTATE_ON )
+ {
+ this.className = 'TB_Button_Off' ;
+ }
+ }
+
+ this.DOMDiv.onclick = function( e )
+ {
+ // For Mozilla we must stop the event propagation to avoid it hiding
+ // the panel because of a click outside of it.
+ if ( e )
+ {
+ e.stopPropagation() ;
+ FCKPanelEventHandlers.OnDocumentClick( e ) ;
+ }
+
+ if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED )
+ {
+ this.FCKToolbarButton.Command.Execute(0, this.FCKToolbarButton.DOMDiv.offsetHeight, this.FCKToolbarButton.DOMDiv) ;
+// this.FCKToolbarButton.HandleOnClick( this.FCKToolbarButton, e ) ;
+ }
+
+ return false ;
+ }
+
+ // Gets the correct CSS class to use for the specified style (param).
+ var sClass ;
+ switch ( this.Style )
+ {
+ case FCK_TOOLBARITEM_ONLYICON :
+ sClass = 'TB_ButtonType_Icon' ;
+ break ;
+ case FCK_TOOLBARITEM_ONLYTEXT :
+ sClass = 'TB_ButtonType_Text' ;
+ break ;
+ case FCK_TOOLBARITEM_ICONTEXT :
+ sClass = '' ;
+ break ;
+ }
+
+ this.DOMDiv.innerHTML =
+ '<table title="' + this.Tooltip + '" class="' + sClass + '" cellspacing="0" cellpadding="0" border="0" unselectable="on">' +
+ '<tr>' +
+ '<td class="TB_Icon" unselectable="on"><img src="' + FCKConfig.SkinPath + 'toolbar/button.' + this.Command.Name.toLowerCase() + '.gif" width="21" height="21" unselectable="on"></td>' +
+ '<td class="TB_Text" unselectable="on">' + this.Label + '</td>' +
+ '<td class="TB_ButtonArrow" unselectable="on"><img src="' + FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif" width="5" height="3"></td>' +
+ '</tr>' +
+ '</table>' ;
+
+
+ var oCell = parentToolbar.DOMRow.insertCell(-1) ;
+ oCell.appendChild( this.DOMDiv ) ;
+
+ this.RefreshState() ;
+}
+
+// The Panel Button works like a normal button so the refresh state function
+// defined for the normal button can be reused here.
+FCKToolbarPanelButton.prototype.RefreshState = FCKToolbarButton.prototype.RefreshState ; \ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbarspecialcombo.js b/lib/editor/_source/classes/fcktoolbarspecialcombo.js
new file mode 100644
index 0000000..0ecb7ba
--- /dev/null
+++ b/lib/editor/_source/classes/fcktoolbarspecialcombo.js
@@ -0,0 +1,92 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktoolbarspecialcombo.js
+ * FCKToolbarSpecialCombo Class: This is a "abstract" base class to be used
+ * by the special combo toolbar elements like font name, font size, paragraph format, etc...
+ *
+ * The following properties and methods must be implemented when inheriting from
+ * this class:
+ * - Property: Command [ The command to be executed ]
+ * - Method: GetLabel() [ Returns the label ]
+ * - CreateItems( targetSpecialCombo ) [ Add all items in the special combo ]
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-15 10:53:54
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKToolbarSpecialCombo = function()
+{}
+
+FCKToolbarSpecialCombo.prototype.CreateInstance = function( parentToolbar )
+{
+ this._Combo = new FCKSpecialCombo( this.GetLabel() ) ;
+ this._Combo.FieldWidth = 100 ;
+ this._Combo.PanelWidth = 150 ;
+ this._Combo.PanelMaxHeight = 150 ;
+
+ this.CreateItems( this._Combo ) ;
+
+ this._Combo.Create( parentToolbar.DOMRow.insertCell(-1) ) ;
+
+ this._Combo.Command = this.Command ;
+
+ this._Combo.OnSelect = function( itemId, item )
+ {
+ this.Command.Execute( itemId, item ) ;
+ }
+}
+
+FCKToolbarSpecialCombo.prototype.RefreshState = function()
+{
+ // Gets the actual state.
+ var eState ;
+
+ if ( FCK.EditMode == FCK_EDITMODE_SOURCE && ! this.SourceView )
+ eState = FCK_TRISTATE_DISABLED ;
+ else
+ {
+ var sValue = this.Command.GetState() ;
+
+ if ( sValue != FCK_TRISTATE_DISABLED )
+ {
+ eState = FCK_TRISTATE_ON ;
+
+ if ( typeof( this.RefreshActiveItems ) == 'function' )
+ this.RefreshActiveItems( this._Combo ) ;
+ else
+ {
+ this._Combo.DeselectAll() ;
+ this._Combo.SelectItem( sValue ) ;
+ this._Combo.SetLabelById( sValue ) ;
+ }
+ }
+ else
+ eState = FCK_TRISTATE_DISABLED ;
+ }
+
+ // If there are no state changes then do nothing and return.
+ if ( eState == this.State ) return ;
+
+ if ( eState == FCK_TRISTATE_DISABLED )
+ {
+ this._Combo.DeselectAll() ;
+ this._Combo.SetLabel( '' ) ;
+ }
+
+ // Sets the actual state.
+ this.State = eState ;
+
+ // Updates the graphical state.
+ this._Combo.SetEnabled( eState != FCK_TRISTATE_DISABLED ) ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fcktoolbarstylecombo.js b/lib/editor/_source/classes/fcktoolbarstylecombo.js
new file mode 100644
index 0000000..e395d62
--- /dev/null
+++ b/lib/editor/_source/classes/fcktoolbarstylecombo.js
@@ -0,0 +1,89 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktoolbarstylecombo.js
+ * FCKToolbarPanelButton Class: Handles the Fonts combo selector.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-19 07:50:11
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKToolbarStyleCombo = function()
+{
+ this.Command = FCKCommands.GetCommand( 'Style' ) ;
+}
+
+// Inherit from FCKToolbarSpecialCombo.
+FCKToolbarStyleCombo.prototype = new FCKToolbarSpecialCombo ;
+
+FCKToolbarStyleCombo.prototype.GetLabel = function()
+{
+ return FCKLang.Style ;
+}
+
+FCKToolbarStyleCombo.prototype.CreateItems = function( targetSpecialCombo )
+{
+ // Add the Editor Area CSS to the Styles panel so the style classes are previewed correctly.
+ FCKTools.AppendStyleSheet( targetSpecialCombo._Panel.Document, FCKConfig.EditorAreaCSS ) ;
+
+ // For some reason Gecko is blocking inside the "RefreshVisibleItems" function.
+ if ( ! FCKBrowserInfo.IsGecko )
+ targetSpecialCombo.OnBeforeClick = this.RefreshVisibleItems ;
+
+ // Add the styles to the special combo.
+ for ( var s in this.Command.Styles )
+ {
+ var oStyle = this.Command.Styles[s] ;
+ if ( oStyle.IsObjectElement )
+ var oItem = targetSpecialCombo.AddItem( s, s ) ;
+ else
+ var oItem = targetSpecialCombo.AddItem( s, oStyle.GetOpenerTag() + s + oStyle.GetCloserTag() ) ;
+ oItem.Style = oStyle ;
+ }
+}
+
+FCKToolbarStyleCombo.prototype.RefreshActiveItems = function( targetSpecialCombo )
+{
+ // Clear the actual selection.
+ targetSpecialCombo.DeselectAll() ;
+
+ // Get the active styles.
+ var aStyles = this.Command.GetActiveStyles() ;
+
+ if ( aStyles.length > 0 )
+ {
+ // Select the active styles in the combo.
+ for ( var i = 0 ; i < aStyles.length ; i++ )
+ targetSpecialCombo.SelectItem( aStyles[i].Name ) ;
+
+ // Set the combo label to the first style in the collection.
+ targetSpecialCombo.SetLabelById( aStyles[0].Name ) ;
+ }
+ else
+ targetSpecialCombo.SetLabel('') ;
+}
+
+FCKToolbarStyleCombo.prototype.RefreshVisibleItems = function( targetSpecialCombo )
+{
+ if ( FCKSelection.GetType() == 'Control' )
+ var sTagName = FCKSelection.GetSelectedElement().tagName ;
+
+ for ( var i in targetSpecialCombo.Items )
+ {
+ var oItem = targetSpecialCombo.Items[i] ;
+ if ( ( sTagName && oItem.Style.Element == sTagName ) || ( ! sTagName && ! oItem.Style.IsObjectElement ) )
+ oItem.style.display = '' ;
+ else
+ oItem.style.display = 'none' ; // For some reason Gecko is blocking here.
+ }
+} \ No newline at end of file
diff --git a/lib/editor/_source/classes/fckxml.js b/lib/editor/_source/classes/fckxml.js
new file mode 100644
index 0000000..c388be9
--- /dev/null
+++ b/lib/editor/_source/classes/fckxml.js
@@ -0,0 +1,109 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckxml.js
+ * FCKXml Class: class to load and manipulate XML files.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-22 11:13:07
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKXml = function()
+{}
+
+FCKXml.prototype.GetHttpRequest = function()
+{
+ if ( window.XMLHttpRequest ) // Gecko
+ return new XMLHttpRequest() ;
+ else if ( window.ActiveXObject ) // IE
+ return new ActiveXObject("MsXml2.XmlHttp") ;
+}
+
+FCKXml.prototype.LoadUrl = function( urlToCall, asyncFunctionPointer )
+{
+ var oFCKXml = this ;
+
+ var bAsync = ( typeof(asyncFunctionPointer) == 'function' ) ;
+
+ var oXmlHttp = this.GetHttpRequest() ;
+
+ oXmlHttp.open( "GET", urlToCall, bAsync ) ;
+
+ if ( bAsync )
+ {
+ oXmlHttp.onreadystatechange = function()
+ {
+ if ( oXmlHttp.readyState == 4 )
+ {
+ oFCKXml.DOMDocument = oXmlHttp.responseXML ;
+ asyncFunctionPointer( oFCKXml ) ;
+ }
+ }
+ }
+
+ oXmlHttp.send( null ) ;
+
+ if ( ! bAsync && oXmlHttp.status && oXmlHttp.status == 200 )
+ this.DOMDocument = oXmlHttp.responseXML ;
+ else
+ throw( 'Error loading "' + urlToCall + '"' ) ;
+}
+
+FCKXml.prototype.SelectNodes = function( xpath, contextNode )
+{
+ if ( document.all ) // IE
+ {
+ if ( contextNode )
+ return contextNode.selectNodes( xpath ) ;
+ else
+ return this.DOMDocument.selectNodes( xpath ) ;
+ }
+ else // Gecko
+ {
+ var aNodeArray = new Array();
+
+ var xPathResult = this.DOMDocument.evaluate( xpath, contextNode ? contextNode : this.DOMDocument,
+ this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), XPathResult.ORDERED_NODE_ITERATOR_TYPE, null) ;
+ if ( xPathResult )
+ {
+ var oNode = xPathResult.iterateNext() ;
+ while( oNode )
+ {
+ aNodeArray[aNodeArray.length] = oNode ;
+ oNode = xPathResult.iterateNext();
+ }
+ }
+ return aNodeArray ;
+ }
+}
+
+FCKXml.prototype.SelectSingleNode = function( xpath, contextNode )
+{
+ if ( document.all ) // IE
+ {
+ if ( contextNode )
+ return contextNode.selectSingleNode( xpath ) ;
+ else
+ return this.DOMDocument.selectSingleNode( xpath ) ;
+ }
+ else // Gecko
+ {
+ var xPathResult = this.DOMDocument.evaluate( xpath, contextNode ? contextNode : this.DOMDocument,
+ this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), 9, null);
+
+ if ( xPathResult && xPathResult.singleNodeValue )
+ return xPathResult.singleNodeValue ;
+ else
+ return null ;
+ }
+}
diff --git a/lib/editor/_source/internals/fck.js b/lib/editor/_source/internals/fck.js
new file mode 100644
index 0000000..29a7e1b
--- /dev/null
+++ b/lib/editor/_source/internals/fck.js
@@ -0,0 +1,30 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fck.js
+ * Creation and initialization of the "FCK" object. This is the main object
+ * that represents an editor instance.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-05-31 23:07:48
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// FCK represents the active editor instance
+var FCK = new Object() ;
+FCK.Name = FCKURLParams[ 'InstanceName' ] ;
+FCK.LinkedField = window.parent.document.getElementById( FCK.Name ) ;
+
+FCK.Status = FCK_STATUS_NOTLOADED ;
+FCK.EditMode = FCK_EDITMODE_WYSIWYG ;
+
+FCK.PasteEnabled = false ;
diff --git a/lib/editor/_source/internals/fck_1.js b/lib/editor/_source/internals/fck_1.js
new file mode 100644
index 0000000..6ffbd42
--- /dev/null
+++ b/lib/editor/_source/internals/fck_1.js
@@ -0,0 +1,124 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fck_1.js
+ * This is the first part of the "FCK" object creation. This is the main
+ * object that represents an editor instance.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-20 12:47:38
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+FCK.Events = new FCKEvents( FCK ) ;
+FCK.Toolbar = null ;
+
+FCK.StartEditor = function()
+{
+ // Get the editor's window and document (DOM)
+ this.EditorWindow = window.frames[ 'eEditorArea' ] ;
+ this.EditorDocument = this.EditorWindow.document ;
+
+ // TODO: Wait stable version and remove the following commented lines.
+ // The Base Path of the editor is saved to rebuild relative URL (IE issue).
+// this.BaseUrl = this.EditorDocument.location.protocol + '//' + this.EditorDocument.location.host ;
+
+ // Set the editor's startup contents
+ this.SetHTML( FCKTools.GetLinkedFieldValue() ) ;
+
+ // Set the editor area CSS file.
+ FCKTools.AppendStyleSheet( this.EditorDocument, FCKConfig.EditorAreaCSS ) ;
+
+ // Attach the editor to the form onsubmit event
+ FCKTools.AttachToLinkedFieldFormSubmit( this.UpdateLinkedField ) ;
+
+ // Initialize the default browser behaviors (browser specific).
+ this.InitializeBehaviors() ;
+}
+
+FCK.SetStatus = function( newStatus )
+{
+ this.Status = newStatus ;
+
+ if ( newStatus == FCK_STATUS_ACTIVE )
+ {
+ // Force the focus in the window to go to the editor.
+ window.onfocus = window.document.body.onfocus = FCK.Focus ;
+
+ // Force the focus in the editor.
+ if ( FCKConfig.StartupFocus )
+ FCK.Focus() ;
+
+
+
+ if ( FCKBrowserInfo.IsIE )
+ FCKScriptLoader.AddScript( 'js/fckeditorcode_ie_2.js' ) ;
+ else
+ FCKScriptLoader.AddScript( 'js/fckeditorcode_gecko_2.js' ) ;
+
+ }
+
+ this.Events.FireEvent( 'OnStatusChange', newStatus ) ;
+ if ( this.OnStatusChange ) this.OnStatusChange( newStatus ) ;
+
+}
+
+FCK.GetHTML = function()
+{
+ if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
+ {
+ // TODO: Wait stable version and remove the following commented lines.
+// if ( FCKBrowserInfo.IsIE )
+// FCK.CheckRelativeLinks() ;
+
+ return this.EditorDocument.body.innerHTML ;
+ }
+ else
+ return document.getElementById('eSourceField').value ;
+}
+
+FCK.GetXHTML = function()
+{
+ var bSource = ( FCK.EditMode == FCK_EDITMODE_SOURCE ) ;
+
+ if ( bSource )
+ this.SwitchEditMode() ;
+
+ // TODO: Wait stable version and remove the following commented lines.
+// if ( FCKBrowserInfo.IsIE )
+// FCK.CheckRelativeLinks() ;
+
+ var sXHTML = FCKXHtml.GetXHTML( this.EditorDocument.body ) ;
+
+ if ( bSource )
+ this.SwitchEditMode() ;
+
+ return sXHTML ;
+}
+
+FCK.UpdateLinkedField = function()
+{
+ if ( FCKConfig.EnableXHTML )
+ FCKTools.SetLinkedFieldValue( FCK.GetXHTML() ) ;
+ else
+ FCKTools.SetLinkedFieldValue( FCK.GetHTML() ) ;
+}
+
+FCK.ShowContextMenu = function( x, y )
+{
+ if ( this.Status != FCK_STATUS_COMPLETE )
+ return ;
+
+ FCKContextMenu.Show( x, y ) ;
+ this.Events.FireEvent( "OnContextMenu" ) ;
+}
+
diff --git a/lib/editor/_source/internals/fck_1_gecko.js b/lib/editor/_source/internals/fck_1_gecko.js
new file mode 100644
index 0000000..431545b
--- /dev/null
+++ b/lib/editor/_source/internals/fck_1_gecko.js
@@ -0,0 +1,156 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fck_1_gecko.js
+ * This is the first part of the "FCK" object creation. This is the main
+ * object that represents an editor instance.
+ * (Gecko specific implementations)
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-15 13:26:29
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+FCK.Description = "FCKeditor for Gecko Browsers" ;
+
+FCK.InitializeBehaviors = function()
+{
+ // Disable Right-Click
+ var oOnContextMenu = function( e )
+ {
+ e.preventDefault() ;
+ FCK.ShowContextMenu( e.clientX, e.clientY ) ;
+ }
+ this.EditorDocument.addEventListener( 'contextmenu', oOnContextMenu, true ) ;
+
+ var oOnKeyDown = function( e )
+ {
+ if ( e.ctrlKey && !e.shiftKey && !e.altKey )
+ {
+ // Char 86/118 = V/v
+ if ( e.which == 86 || e.which == 118 )
+ {
+ if ( FCK.Status == FCK_STATUS_COMPLETE )
+ {
+ if ( !FCK.Events.FireEvent( "OnPaste" ) )
+ e.preventDefault() ;
+ }
+ else
+ e.preventDefault() ;
+ }
+ }
+ }
+ this.EditorDocument.addEventListener( 'keydown', oOnKeyDown, true ) ;
+
+ var oOnSelectionChange = function( e )
+ {
+ /*
+ var bIsDifferent = false ;
+ var oActualSel = FCK.EditorWindow.getSelection() ;
+
+ if ( FCK.LastSelection )
+ {
+ if ( FCK.LastSelection.rangeCount != oActualSel.rangeCount )
+ {
+ bIsDifferent = true ;
+ }
+ else
+ {
+ if ( oActualSel.rangeCount == 1 )
+ {
+ var oRangeA = oActualSel.getRangeAt(0) ;
+ var oRangeB = FCK.LastSelection.getRangeAt(0) ;
+
+ FCKDebug.Output( 'collapsed: ' + oRangeA.collapsed ) ;
+ if ( oRangeA.collapsed )
+ {
+ FCKDebug.Output( 'startContainerBranch: ' + oRangeA.startContainerBranch + ' == ' + oRangeB.startContainerBranch ) ;
+ FCKDebug.Output( 'Container: ' + oRangeA.startContainer.childNodes[ oRangeA.startOffset ] + ' == ' + oRangeB.commonAncestorContainer.parent ) ;
+ if
+ (
+ !oRangeB.collapsed ||
+ oRangeA.startContainer.childNodes[ oRangeA.startOffset ] != oRangeB.startContainer.childNodes[ oRangeB.startOffset ] ||
+ oRangeA.commonAncestorContainer.parent != oRangeB.commonAncestorContainer.parent )
+ {
+ bIsDifferent = true ;
+ }
+ }
+ else
+ {
+ bIsDifferent = true ;
+ }
+ }
+ else
+ {
+ bIsDifferent == true ;
+ }
+ }
+ }
+ else
+ {
+ bIsDifferent = true ;
+ }
+
+ FCK.LastSelection = oActualSel ;
+
+ FCKDebug.Output( 'bIsDifferent: ' + bIsDifferent ) ;
+
+ if ( bIsDifferent )
+ {*/
+ FCK.Events.FireEvent( "OnSelectionChange" ) ;
+ //}
+ }
+
+ this.EditorDocument.addEventListener( 'mouseup', oOnSelectionChange, false ) ;
+ this.EditorDocument.addEventListener( 'keyup', oOnSelectionChange, false ) ;
+
+ this.MakeEditable() ;
+
+ this.SetStatus( FCK_STATUS_ACTIVE ) ;
+}
+
+FCK.MakeEditable = function()
+{
+ this.EditorDocument.designMode = 'on' ;
+
+ // Tell Gecko to use or not the <SPAN> tag for the bold, italic and underline.
+ this.EditorDocument.execCommand( 'useCSS', false, !FCKConfig.GeckoUseSPAN ) ;
+}
+
+FCK.Focus = function()
+{
+ try
+ {
+ FCK.EditorWindow.focus() ;
+ }
+ catch(e) {}
+}
+
+FCK.SetHTML = function( html, forceWYSIWYG )
+{
+ if ( forceWYSIWYG || FCK.EditMode == FCK_EDITMODE_WYSIWYG )
+ {
+ // On Gecko we must disable editing before setting the innerHTML.
+// FCK.EditorDocument.designMode = "off" ;
+
+ FCK.EditorDocument.body.innerHTML = html ;
+
+ // On Gecko we must set the desingMode on again after setting the innerHTML.
+// FCK.EditorDocument.designMode = 'on' ;
+
+ // Tell Gecko to use or not the <SPAN> tag for the bold, italic and underline.
+// FCK.EditorDocument.execCommand( "useCSS", false, !FCKConfig.GeckoUseSPAN ) ;
+ }
+ else
+ document.getElementById('eSourceField').value = html ;
+}
+
diff --git a/lib/editor/_source/internals/fck_1_ie.js b/lib/editor/_source/internals/fck_1_ie.js
new file mode 100644
index 0000000..b22728c
--- /dev/null
+++ b/lib/editor/_source/internals/fck_1_ie.js
@@ -0,0 +1,181 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fck_1_ie.js
+ * This is the first part of the "FCK" object creation. This is the main
+ * object that represents an editor instance.
+ * (IE specific implementations)
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-21 23:51:51
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+FCK.Description = "FCKeditor for Internet Explorer 5.5+" ;
+
+FCK.InitializeBehaviors = function()
+{
+ // Set the focus to the editable area when clicking in the document area.
+ // TODO: The cursor must be positioned at the end.
+ this.EditorDocument.onmousedown = this.EditorDocument.onmouseup = function()
+ {
+ FCK.Focus() ;
+
+ FCK.EditorWindow.event.cancelBubble = true ;
+ FCK.EditorWindow.event.returnValue = false ;
+ }
+
+ // Intercept pasting operations
+ this.EditorDocument.body.onpaste = function()
+ {
+ if ( FCK.Status == FCK_STATUS_COMPLETE )
+ return FCK.Events.FireEvent( "OnPaste" ) ;
+ else
+ return false ;
+ }
+
+ // Disable Right-Click and shows the context menu.
+ this.EditorDocument.oncontextmenu = function()
+ {
+ var e = this.parentWindow.event ;
+ FCK.ShowContextMenu( e.screenX, e.screenY ) ;
+ return false ;
+ }
+ // Check if key strokes must be monitored.
+ if ( FCKConfig.UseBROnCarriageReturn || FCKConfig.TabSpaces > 0 )
+ {
+ // Build the "TAB" key replacement.
+ if ( FCKConfig.TabSpaces > 0 )
+ {
+ window.FCKTabHTML = '' ;
+ for ( i = 0 ; i < FCKConfig.TabSpaces ; i++ )
+ window.FCKTabHTML += "&nbsp;" ;
+ }
+
+ this.EditorDocument.onkeydown = function()
+ {
+ var e = FCK.EditorWindow.event ;
+
+ if ( e.keyCode == 13 && FCKConfig.UseBROnCarriageReturn ) // ENTER
+ {
+ if ( (e.ctrlKey || e.altKey || e.shiftKey) )
+ return true ;
+ else
+ {
+ // We must ignore it if we are inside a List.
+ if ( FCK.EditorDocument.queryCommandState( 'InsertOrderedList' ) || FCK.EditorDocument.queryCommandState( 'InsertUnorderedList' ) )
+ return true ;
+
+ // Insert the <BR> (The &nbsp; must be also inserted to make it work)
+ FCK.InsertHtml("<br>&nbsp;") ;
+
+ // Remove the &nbsp;
+ var oRange = FCK.EditorDocument.selection.createRange() ;
+ oRange.moveStart('character',-1) ;
+ oRange.select() ;
+ FCK.EditorDocument.selection.clear() ;
+
+ return false ;
+ }
+ }
+ else if ( e.keyCode == 9 && FCKConfig.TabSpaces > 0 && !(e.ctrlKey || e.altKey || e.shiftKey) ) // TAB
+ {
+ FCK.InsertHtml( window.FCKTabHTML ) ;
+ return false ;
+ }
+
+ return true ;
+ }
+ }
+
+ // Intercept cursor movements
+ this.EditorDocument.onselectionchange = function()
+ {
+ FCK.Events.FireEvent( "OnSelectionChange" ) ;
+ }
+
+ //Enable editing
+ this.EditorDocument.body.contentEditable = true ;
+
+ this.SetStatus( FCK_STATUS_ACTIVE ) ;
+}
+
+FCK.Focus = function()
+{
+ try
+ {
+ if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
+ FCK.EditorDocument.body.focus() ;
+ else
+ document.getElementById('eSource').focus() ;
+ }
+ catch(e) {}
+}
+
+FCK.SetHTML = function( html, forceWYSIWYG )
+{
+ if ( forceWYSIWYG || FCK.EditMode == FCK_EDITMODE_WYSIWYG )
+ {
+ // TODO: Wait stable version and remove the following commented lines.
+ // In IE, if you do document.body.innerHTML = '<p><hr></p>' it throws a "Unknow runtime error".
+ // To solve it we must add a fake (safe) tag before it, and then remove it.
+ // this.EditorDocument.body.innerHTML = '<div id="__fakeFCKRemove__">&nbsp;</div>' + html.replace( FCKRegexLib.AposEntity, '&#39;' ) ;
+ // this.EditorDocument.getElementById('__fakeFCKRemove__').removeNode(true) ;
+
+ this.EditorDocument.body.innerHTML = '' ;
+ if ( html && html.length > 0 )
+ this.EditorDocument.write( html ) ;
+ }
+ else
+ document.getElementById('eSourceField').value = html ;
+}
+
+// TODO: Wait stable version and remove the following commented lines.
+/*
+FCK.CheckRelativeLinks = function()
+{
+ // IE automatically change relative URLs to absolute, so we use a trick
+ // to solve this problem (the document base points to "fckeditor:".
+
+ for ( var i = 0 ; i < this.EditorDocument.links.length ; i++ )
+ {
+ var e = this.EditorDocument.links[i] ;
+
+ if ( e.href.startsWith( FCK.BaseUrl ) )
+ e.href = e.href.remove( 0, FCK.BaseUrl.length ) ;
+ }
+
+ for ( var i = 0 ; i < this.EditorDocument.images.length ; i++ )
+ {
+ var e = this.EditorDocument.images[i] ;
+
+ if ( e.src.startsWith( FCK.BaseUrl ) )
+ e.src = e.src.remove( 0, FCK.BaseUrl.length ) ;
+ }
+}
+*/
+
+FCK.InsertHtml = function( html )
+{
+ FCK.Focus() ;
+
+ // Gets the actual selection.
+ var oSel = FCK.EditorDocument.selection ;
+
+ // Deletes the actual selection contents.
+ if ( oSel.type.toLowerCase() != "none" )
+ oSel.clear() ;
+
+ // Inset the HTML.
+ oSel.createRange().pasteHTML( html ) ;
+}
+
diff --git a/lib/editor/_source/internals/fck_2.js b/lib/editor/_source/internals/fck_2.js
new file mode 100644
index 0000000..a3122ee
--- /dev/null
+++ b/lib/editor/_source/internals/fck_2.js
@@ -0,0 +1,156 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fck_2.js
+ * This is the second part of the "FCK" object creation. This is the main
+ * object that represents an editor instance.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-20 14:04:21
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// This collection is used by the browser specific implementations to tell
+// wich named commands must be handled separately.
+FCK.RedirectNamedCommands = new Object() ;
+
+FCK.ExecuteNamedCommand = function( commandName, commandParameter )
+{
+ if ( FCK.RedirectNamedCommands[ commandName ] != null )
+ FCK.ExecuteRedirectedNamedCommand( commandName, commandParameter ) ;
+ else
+ {
+ FCK.Focus() ;
+ FCK.EditorDocument.execCommand( commandName, false, commandParameter ) ;
+ FCK.Events.FireEvent( 'OnSelectionChange' ) ;
+ }
+}
+
+FCK.GetNamedCommandState = function( commandName )
+{
+ try
+ {
+ if ( !FCK.EditorDocument.queryCommandEnabled( commandName ) )
+ return FCK_TRISTATE_DISABLED ;
+ else
+ return FCK.EditorDocument.queryCommandState( commandName ) ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ;
+ }
+ catch ( e )
+ {
+ return FCK_TRISTATE_OFF ;
+ }
+}
+
+FCK.GetNamedCommandValue = function( commandName )
+{
+ var sValue = '' ;
+ var eState = FCK.GetNamedCommandState( commandName ) ;
+
+ if ( eState == FCK_TRISTATE_DISABLED )
+ return null ;
+
+ try
+ {
+ sValue = this.EditorDocument.queryCommandValue( commandName ) ;
+ }
+ catch(e) {}
+
+ return sValue ? sValue : '' ;
+}
+
+FCK.CleanAndPaste = function( html )
+{
+ // Remove all SPAN tags
+ html = html.replace(/<\/?SPAN[^>]*>/gi, "" );
+ // Remove Class attributes
+ html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
+ // Remove Style attributes
+ html = html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3") ;
+ // Remove Lang attributes
+ html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
+ // Remove XML elements and declarations
+ html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
+ // Remove Tags with XML namespace declarations: <o:p></o:p>
+ html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
+ // Replace the &nbsp;
+ html = html.replace(/&nbsp;/, " " );
+ // Transform <P> to <DIV>
+ var re = new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi") ; // Different because of a IE 5.0 error
+ html = html.replace( re, "<div$2</div>" ) ;
+
+ FCK.InsertHtml( html ) ;
+}
+
+FCK.Preview = function()
+{
+ var oWindow = window.open( '', null, 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes' ) ;
+
+ var sHTML = '<html><head><link href="' + FCKConfig.EditorAreaCSS + '" rel="stylesheet" type="text/css" /></head><body>' + FCK.GetHTML() + '</body></html>' ;
+
+ oWindow.document.write( sHTML );
+ oWindow.document.close();
+
+ // TODO: The CSS of the editor area must be configurable.
+ // oWindow.document.createStyleSheet( config.EditorAreaCSS );
+}
+
+FCK.SwitchEditMode = function()
+{
+ // Check if the actual mode is WYSIWYG.
+ var bWYSIWYG = ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) ;
+
+ // Display/Hide the TRs.
+ document.getElementById('eWysiwyg').style.display = bWYSIWYG ? 'none' : '' ;
+ document.getElementById('eSource').style.display = bWYSIWYG ? '' : 'none' ;
+
+ // Update the HTML in the view output to show.
+ if ( bWYSIWYG )
+ document.getElementById('eSourceField').value = ( FCKConfig.EnableXHTML && FCKConfig.EnableSourceXHTML ? FCK.GetXHTML() : FCK.GetHTML() ) ;
+ else
+ {
+ FCK.SetHTML( FCK.GetHTML(), true ) ;
+
+ // Gecko looses the editing capabilities when hidding the IFRAME, so we must reset it.
+ if ( FCKBrowserInfo.IsGecko )
+ FCK.MakeEditable() ;
+ }
+
+ // Updates the actual mode status.
+ FCK.EditMode = bWYSIWYG ? FCK_EDITMODE_SOURCE : FCK_EDITMODE_WYSIWYG ;
+
+ // Set the Focus.
+ FCK.Focus() ;
+
+ // Update the toolbar.
+ FCKToolbarSet.RefreshItemsState() ;
+}
+
+
+FCK.CreateElement = function( tag )
+{
+ var e = FCK.EditorDocument.createElement( tag ) ;
+ e.setAttribute( '__FCKTempLabel', '1' ) ;
+
+ this.InsertElement( e ) ;
+
+ var aEls = FCK.EditorDocument.getElementsByTagName( tag ) ;
+
+ for ( var i = 0 ; i < aEls.length ; i++ )
+ {
+ if ( aEls[i].attributes['__FCKTempLabel'] )
+ {
+ aEls[i].removeAttribute( '__FCKTempLabel' ) ;
+ return aEls[i] ;
+ }
+ }
+}
+
diff --git a/lib/editor/_source/internals/fck_2_gecko.js b/lib/editor/_source/internals/fck_2_gecko.js
new file mode 100644
index 0000000..408fdd5
--- /dev/null
+++ b/lib/editor/_source/internals/fck_2_gecko.js
@@ -0,0 +1,204 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fck_2_gecko.js
+ * This is the second part of the "FCK" object creation. This is the main
+ * object that represents an editor instance.
+ * (Gecko specific implementations)
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-20 14:04:19
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// GetNamedCommandState overload for Gecko.
+FCK._BaseGetNamedCommandState = FCK.GetNamedCommandState ;
+FCK.GetNamedCommandState = function( commandName )
+{
+ switch ( commandName )
+ {
+ case 'Unlink' :
+ return FCKSelection.HasAncestorNode('A') ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
+ default :
+ return FCK._BaseGetNamedCommandState( commandName ) ;
+ }
+}
+
+// Named commands to be handled by this browsers specific implementation.
+FCK.RedirectNamedCommands =
+{
+ Print : true,
+ Paste : true,
+ Cut : true,
+ Copy : true
+}
+
+// ExecuteNamedCommand overload for Gecko.
+FCK.ExecuteRedirectedNamedCommand = function( commandName, commandParameter )
+{
+ switch ( commandName )
+ {
+ case 'Print' :
+ FCK.EditorWindow.print() ;
+ break ;
+ case 'Paste' :
+ try { if ( FCK.Paste() ) FCK._BaseExecuteNamedCommand( 'Paste' ) ; }
+ catch (e) { alert( FCKLang.PasteErrorPaste ) ; }
+ break ;
+ case 'Cut' :
+ try { FCK._BaseExecuteNamedCommand( 'Cut' ) ; }
+ catch (e) { alert( FCKLang.PasteErrorCut ) ; }
+ break ;
+ case 'Copy' :
+ try { FCK._BaseExecuteNamedCommand( 'Copy' ) ; }
+ catch (e) { alert( FCKLang.PasteErrorCopy ) ; }
+ break ;
+ default :
+ FCK.ExecuteNamedCommand( commandName, commandParameter ) ;
+ }
+}
+
+FCK.AttachToOnSelectionChange = function( functionPointer )
+{
+ this.Events.AttachEvent( 'OnSelectionChange', functionPointer ) ;
+}
+
+FCK.Paste = function()
+{
+ if ( FCKConfig.ForcePasteAsPlainText )
+ {
+ FCK.PasteAsPlainText() ;
+ return false ;
+ }
+ else if ( FCKConfig.AutoDetectPasteFromWord && FCKBrowserInfo.IsIE55OrMore )
+ {
+ var sHTML = FCK.GetClipboardHTML() ;
+ var re = /<\w[^>]* class="?MsoNormal"?/gi ;
+ if ( re.test( sHTML ) )
+ {
+ if ( confirm( FCKLang["PasteWordConfirm"] ) )
+ {
+ FCK.CleanAndPaste( sHTML ) ;
+ return false ;
+ }
+ }
+ }
+ else
+ return true ;
+}
+
+//**
+// FCK.InsertHtml: Inserts HTML at the current cursor location. Deletes the
+// selected content if any.
+FCK.InsertHtml = function( html )
+{
+ // Delete the actual selection.
+ var oSel = FCKSelection.Delete() ;
+
+// var oContainer = oSel.getRangeAt(0).startContainer ;
+// var iOffSet = oSel.getRangeAt(0).startOffset ;
+
+ // Get the first available range.
+ var oRange = oSel.getRangeAt(0) ;
+
+// var oRange = this.EditorDocument.createRange() ;
+// oRange.setStart( oContainer, iOffSet ) ;
+// oRange.setEnd( oContainer, iOffSet ) ;
+
+ // Create a fragment with the input HTML.
+ var oFragment = oRange.createContextualFragment( html ) ;
+
+ // Get the last available node.
+ var oLastNode = oFragment.lastChild ;
+
+ // Insert the fragment in the range.
+ oRange.insertNode(oFragment) ;
+
+ // Set the cursor after the inserted fragment.
+ oRange.setEndAfter( oLastNode ) ;
+ oRange.setStartAfter( oLastNode ) ;
+
+ oSel.removeAllRanges() ;
+ oSel = FCK.EditorWindow.getSelection() ;
+ oSel.addRange( oRange ) ;
+
+ this.Focus() ;
+}
+
+FCK.InsertElement = function( element )
+{
+ // Deletes the actual selection.
+ var oSel = FCKSelection.Delete() ;
+
+ // Gets the first available range.
+ var oRange = oSel.getRangeAt(0) ;
+
+ // Inserts the element in the range.
+ oRange.insertNode( element ) ;
+
+ // Set the cursor after the inserted fragment.
+ oRange.setEndAfter( element ) ;
+ oRange.setStartAfter( element ) ;
+
+ this.Focus() ;
+}
+
+FCK.PasteAsPlainText = function()
+{
+ // TODO: Implement the "Paste as Plain Text" code.
+
+ FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.PasteAsText, 'dialog/fck_paste.html', 400, 330, 'PlainText' ) ;
+
+/*
+ var sText = FCKTools.HTMLEncode( clipboardData.getData("Text") ) ;
+ sText = sText.replace( /\n/g, '<BR>' ) ;
+ this.InsertHtml( sText ) ;
+*/
+}
+
+FCK.PasteFromWord = function()
+{
+ // TODO: Implement the "Paste as Plain Text" code.
+
+ FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.PasteFromWord, 'dialog/fck_paste.html', 400, 330, 'Word' ) ;
+
+// FCK.CleanAndPaste( FCK.GetClipboardHTML() ) ;
+}
+
+FCK.GetClipboardHTML = function()
+{
+ return '' ;
+}
+
+FCK.CreateLink = function( url )
+{
+ FCK.ExecuteNamedCommand( 'Unlink' ) ;
+
+ if ( url.length > 0 )
+ {
+ // Generate a temporary name for the link.
+ var sTempUrl = 'javascript:void(0);/*' + ( new Date().getTime() ) + '*/' ;
+
+ // Use the internal "CreateLink" command to create the link.
+ FCK.ExecuteNamedCommand( 'CreateLink', sTempUrl ) ;
+
+ // Retrieve the just created link using XPath.
+ var oLink = document.evaluate("//a[@href='" + sTempUrl + "']", this.EditorDocument.body, null, 9, null).singleNodeValue ;
+
+ if ( oLink )
+ {
+ oLink.href = url ;
+ return oLink ;
+ }
+ }
+}
+
diff --git a/lib/editor/_source/internals/fck_2_ie.js b/lib/editor/_source/internals/fck_2_ie.js
new file mode 100644
index 0000000..7df7aaf
--- /dev/null
+++ b/lib/editor/_source/internals/fck_2_ie.js
@@ -0,0 +1,152 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fck_2_ie.js
+ * This is the second part of the "FCK" object creation. This is the main
+ * object that represents an editor instance.
+ * (IE specific implementations)
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-20 14:04:16
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+/*
+if ( FCKConfig.UseBROnCarriageReturn )
+{
+ // Named commands to be handled by this browsers specific implementation.
+ FCK.RedirectNamedCommands =
+ {
+ InsertOrderedList : true,
+ InsertUnorderedList : true
+ }
+
+ FCK.ExecuteRedirectedNamedCommand = function( commandName, commandParameter )
+ {
+ if ( commandName == 'InsertOrderedList' || commandName == 'InsertUnorderedList' )
+ {
+ if ( !(FCK.EditorDocument.queryCommandState( 'InsertOrderedList' ) || FCK.EditorDocument.queryCommandState( 'InsertUnorderedList' )) )
+ {
+ }
+ }
+
+ FCK.ExecuteNamedCommand( commandName, commandParameter ) ;
+ }
+}
+*/
+
+FCK.Paste = function()
+{
+ if ( FCKConfig.ForcePasteAsPlainText )
+ {
+ FCK.PasteAsPlainText() ;
+ return false ;
+ }
+ else if ( FCKConfig.AutoDetectPasteFromWord && FCKBrowserInfo.IsIE55OrMore )
+ {
+ var sHTML = FCK.GetClipboardHTML() ;
+ var re = /<\w[^>]* class="?MsoNormal"?/gi ;
+ if ( re.test( sHTML ) )
+ {
+ if ( confirm( FCKLang["PasteWordConfirm"] ) )
+ {
+ FCK.CleanAndPaste( sHTML ) ;
+ return false ;
+ }
+ }
+ }
+ else
+ return true ;
+}
+
+FCK.PasteAsPlainText = function()
+{
+ // Get the data available in the clipboard and encodes it in HTML.
+ var sText = FCKTools.HTMLEncode( clipboardData.getData("Text") ) ;
+
+ // Replace the carriage returns with <BR>
+ sText = sText.replace( /\n/g, '<BR>' ) ;
+
+ // Insert the resulting data in the editor.
+ this.InsertHtml( sText ) ;
+}
+
+FCK.PasteFromWord = function()
+{
+ FCK.CleanAndPaste( FCK.GetClipboardHTML() ) ;
+}
+
+FCK.InsertElement = function( element )
+{
+ FCK.InsertHtml( element.outerHTML ) ;
+}
+
+FCK.GetClipboardHTML = function()
+{
+ var oDiv = document.getElementById( '___FCKHiddenDiv' ) ;
+
+ if ( !oDiv )
+ {
+ var oDiv = document.createElement( 'DIV' ) ;
+ oDiv.id = '___FCKHiddenDiv' ;
+ oDiv.style.visibility = 'hidden' ;
+ oDiv.style.overflow = 'hidden' ;
+ oDiv.style.position = 'absolute' ;
+ oDiv.style.width = 1 ;
+ oDiv.style.height = 1 ;
+
+ document.body.appendChild( oDiv ) ;
+ }
+
+ oDiv.innerHTML = '' ;
+
+ var oTextRange = document.body.createTextRange() ;
+ oTextRange.moveToElementText( oDiv ) ;
+ oTextRange.execCommand( 'Paste' ) ;
+
+ var sData = oDiv.innerHTML ;
+ oDiv.innerHTML = '' ;
+
+ return sData ;
+}
+
+FCK.AttachToOnSelectionChange = function( functionPointer )
+{
+ FCK.EditorDocument.attachEvent( 'onselectionchange', functionPointer ) ;
+}
+
+FCK.CreateLink = function( url )
+{
+ FCK.ExecuteNamedCommand( 'Unlink' ) ;
+
+ if ( url.length > 0 )
+ {
+ // Generate a temporary name for the link.
+ var sTempUrl = 'javascript:void(0);/*' + ( new Date().getTime() ) + '*/' ;
+
+ // Use the internal "CreateLink" command to create the link.
+ FCK.ExecuteNamedCommand( 'CreateLink', sTempUrl ) ;
+
+ // Loof for the just create link.
+ var oLinks = this.EditorDocument.links ;
+
+ for ( i = 0 ; i < oLinks.length ; i++ )
+ {
+ if ( oLinks[i].href == sTempUrl )
+ {
+ oLinks[i].href = url ;
+ return oLinks[i] ;
+ }
+ }
+ }
+}
+
diff --git a/lib/editor/_source/internals/fck_last.js b/lib/editor/_source/internals/fck_last.js
new file mode 100644
index 0000000..cbd179f
--- /dev/null
+++ b/lib/editor/_source/internals/fck_last.js
@@ -0,0 +1,56 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fck_last.js
+ * These are the last script lines executed in the editor loading process.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-04 16:53:16
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// This is the last file loaded to complete the editor initialization and activation
+
+// Just check if the document direction has been correctly applied (at fck_onload.js).
+if ( FCKLang && window.document.dir.toLowerCase() != FCKLang.Dir.toLowerCase() )
+ window.document.dir = FCKLang.Dir ;
+
+// Activate pasting operations.
+if ( FCKConfig.ForcePasteAsPlainText )
+ FCK.Events.AttachEvent( "OnPaste", FCK.Paste ) ;
+
+// Load Plugins.
+if ( FCKPlugins.Items.length > 0 )
+{
+ FCKScriptLoader.OnEmpty = CompleteLoading ;
+ FCKPlugins.Load() ;
+}
+else
+ CompleteLoading() ;
+
+function CompleteLoading()
+{
+ // Load the Toolbar
+ FCKToolbarSet.Name = FCKURLParams['Toolbar'] || 'Default' ;
+ FCKToolbarSet.Load( FCKToolbarSet.Name ) ;
+ FCKToolbarSet.Restart() ;
+
+ FCK.AttachToOnSelectionChange( FCKToolbarSet.RefreshItemsState ) ;
+ //FCK.AttachToOnSelectionChange( FCKSelection._Reset ) ;
+
+ FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
+
+ // Call the special "FCKeditor_OnComplete" function that should be present in
+ // the HTML page where the editor is located.
+ if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
+ window.parent.FCKeditor_OnComplete( FCK ) ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fck_onload.js b/lib/editor/_source/internals/fck_onload.js
new file mode 100644
index 0000000..4e13f59
--- /dev/null
+++ b/lib/editor/_source/internals/fck_onload.js
@@ -0,0 +1,109 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fck_onload.js
+ * This is the script that is called when the editor page is loaded inside
+ * its IFRAME. It's the editor startup.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-30 11:38:24
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// Disable the context menu in the editor (areas outside the editor area).
+window.document.oncontextmenu = function( e )
+{
+ if ( e )
+ e.preventDefault() ; // This is the Gecko way to do that.
+ return false ; // This is the IE way to do that.
+}
+
+// Gecko browsers doens't calculate well that IFRAME size so we must
+// recalculate it every time the window size changes.
+if ( ! FCKBrowserInfo.IsIE )
+{
+ window.onresize = function()
+ {
+ var oFrame = document.getElementById('eEditorArea') ;
+ oFrame.height = 0 ;
+
+ var oCell = document.getElementById( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? 'eWysiwygCell' : 'eSource' ) ;
+ var iHeight = oCell.offsetHeight ;
+
+ oFrame.height = iHeight - 2 ;
+ }
+}
+
+// Start the editor as soon as the window is loaded.
+window.onload = function()
+{
+ // There is a bug on Netscape when rendering the frame. It goes over the
+ // right border. So we must correct it.
+ if ( FCKBrowserInfo.IsNetscape )
+ document.getElementById('eWysiwygCell').style.paddingRight = '2px' ;
+
+ FCKScriptLoader.OnEmpty = function()
+ {
+ FCKScriptLoader.OnEmpty = null ;
+
+ // Override the configurations passed throw the hidden field.
+ FCKConfig.LoadHiddenField() ;
+
+ // Load the custom configurations file (if defined).
+ if ( FCKConfig.CustomConfigurationsPath.length > 0 )
+ FCKScriptLoader.AddScript( FCKConfig.CustomConfigurationsPath ) ;
+
+ // Load the styles for the configured skin.
+ LoadStyles() ;
+ }
+
+ // First of all load the configuration file.
+ FCKScriptLoader.AddScript( '../fckconfig.js' ) ;
+}
+
+function LoadStyles()
+{
+ FCKScriptLoader.OnEmpty = LoadScripts ;
+
+ // Load the active skin CSS.
+ FCKScriptLoader.AddScript( FCKConfig.SkinPath + 'fck_editor.css' ) ;
+ FCKScriptLoader.AddScript( FCKConfig.SkinPath + 'fck_contextmenu.css' ) ;
+}
+
+function LoadScripts()
+{
+ FCKScriptLoader.OnEmpty = null ;
+
+
+ if ( FCKBrowserInfo.IsIE )
+ FCKScriptLoader.AddScript( 'js/fckeditorcode_ie_1.js' ) ;
+ else
+ FCKScriptLoader.AddScript( 'js/fckeditorcode_gecko_1.js' ) ;
+}
+
+function LoadLanguageFile()
+{
+ FCKScriptLoader.OnEmpty = function()
+ {
+ // Removes the OnEmpty listener.
+ FCKScriptLoader.OnEmpty = null ;
+
+ // Correct the editor layout to the correct language direction.
+ if ( FCKLang )
+ window.document.dir = FCKLang.Dir ;
+
+ // Starts the editor.
+ FCK.StartEditor() ;
+ }
+
+ FCKScriptLoader.AddScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckbrowserinfo.js b/lib/editor/_source/internals/fckbrowserinfo.js
new file mode 100644
index 0000000..fb2b441
--- /dev/null
+++ b/lib/editor/_source/internals/fckbrowserinfo.js
@@ -0,0 +1,41 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckbrowserinfo.js
+ * Defines the FCKBrowserInfo object that hold some browser informations.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-26 01:20:34
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKBrowserInfo = new Object() ;
+
+var sAgent = navigator.userAgent.toLowerCase() ;
+
+FCKBrowserInfo.IsIE = sAgent.indexOf("msie") != -1 ;
+FCKBrowserInfo.IsGecko = !FCKBrowserInfo.IsIE ;
+FCKBrowserInfo.IsNetscape = sAgent.indexOf("netscape") != -1 ;
+
+if ( FCKBrowserInfo.IsIE )
+{
+ FCKBrowserInfo.MajorVer = navigator.appVersion.match(/MSIE (.)/)[1] ;
+ FCKBrowserInfo.MinorVer = navigator.appVersion.match(/MSIE .\.(.)/)[1] ;
+}
+else
+{
+ // TODO: Other browsers
+ FCKBrowserInfo.MajorVer = 0 ;
+ FCKBrowserInfo.MinorVer = 0 ;
+}
+
+FCKBrowserInfo.IsIE55OrMore = FCKBrowserInfo.IsIE && ( FCKBrowserInfo.MajorVer > 5 || FCKBrowserInfo.MinorVer >= 5 ) ; \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckcommands.js b/lib/editor/_source/internals/fckcommands.js
new file mode 100644
index 0000000..ef7c9f6
--- /dev/null
+++ b/lib/editor/_source/internals/fckcommands.js
@@ -0,0 +1,95 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckcommands.js
+ * Define all commands available in the editor.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-19 22:51:46
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKCommands = FCK.Commands = new Object() ;
+FCKCommands.LoadedCommands = new Object() ;
+
+FCKCommands.RegisterCommand = function( commandName, command )
+{
+ this.LoadedCommands[ commandName ] = command ;
+}
+
+FCKCommands.GetCommand = function( commandName )
+{
+ var oCommand = FCKCommands.LoadedCommands[ commandName ] ;
+
+ if ( oCommand )
+ return oCommand ;
+
+ switch ( commandName )
+ {
+ case 'Link' : oCommand = new FCKDialogCommand( 'Link' , FCKLang.DlgLnkWindowTitle , 'dialog/fck_link.html' , 400, 330, FCK.GetNamedCommandState, 'CreateLink' ) ; break ;
+ case 'About' : oCommand = new FCKDialogCommand( 'About' , FCKLang.About , 'dialog/fck_about.html' , 400, 330 ) ; break ;
+
+ case 'Find' : oCommand = new FCKDialogCommand( 'Find' , FCKLang.DlgFindTitle , 'dialog/fck_find.html' , 340, 170 ) ; break ;
+ case 'Replace' : oCommand = new FCKDialogCommand( 'Replace' , FCKLang.DlgReplaceTitle , 'dialog/fck_replace.html' , 340, 200 ) ; break ;
+
+ case 'Image' : oCommand = new FCKDialogCommand( 'Image' , FCKLang.DlgImgTitle , 'dialog/fck_image.html' , 450, 400, FCK.GetNamedCommandState, 'InsertImage' ) ; break ;
+ case 'SpecialChar' : oCommand = new FCKDialogCommand( 'SpecialChar', FCKLang.DlgSpecialCharTitle , 'dialog/fck_specialchar.html' , 400, 300, FCK.GetNamedCommandState, 'InsertImage' ) ; break ;
+ case 'Smiley' : oCommand = new FCKDialogCommand( 'Smiley' , FCKLang.DlgSmileyTitle , 'dialog/fck_smiley.html' , FCKConfig.SmileyWindowWidth, FCKConfig.SmileyWindowHeight, FCK.GetNamedCommandState, 'InsertImage' ) ; break ;
+ case 'Table' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html' , 400, 250 ) ; break ;
+ case 'TableProp' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html?Parent', 400, 250 ) ; break ;
+ case 'TableCellProp': oCommand = new FCKDialogCommand( 'TableCell' , FCKLang.DlgCellTitle , 'dialog/fck_tablecell.html' , 500, 250 ) ; break ;
+
+ case 'Style' : oCommand = new FCKStyleCommand() ; break ;
+
+ case 'FontName' : oCommand = new FCKFontNameCommand() ; break ;
+ case 'FontSize' : oCommand = new FCKFontSizeCommand() ; break ;
+ case 'FontFormat' : oCommand = new FCKFormatBlockCommand() ; break ;
+
+ case 'Source' : oCommand = new FCKSourceCommand() ; break ;
+ case 'Preview' : oCommand = new FCKPreviewCommand() ; break ;
+ case 'Save' : oCommand = new FCKSaveCommand() ; break ;
+ case 'NewPage' : oCommand = new FCKNewPageCommand() ; break ;
+
+ case 'TextColor' : oCommand = new FCKTextColorCommand('ForeColor') ; break ;
+ case 'BGColor' : oCommand = new FCKTextColorCommand('BackColor') ; break ;
+
+ case 'PasteText' : oCommand = new FCKPastePlainTextCommand() ; break ;
+ case 'PasteWord' : oCommand = new FCKPasteWordCommand() ; break ;
+
+ case 'TableInsertRow' : oCommand = new FCKTableCommand('TableInsertRow') ; break ;
+ case 'TableDeleteRows' : oCommand = new FCKTableCommand('TableDeleteRows') ; break ;
+ case 'TableInsertColumn' : oCommand = new FCKTableCommand('TableInsertColumn') ; break ;
+ case 'TableDeleteColumns' : oCommand = new FCKTableCommand('TableDeleteColumns') ; break ;
+ case 'TableInsertCell' : oCommand = new FCKTableCommand('TableInsertCell') ; break ;
+ case 'TableDeleteCells' : oCommand = new FCKTableCommand('TableDeleteCells') ; break ;
+ case 'TableMergeCells' : oCommand = new FCKTableCommand('TableMergeCells') ; break ;
+ case 'TableSplitCell' : oCommand = new FCKTableCommand('TableSplitCell') ; break ;
+
+ // Generic Undefined command (usually used when a command is under development).
+ case 'Undefined' : oCommand = new FCKUndefinedCommand() ; break ;
+
+ // By default we assume that it is a named command.
+ default:
+ if ( FCKRegexLib.NamedCommands.test( commandName ) )
+ oCommand = new FCKNamedCommand( commandName ) ;
+ else
+ {
+ alert( FCKLang.UnknownCommand.replace( /%1/g, commandName ) ) ;
+ return ;
+ }
+ }
+
+ FCKCommands.LoadedCommands[ commandName ] = oCommand ;
+
+ return oCommand ;
+}
+
diff --git a/lib/editor/_source/internals/fckconfig.js b/lib/editor/_source/internals/fckconfig.js
new file mode 100644
index 0000000..a103fe7
--- /dev/null
+++ b/lib/editor/_source/internals/fckconfig.js
@@ -0,0 +1,75 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckconfig.js
+ * Creates and initializes the FCKConfig object.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-16 15:56:53
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKConfig = FCK.Config = new Object() ;
+
+// Editor Base Path
+if ( document.location.protocol == 'file:' )
+{
+ FCKConfig.BasePath = document.location.pathname.substr(1) ;
+ FCKConfig.BasePath = FCKConfig.BasePath.replace( /\\/gi, '/' ) ;
+ FCKConfig.BasePath = 'file://' + FCKConfig.BasePath.substring(0,FCKConfig.BasePath.lastIndexOf('/')+1) ;
+}
+else
+ FCKConfig.BasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')+1) ;
+
+// Override the actual configuration values with the values passed throw the
+// hidden field "<InstanceName>___Config".
+FCKConfig.LoadHiddenField = function()
+{
+ // Get the hidden field.
+ var oConfigField = window.parent.document.getElementById( FCK.Name + '___Config' ) ;
+
+ // Do nothing if the config field was not defined.
+ if ( ! oConfigField ) return ;
+
+ var aCouples = oConfigField.value.split('&') ;
+
+ for ( var i = 0 ; i < aCouples.length ; i++ )
+ {
+ if ( aCouples[i].length == 0 )
+ continue ;
+
+ var aConfig = aCouples[i].split('=') ;
+ var sConfigName = aConfig[0] ;
+ var sConfigValue = aConfig[1] ;
+
+ if ( sConfigValue.toLowerCase() == "true" ) // If it is a boolean TRUE.
+ FCKConfig[sConfigName] = true ;
+ else if ( sConfigValue.toLowerCase() == "false" ) // If it is a boolean FALSE.
+ FCKConfig[sConfigName] = false ;
+ else if ( ! isNaN(sConfigValue) ) // If it is a number.
+ FCKConfig[sConfigName] = parseInt( sConfigValue ) ;
+ else // In any other case it is a string.
+ FCKConfig[sConfigName] = sConfigValue ;
+ }
+}
+
+// Define toolbar sets collection.
+FCKConfig.ToolbarSets = new Object() ;
+
+// Defines the plugins collection.
+FCKConfig.Plugins = new Object() ;
+FCKConfig.Plugins.Items = new Array() ;
+
+FCKConfig.Plugins.Add = function( name, langs )
+{
+ FCKConfig.Plugins.Items.addItem( [name, langs] ) ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckcontextmenu.js b/lib/editor/_source/internals/fckcontextmenu.js
new file mode 100644
index 0000000..377765c
--- /dev/null
+++ b/lib/editor/_source/internals/fckcontextmenu.js
@@ -0,0 +1,192 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckcontextmenu.js
+ * Defines the FCKContextMenu object that is responsible for all
+ * Context Menu operations.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-20 00:19:50
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKContextMenu = new Object() ;
+
+// This property is internally used to indicate that the context menu has been created.
+FCKContextMenu._IsLoaded = false ;
+
+// This method creates the context menu inside a DIV tag. Take a look at the end of this file for a sample output.
+FCKContextMenu.Reload = function()
+{
+ // Create the Main DIV that holds the Context Menu.
+ this._Div = this._Document.createElement( 'DIV' ) ;
+ this._Div.className = 'CM_ContextMenu' ;
+ this._Div.style.position = 'absolute' ;
+ this._Div.style.visibility = 'hidden' ;
+ this._Document.body.appendChild( this._Div );
+
+ // Create the main table for the menu items.
+ var oTable = this._Document.createElement( 'TABLE' ) ;
+ oTable.cellSpacing = 0 ;
+ oTable.cellPadding = 0 ;
+ oTable.border = 0 ;
+ this._Div.appendChild( oTable ) ;
+
+ // Create arrays with all Items to add.
+
+ this.Groups = new Object() ;
+
+ // Generic items that are always available.
+ this.Groups['Generic'] = new FCKContextMenuGroup() ;
+ with ( this.Groups['Generic'] )
+ {
+ Add( new FCKContextMenuItem( this, 'Cut' , FCKLang.Cut , true ) ) ;
+ Add( new FCKContextMenuItem( this, 'Copy' , FCKLang.Copy , true ) ) ;
+ Add( new FCKContextMenuItem( this, 'Paste' , FCKLang.Paste , true ) ) ;
+ }
+
+ // Link operations.
+ this.Groups['Link'] = new FCKContextMenuGroup() ;
+ with ( this.Groups['Link'] )
+ {
+ Add( new FCKContextMenuSeparator() ) ;
+ Add( new FCKContextMenuItem( this, 'Link' , FCKLang.EditLink , true ) ) ;
+ Add( new FCKContextMenuItem( this, 'Unlink' , FCKLang.RemoveLink, true ) ) ;
+ }
+
+ // Table Cell operations.
+ this.Groups['TableCell'] = new FCKContextMenuGroup() ;
+ with ( this.Groups['TableCell'] )
+ {
+ Add( new FCKContextMenuSeparator() ) ;
+ Add( new FCKContextMenuItem( this, 'TableInsertRow' , FCKLang.InsertRow, true ) ) ;
+ Add( new FCKContextMenuItem( this, 'TableDeleteRows' , FCKLang.DeleteRows, true ) ) ;
+ Add( new FCKContextMenuSeparator() ) ;
+ Add( new FCKContextMenuItem( this, 'TableInsertColumn' , FCKLang.InsertColumn, true ) ) ;
+ Add( new FCKContextMenuItem( this, 'TableDeleteColumns' , FCKLang.DeleteColumns, true ) ) ;
+ Add( new FCKContextMenuSeparator() ) ;
+ Add( new FCKContextMenuItem( this, 'TableInsertCell' , FCKLang.InsertCell, true ) ) ;
+ Add( new FCKContextMenuItem( this, 'TableDeleteCells' , FCKLang.DeleteCells, true ) ) ;
+ Add( new FCKContextMenuItem( this, 'TableMergeCells' , FCKLang.MergeCells, true ) ) ;
+ Add( new FCKContextMenuItem( this, 'TableSplitCell' , FCKLang.SplitCell, true ) ) ;
+ Add( new FCKContextMenuSeparator() ) ;
+ Add( new FCKContextMenuItem( this, 'TableCellProp' , FCKLang.CellProperties, true ) ) ;
+ Add( new FCKContextMenuItem( this, 'TableProp' , FCKLang.TableProperties, true ) ) ;
+ }
+
+ // Table operations.
+ this.Groups['Table'] = new FCKContextMenuGroup() ;
+ with ( this.Groups['Table'] )
+ {
+ Add( new FCKContextMenuSeparator() ) ;
+ Add( new FCKContextMenuItem( this, 'Table', FCKLang.TableProperties, true ) ) ;
+ }
+
+ // Image operations.
+ this.Groups['Image'] = new FCKContextMenuGroup() ;
+ with ( this.Groups['Image'] )
+ {
+ Add( new FCKContextMenuSeparator() ) ;
+ Add( new FCKContextMenuItem( this, 'Image', FCKLang.ImageProperties, true ) ) ;
+ }
+
+ // Select field operations.
+ this.Groups['Select'] = new FCKContextMenuGroup() ;
+ with ( this.Groups['Select'] )
+ {
+ Add( new FCKContextMenuSeparator() ) ;
+ Add( new FCKContextMenuItem( this, 'Undefined', "Selection Field Properties" ) ) ;
+ }
+
+ // Textarea operations.
+ this.Groups['Textarea'] = new FCKContextMenuGroup() ;
+ with ( this.Groups['Textarea'] )
+ {
+ Add( new FCKContextMenuSeparator() ) ;
+ Add( new FCKContextMenuItem( this, 'Undefined', "Textarea Properties" ) ) ;
+ }
+
+ // Create all table rows (representing the items) in the context menu.
+ for ( var o in this.Groups )
+ {
+ this.Groups[o].CreateTableRows( oTable ) ;
+ }
+
+ this._IsLoaded = true ;
+}
+
+FCKContextMenu.RefreshState = function()
+{
+ // Get the actual selected tag (if any).
+ var oTag = FCKSelection.GetSelectedElement() ;
+ var sTagName ;
+
+ if ( oTag )
+ {
+ sTagName = oTag.tagName ;
+ }
+
+ // Set items visibility.
+ this.Groups['Link'].SetVisible( FCK.GetNamedCommandState( 'Unlink' ) != FCK_TRISTATE_DISABLED ) ;
+ this.Groups['TableCell'].SetVisible( sTagName != 'TABLE' && FCKSelection.HasAncestorNode('TABLE') ) ;
+ this.Groups['Table'].SetVisible( sTagName == 'TABLE' ) ;
+ this.Groups['Image'].SetVisible( sTagName == 'IMG' ) ;
+ this.Groups['Select'].SetVisible( sTagName == 'SELECT' ) ;
+ this.Groups['Textarea'].SetVisible( sTagName == 'TEXTAREA' ) ;
+
+ // Refresh the state of all visible items (active/disactive)
+ for ( var o in this.Groups )
+ {
+ this.Groups[o].RefreshState() ;
+ }
+}
+
+/*
+Sample Context Menu Output
+-----------------------------------------
+<div class="CM_ContextMenu">
+ <table cellSpacing="0" cellPadding="0" border="0">
+ <tr class="CM_Disabled">
+ <td class="CM_Icon"><img alt="" src="icons/button.cut.gif" width="21" height="20" unselectable="on"></td>
+ <td class="CM_Label" unselectable="on">Cut</td>
+ </tr>
+ <tr class="CM_Disabled">
+ <td class="CM_Icon"><img height="20" alt="" src="icons/button.copy.gif" width="21"></td>
+ <td class="CM_Label">Copy</td>
+ </tr>
+ <tr class="CM_Option" onmouseover="OnOver(this);" onmouseout="OnOut(this);">
+ <td class="CM_Icon"><img height="20" alt="" src="icons/button.paste.gif" width="21"></td>
+ <td class="CM_Label">Paste</td>
+ </tr>
+ <tr class="CM_Separator">
+ <td class="CM_Icon"></td>
+ <td class="CM_Label"><div></div></td>
+ </tr>
+ <tr class="CM_Option" onmouseover="OnOver(this);" onmouseout="OnOut(this);">
+ <td class="CM_Icon"><img height="20" alt="" src="icons/button.print.gif" width="21"></td>
+ <td class="CM_Label">Print</td>
+ </tr>
+ <tr class="CM_Separator">
+ <td class="CM_Icon"></td>
+ <td class="CM_Label"><div></div></td>
+ </tr>
+ <tr class="CM_Option" onmouseover="OnOver(this);" onmouseout="OnOut(this);">
+ <td class="CM_Icon"></td>
+ <td class="CM_Label">Do Something</td>
+ </tr>
+ <tr class="CM_Option" onmouseover="OnOver(this);" onmouseout="OnOut(this);">
+ <td class="CM_Icon"></td>
+ <td class="CM_Label">Just Testing</td>
+ </tr>
+ </table>
+</div>
+*/ \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckcontextmenu_gecko.js b/lib/editor/_source/internals/fckcontextmenu_gecko.js
new file mode 100644
index 0000000..fd1d6c8
--- /dev/null
+++ b/lib/editor/_source/internals/fckcontextmenu_gecko.js
@@ -0,0 +1,91 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckcontextmenu_gecko.js
+ * Context Menu operations. (Gecko specific implementations)
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-08-27 16:58:07
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// The Context Menu CSS must be added to the parent document.
+FCKTools.AppendStyleSheet( window.parent.document, FCKConfig.SkinPath + 'fck_contextmenu.css' ) ;
+
+FCKContextMenu.Show = function( x, y )
+{
+ if ( ! this._Document )
+ {
+ this._Document = window.parent.document ;
+ }
+
+ // Create the context menu if needed.
+ if ( !this._IsLoaded )
+ {
+ this.Reload() ;
+ this._Div.style.zIndex = 10000 ;
+ this._Div.oncontextmenu = function() { return false ; }
+ }
+
+ this.RefreshState() ;
+
+ // Get the editor area and editor frames positions.
+ var oCoordsA = FCKTools.GetElementPosition( FCK.EditorWindow.frameElement ) ;
+ var oCoordsB = FCKTools.GetElementPosition( window.frameElement ) ;
+
+ x += oCoordsA.X + oCoordsB.X ;
+ y += oCoordsA.Y + oCoordsB.Y ;
+
+ // Verifies if the context menu is completely visible.
+ var iXSpace = x + this._Div.offsetWidth - this._Div.ownerDocument.defaultView.innerWidth ;
+ var iYSpace = y + this._Div.offsetHeight - this._Div.ownerDocument.defaultView.innerHeight ;
+
+ if ( iXSpace > 0 ) x -= this._Div.offsetWidth ;
+ if ( iYSpace > 0 ) y -= this._Div.offsetHeight ;
+
+ // Set the context menu DIV in the specified location.
+ this._Div.style.left = x + 'px' ;
+ this._Div.style.top = y + 'px' ;
+
+ // Watch the "OnClick" event for all windows to close the Context Menu.
+ var oActualWindow = FCK.EditorWindow ;
+ while ( oActualWindow )
+ {
+ oActualWindow.document.addEventListener( 'click', FCKContextMenu._OnDocumentClick, false ) ;
+ if ( oActualWindow != oActualWindow.parent )
+ oActualWindow = oActualWindow.parent ;
+ else if ( oActualWindow.opener == null )
+ oActualWindow = oActualWindow.opener ;
+ else
+ break ;
+ }
+
+ // Show it.
+ this._Div.style.visibility = '' ;
+}
+
+FCKContextMenu._OnDocumentClick = function( event )
+{
+ var e = event.target ;
+ while ( e )
+ {
+ if ( e == FCKContextMenu._Div ) return ;
+ e = e.parentNode ;
+ }
+ FCKContextMenu.Hide() ;
+}
+
+FCKContextMenu.Hide = function()
+{
+ this._Div.style.visibility = 'hidden' ;
+ this._Div.style.left = this._Div.style.top = '1px' ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckcontextmenu_ie.js b/lib/editor/_source/internals/fckcontextmenu_ie.js
new file mode 100644
index 0000000..31354e6
--- /dev/null
+++ b/lib/editor/_source/internals/fckcontextmenu_ie.js
@@ -0,0 +1,68 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckcontextmenu_ie.js
+ * Context Menu operations. (IE specific implementations)
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-08-20 22:58:12
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+FCKContextMenu.Show = function( x, y )
+{
+ // Create the Popup used to show the menu (this is a IE 5.5+ feature).
+ if ( ! this._Popup )
+ {
+ this._Popup = window.createPopup() ;
+ this._Document = this._Popup.document ;
+ this._Document.createStyleSheet( FCKConfig.SkinPath + 'fck_contextmenu.css' ) ;
+ this._Document.oncontextmenu = function() { return false ; }
+ }
+
+ // Create the context menu if needed.
+ if ( !this._IsLoaded )
+ {
+ this.Reload() ;
+ this._Div.style.visibility = '' ;
+ }
+
+ this.RefreshState() ;
+
+ // IE doens't get the offsetWidth and offsetHeight values if the element is not visible.
+ // So the Popup must be "shown" with no size to be able to get these values.
+ this._Popup.show( x, y, 0, 0 ) ;
+
+ // This was the previous solution. It works well to.
+ // So a temporary element is created to get this for us.
+ /*
+ if ( !this._DivCopy )
+ {
+ this._DivCopy = document.createElement( 'DIV' ) ;
+ this._DivCopy.className = 'CM_ContextMenu' ;
+ this._DivCopy.style.position = 'absolute' ;
+ this._DivCopy.style.visibility = 'hidden' ;
+ document.body.appendChild( this._DivCopy );
+ }
+
+ this._DivCopy.innerHTML = this._Div.innerHTML ;
+ */
+
+ // Show the Popup at the specified location.
+ this._Popup.show( x, y, this._Div.offsetWidth, this._Div.offsetHeight ) ;
+}
+
+FCKContextMenu.Hide = function()
+{
+ if ( this._Popup )
+ this._Popup.hide() ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckcoreextensions.js b/lib/editor/_source/internals/fckcoreextensions.js
new file mode 100644
index 0000000..0ba8be1
--- /dev/null
+++ b/lib/editor/_source/internals/fckcoreextensions.js
@@ -0,0 +1,70 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckcoreextensions.js
+ * Some extensions to the Javascript Core.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-12 17:21:06
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// Extends the Array object, creating a "addItem" method on it.
+Array.prototype.addItem = function( item )
+{
+ this[ this.length ] = item ;
+}
+
+Array.prototype.indexOf = function( value )
+{
+ for ( var i = 0 ; i < this.length ; i++ )
+ {
+ if ( this[i] == value )
+ return i ;
+ }
+ return -1 ;
+}
+
+String.prototype.startsWith = function( value )
+{
+ return ( this.substr( 0, value.length ) == value ) ;
+}
+
+// Extends the String object, creating a "endsWith" method on it.
+String.prototype.endsWith = function( value )
+{
+ var L1 = this.length ;
+ var L2 = value.length ;
+
+ if ( L2 > L1 )
+ return false ;
+
+ return ( L2 == 0 || this.substr( L1 - L2, L2 ) == value ) ;
+}
+
+String.prototype.remove = function( start, length )
+{
+ var s = '' ;
+
+ if ( start > 0 )
+ s = this.substring( 0, start ) ;
+
+ if ( start + length < this.length )
+ s += this.substring( start + length , this.length ) ;
+
+ return s ;
+}
+
+String.prototype.trim = function()
+{
+ return this.replace( /(^\s*)|(\s*$)/g, '' ) ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckdebug.js b/lib/editor/_source/internals/fckdebug.js
new file mode 100644
index 0000000..28a1a35
--- /dev/null
+++ b/lib/editor/_source/internals/fckdebug.js
@@ -0,0 +1,41 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckdebug.js
+ * Debug window control and operations.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-08 18:34:12
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKDebug = new Object() ;
+
+if ( FCKConfig.Debug )
+{
+ FCKDebug.Output = function( message, color )
+ {
+ if ( ! FCKConfig.Debug ) return ;
+
+ if ( message != null && isNaN( message ) )
+ message = message.replace(/</g, "&lt;") ;
+
+ if ( !this.DebugWindow || this.DebugWindow.closed )
+ this.DebugWindow = window.open( 'fckdebug.html', 'FCKeditorDebug', 'menubar=no,scrollbars=no,resizable=yes,location=no,toolbar=no,width=600,height=500', true ) ;
+
+ if ( this.DebugWindow.Output)
+ this.DebugWindow.Output( message, color ) ;
+ }
+}
+else
+ FCKDebug.Output = function() {}
+
diff --git a/lib/editor/_source/internals/fckdialog.js b/lib/editor/_source/internals/fckdialog.js
new file mode 100644
index 0000000..cfc5853
--- /dev/null
+++ b/lib/editor/_source/internals/fckdialog.js
@@ -0,0 +1,36 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckdialog.js
+ * Dialog windows operations.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-19 23:28:55
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKDialog = new Object() ;
+
+// This method opens a dialog window using the standard dialog template.
+FCKDialog.OpenDialog = function( dialogName, dialogTitle, dialogPage, width, height, customValue, parentWindow )
+{
+ // Setup the dialog info.
+ var oDialogInfo = new Object() ;
+ oDialogInfo.Title = dialogTitle ;
+ oDialogInfo.Page = dialogPage ;
+ oDialogInfo.Editor = window ;
+ oDialogInfo.CustomValue = customValue ; // Optional
+
+ var sUrl = FCKConfig.BasePath + 'fckdialog.html' ;
+ this.Show( oDialogInfo, dialogName, sUrl, width, height, parentWindow ) ;
+}
+
diff --git a/lib/editor/_source/internals/fckdialog_gecko.js b/lib/editor/_source/internals/fckdialog_gecko.js
new file mode 100644
index 0000000..9b358cc
--- /dev/null
+++ b/lib/editor/_source/internals/fckdialog_gecko.js
@@ -0,0 +1,73 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckdialog_gecko.js
+ * Dialog windows operations. (Gecko specific implementations)
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-20 00:48:06
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+FCKDialog.Show = function( dialogInfo, dialogName, pageUrl, dialogWidth, dialogHeight, parentWindow )
+{
+ var iTop = (screen.height - dialogHeight) / 2 ;
+ var iLeft = (screen.width - dialogWidth) / 2 ;
+
+ var sOption = "location=no,menubar=no,resizable=no,toolbar=no,dependent=yes,dialog=yes,minimizable=no,modal=yes,alwaysRaised=yes" +
+ ",width=" + dialogWidth +
+ ",height=" + dialogHeight +
+ ",top=" + iTop +
+ ",left=" + iLeft ;
+
+ if ( !parentWindow )
+ parentWindow = window ;
+
+ var oWindow = parentWindow.open( '', 'FCKEditorDialog_' + dialogName, sOption, true ) ;
+ oWindow.moveTo( iLeft, iTop ) ;
+ oWindow.resizeTo( dialogWidth, dialogHeight ) ;
+ oWindow.focus() ;
+ oWindow.location.href = pageUrl ;
+
+ oWindow.dialogArguments = dialogInfo ;
+
+ // On some Gecko browsers (probably over slow connections) the
+ // "dialogArguments" are not set to the target window so we must
+ // put it in the opener window so it can be used by the target one.
+ parentWindow.FCKLastDialogInfo = dialogInfo ;
+
+ this.Window = oWindow ;
+
+ window.top.captureEvents( Event.CLICK | Event.MOUSEDOWN | Event.MOUSEUP | Event.FOCUS ) ;
+ window.top.parent.addEventListener( 'mousedown', this.CheckFocus, true ) ;
+ window.top.parent.addEventListener( 'mouseup', this.CheckFocus, true ) ;
+ window.top.parent.addEventListener( 'click', this.CheckFocus, true ) ;
+ window.top.parent.addEventListener( 'focus', this.CheckFocus, true ) ;
+}
+
+FCKDialog.CheckFocus = function()
+{
+ if ( FCKDialog.Window && !FCKDialog.Window.closed )
+ {
+ FCKDialog.Window.focus() ;
+ return false ;
+ }
+ else
+ {
+ window.top.releaseEvents(Event.CLICK | Event.MOUSEDOWN | Event.MOUSEUP | Event.FOCUS) ;
+ window.top.parent.removeEventListener( 'onmousedown', FCKDialog.CheckFocus, true ) ;
+ window.top.parent.removeEventListener( 'mouseup', FCKDialog.CheckFocus, true ) ;
+ window.top.parent.removeEventListener( 'click', FCKDialog.CheckFocus, true ) ;
+ window.top.parent.removeEventListener( 'onfocus', FCKDialog.CheckFocus, true ) ;
+ }
+}
+
diff --git a/lib/editor/_source/internals/fckdialog_ie.js b/lib/editor/_source/internals/fckdialog_ie.js
new file mode 100644
index 0000000..fb20e24
--- /dev/null
+++ b/lib/editor/_source/internals/fckdialog_ie.js
@@ -0,0 +1,28 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckdialog_ie.js
+ * Dialog windows operations. (IE specific implementations)
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-19 23:28:42
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+FCKDialog.Show = function( dialogInfo, dialogName, pageUrl, dialogWidth, dialogHeight, parentWindow )
+{
+ if ( !parentWindow )
+ parentWindow = window ;
+
+ parentWindow.showModalDialog( pageUrl, dialogInfo, "dialogWidth:" + dialogWidth + "px;dialogHeight:" + dialogHeight + "px;help:no;scroll:no;status:no") ;
+}
+
diff --git a/lib/editor/_source/internals/fcklanguagemanager.js b/lib/editor/_source/internals/fcklanguagemanager.js
new file mode 100644
index 0000000..223cc7c
--- /dev/null
+++ b/lib/editor/_source/internals/fcklanguagemanager.js
@@ -0,0 +1,97 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcklanguagemanager.js
+ * Defines the FCKLanguageManager object that is used for language
+ * operations.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-17 08:12:36
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+FCKLanguageManager.GetActiveLanguage = function()
+{
+ if ( FCKConfig.AutoDetectLanguage )
+ {
+ var sUserLang ;
+
+ // IE accepts "navigator.userLanguage" while Gecko "navigator.language".
+ if ( navigator.userLanguage )
+ sUserLang = navigator.userLanguage.toLowerCase() ;
+ else if ( navigator.language )
+ sUserLang = navigator.language.toLowerCase() ;
+ else
+ {
+ // Firefox 1.0 PR has a bug: it doens't support the "language" property.
+ return FCKConfig.DefaultLanguage ;
+ }
+
+ FCKDebug.Output( 'Navigator Language = ' + sUserLang ) ;
+
+ // Some language codes are set in 5 characters,
+ // like "pt-br" for Brasilian Portuguese.
+ if ( sUserLang.length >= 5 )
+ {
+ sUserLang = sUserLang.substr(0,5) ;
+ if ( this.AvailableLanguages[sUserLang] ) return sUserLang ;
+ }
+
+ // If the user's browser is set to, for example, "pt-br" but only the
+ // "pt" language file is available then get that file.
+ if ( sUserLang.length >= 2 )
+ {
+ sUserLang = sUserLang.substr(0,2) ;
+ if ( this.AvailableLanguages[sUserLang] ) return sUserLang ;
+ }
+ }
+
+ return this.DefaultLanguage ;
+}
+
+FCKLanguageManager.TranslateElements = function( targetDocument, tag, propertyToSet )
+{
+ var aInputs = targetDocument.getElementsByTagName(tag) ;
+ for ( var i = 0 ; i < aInputs.length ; i++ )
+ {
+ var oAtt = aInputs[i].attributes['fckLang'] ;
+ if ( oAtt )
+ {
+ var s = FCKLang[ oAtt.value ] ;
+ if ( s )
+ eval( 'aInputs[i].' + propertyToSet + ' = s' ) ;
+ }
+ }
+}
+
+FCKLanguageManager.TranslatePage = function( targetDocument )
+{
+ this.TranslateElements( targetDocument, 'INPUT', 'value' ) ;
+ this.TranslateElements( targetDocument, 'SPAN', 'innerHTML' ) ;
+ this.TranslateElements( targetDocument, 'LABEL', 'innerHTML' ) ;
+ this.TranslateElements( targetDocument, 'OPTION', 'innerHTML' ) ;
+}
+
+if ( FCKLanguageManager.AvailableLanguages[ FCKConfig.DefaultLanguage ] )
+ FCKLanguageManager.DefaultLanguage = FCKConfig.DefaultLanguage ;
+else
+ FCKLanguageManager.DefaultLanguage = 'en' ;
+
+FCKLanguageManager.ActiveLanguage = new Object() ;
+FCKLanguageManager.ActiveLanguage.Code = FCKLanguageManager.GetActiveLanguage() ;
+FCKLanguageManager.ActiveLanguage.Name = FCKLanguageManager.AvailableLanguages[ FCKLanguageManager.ActiveLanguage.Code ] ;
+
+FCK.Language = FCKLanguageManager ;
+
+
+// Load the language file and start the editor.
+LoadLanguageFile() ; \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckplugins.js b/lib/editor/_source/internals/fckplugins.js
new file mode 100644
index 0000000..a6223a7
--- /dev/null
+++ b/lib/editor/_source/internals/fckplugins.js
@@ -0,0 +1,43 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckplugins.js
+ * Defines the FCKPlugins object that is responsible for loading the Plugins.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-22 11:05:05
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKPlugins = FCK.Plugins = new Object() ;
+FCKPlugins.Loaded = false ;
+FCKPlugins.Items = new Array() ;
+
+// Set the defined plugins scripts paths.
+for ( var i = 0 ; i < FCKConfig.Plugins.Items.length ; i++ )
+{
+ var oItem = FCKConfig.Plugins.Items[i] ;
+ FCKPlugins.Items.addItem( new FCKPlugin( oItem[0], oItem[1] ) ) ;
+}
+
+FCKPlugins.Load = function()
+{
+ // Load all items.
+ for ( var i = 0 ; i < this.Items.length ; i++ )
+ this.Items[i].Load() ;
+
+ // Mark as loaded.
+ this.Loaded = true ;
+
+ // This is a self destroyable function (must be called once).
+ FCKPlugins.Load = null ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckregexlib.js b/lib/editor/_source/internals/fckregexlib.js
new file mode 100644
index 0000000..8844ea4
--- /dev/null
+++ b/lib/editor/_source/internals/fckregexlib.js
@@ -0,0 +1,30 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckregexlib.js
+ * These are some Regular Expresions used by the editor.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-22 11:04:22
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKRegexLib = new Object() ;
+
+// This is the Regular expression used by the SetHTML method for the "&apos;" entity.
+FCKRegexLib.AposEntity = /&apos;/gi ;
+
+// Used by the Styles combo to identify styles that can't be applied to text.
+FCKRegexLib.ObjectElements = /^(?:IMG|TABLE|TR|TD|INPUT|SELECT|TEXTAREA|HR|OBJECT)$/i ;
+
+// List all named commands (commands that can be interpreted by the browser "execCommand" method.
+FCKRegexLib.NamedCommands = /^(?:Cut|Copy|Paste|Print|SelectAll|RemoveFormat|Unlink|Undo|Redo|Bold|Italic|Underline|StrikeThrough|Subscript|Superscript|JustifyLeft|JustifyCenter|JustifyRight|JustifyFull|Outdent|Indent|InsertOrderedList|InsertUnorderedList|InsertHorizontalRule)$/i ; \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckscriptloader.js b/lib/editor/_source/internals/fckscriptloader.js
new file mode 100644
index 0000000..8b2360e
--- /dev/null
+++ b/lib/editor/_source/internals/fckscriptloader.js
@@ -0,0 +1,115 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckscriptloader.js
+ * Defines the FCKScriptLoader object that is used to dynamically load
+ * scripts in the editor.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-05-31 23:07:50
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// This object is used to download scripts and css files sequentialy.
+// A file download is not started until the previous file was not completelly
+// downloaded.
+var FCKScriptLoader = new Object() ;
+FCKScriptLoader.IsLoading = false ;
+FCKScriptLoader.Queue = new Array() ;
+
+// Adds a script or css to the queue.
+FCKScriptLoader.AddScript = function( scriptPath )
+{
+ FCKScriptLoader.Queue[ FCKScriptLoader.Queue.length ] = scriptPath ;
+
+ if ( !this.IsLoading )
+ this.CheckQueue() ;
+}
+
+// Checks the queue to see if there is something to load.
+// This function should not be called by code. It's a internal function
+// that's called recursively.
+FCKScriptLoader.CheckQueue = function()
+{
+ // Check if the queue is not empty.
+ if ( this.Queue.length > 0 )
+ {
+ this.IsLoading = true ;
+
+ // Get the first item in the queue
+ var sScriptPath = this.Queue[0] ;
+
+ // Removes the first item from the queue
+ var oTempArray = new Array() ;
+ for ( i = 1 ; i < this.Queue.length ; i++ )
+ oTempArray[ i - 1 ] = this.Queue[ i ] ;
+ this.Queue = oTempArray ;
+
+// window.status = ( 'Loading ' + sScriptPath + '...' ) ;
+
+ // Dynamically load the file (it can be a CSS or a JS)
+ var e ;
+
+ // If is a CSS
+ if ( sScriptPath.lastIndexOf( '.css' ) > 0 )
+ {
+ e = document.createElement( 'LINK' ) ;
+ e.rel = 'stylesheet' ;
+ e.type = 'text/css' ;
+ }
+ // It is a JS
+ else
+ {
+ e = document.createElement( "script" ) ;
+ e.type = "text/javascript" ;
+ }
+
+ // Add the new object to the HEAD.
+ document.getElementsByTagName("head")[0].appendChild( e ) ;
+
+ var oEvent = function()
+ {
+ // Gecko doesn't have a "readyState" property
+ if ( this.tagName == 'LINK' || !this.readyState || this.readyState == 'loaded' )
+ // Load the next script available in the queue
+ FCKScriptLoader.CheckQueue() ;
+ }
+
+ // Start downloading it.
+ if ( e.tagName == 'LINK' )
+ {
+ // IE must wait for the file to be downloaded.
+ if ( FCKBrowserInfo.IsIE )
+ e.onload = oEvent ;
+ // Gecko doens't fire any event when the CSS is loaded, so we
+ // can't wait for it.
+ else
+ FCKScriptLoader.CheckQueue() ;
+
+ e.href = sScriptPath ;
+ }
+ else
+ {
+ // Gecko fires the "onload" event and IE fires "onreadystatechange"
+ e.onload = e.onreadystatechange = oEvent ;
+ e.src = sScriptPath ;
+ }
+ }
+ else
+ {
+ this.IsLoading = false ;
+
+ // Call the "OnEmpty" event.
+ if ( this.OnEmpty )
+ this.OnEmpty() ;
+ }
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckselection.js b/lib/editor/_source/internals/fckselection.js
new file mode 100644
index 0000000..2544fcf
--- /dev/null
+++ b/lib/editor/_source/internals/fckselection.js
@@ -0,0 +1,23 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckselection.js
+ * Active selection functions.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-22 11:03:02
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKSelection = new Object() ;
+
+FCK.Selection = FCKSelection ;
diff --git a/lib/editor/_source/internals/fckselection_gecko.js b/lib/editor/_source/internals/fckselection_gecko.js
new file mode 100644
index 0000000..5146e09
--- /dev/null
+++ b/lib/editor/_source/internals/fckselection_gecko.js
@@ -0,0 +1,127 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckselection_gecko.js
+ * Active selection functions. (Gecko specific implementation)
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-15 13:33:14
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// Get the selection type (like document.select.type in IE).
+FCKSelection.GetType = function()
+{
+// if ( ! this._Type )
+// {
+ // By default set the type to "Text".
+ this._Type = 'Text' ;
+
+ // Check if the actual selection is a Control (IMG, TABLE, HR, etc...).
+ var oSel = FCK.EditorWindow.getSelection() ;
+ if ( oSel && oSel.rangeCount == 1 )
+ {
+ var oRange = oSel.getRangeAt(0) ;
+ if ( oRange.startContainer == oRange.endContainer && (oRange.endOffset - oRange.startOffset) == 1 )
+ this._Type = 'Control' ;
+ }
+// }
+ return this._Type ;
+}
+
+// Retrieves the selected element (if any), just in the case that a single
+// element (object like and image or a table) is selected.
+FCKSelection.GetSelectedElement = function()
+{
+ if ( this.GetType() == 'Control' )
+ {
+ var oSel = FCK.EditorWindow.getSelection() ;
+ return oSel.anchorNode.childNodes[ oSel.anchorOffset ] ;
+ }
+}
+
+FCKSelection.GetParentElement = function()
+{
+ if ( this.GetType() == 'Control' )
+ return FCKSelection.GetSelectedElement().parentElement ;
+ else
+ {
+ var oNode = FCK.EditorWindow.getSelection().anchorNode ;
+
+ while ( oNode && oNode.nodeType != 1 )
+ oNode = oNode.parentNode ;
+
+ return oNode ;
+ }
+}
+
+FCKSelection.MoveToNode = function( node )
+{
+ var oSel = FCK.EditorWindow.getSelection() ;
+
+ for ( i = oSel.rangeCount - 1 ; i >= 0 ; i-- )
+ {
+ if ( i == 0 )
+ oSel.getRangeAt(i).selectNodeContents( node ) ;
+ else
+ oSel.removeRange( oSel.getRangeAt(i) ) ;
+ }
+}
+
+// The "nodeTagName" parameter must be Upper Case.
+FCKSelection.HasAncestorNode = function( nodeTagName )
+{
+ var oContainer = this.GetSelectedElement() ;
+ if ( ! oContainer && FCK.EditorWindow )
+ {
+ try { oContainer = FCK.EditorWindow.getSelection().getRangeAt(0).startContainer ; }
+ catch(e){}
+ }
+
+ while ( oContainer )
+ {
+ if ( oContainer.tagName == nodeTagName ) return true ;
+ oContainer = oContainer.parentNode ;
+ }
+
+ return false ;
+}
+
+// The "nodeTagName" parameter must be Upper Case.
+FCKSelection.MoveToAncestorNode = function( nodeTagName )
+{
+ var oNode ;
+
+ var oContainer = this.GetSelectedElement() ;
+ if ( ! oContainer )
+ oContainer = FCK.EditorWindow.getSelection().getRangeAt(0).startContainer ;
+
+ while ( oContainer )
+ {
+ if ( oContainer.tagName == nodeTagName ) return oContainer ;
+ oContainer = oContainer.parentNode ;
+ }
+}
+
+FCKSelection.Delete = function()
+{
+ // Gets the actual selection.
+ var oSel = FCK.EditorWindow.getSelection() ;
+
+ // Deletes the actual selection contents.
+ for ( var i = 0 ; i < oSel.rangeCount ; i++ )
+ {
+ oSel.getRangeAt(i).deleteContents() ;
+ }
+
+ return oSel ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckselection_ie.js b/lib/editor/_source/internals/fckselection_ie.js
new file mode 100644
index 0000000..b22618e
--- /dev/null
+++ b/lib/editor/_source/internals/fckselection_ie.js
@@ -0,0 +1,121 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckselection_ie.js
+ * Active selection functions. (IE specific implementation)
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-18 01:36:23
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// Get the selection type.
+FCKSelection.GetType = function()
+{
+ return FCK.EditorDocument.selection.type ;
+}
+
+// Retrieves the selected element (if any), just in the case that a single
+// element (object like and image or a table) is selected.
+FCKSelection.GetSelectedElement = function()
+{
+ if ( this.GetType() == 'Control' )
+ {
+ var oRange = FCK.EditorDocument.selection.createRange() ;
+
+ if ( oRange && oRange.item )
+ return FCK.EditorDocument.selection.createRange().item(0) ;
+ }
+}
+
+FCKSelection.GetParentElement = function()
+{
+ if ( this.GetType() == 'Control' )
+ return FCKSelection.GetSelectedElement().parentElement ;
+ else
+ return FCK.EditorDocument.selection.createRange().parentElement() ;
+}
+
+FCKSelection.MoveToNode = function( node )
+{
+ FCK.EditorDocument.selection.empty() ;
+ var oRange = FCK.EditorDocument.selection.createRange() ;
+ oRange.moveToElementText( node ) ;
+ oRange.select() ;
+}
+
+// The "nodeTagName" parameter must be Upper Case.
+FCKSelection.HasAncestorNode = function( nodeTagName )
+{
+ var oContainer ;
+
+ if ( FCK.EditorDocument.selection.type == "Control" )
+ {
+ oContainer = this.GetSelectedElement() ;
+ }
+ else
+ {
+ var oRange = FCK.EditorDocument.selection.createRange() ;
+ oContainer = oRange.parentElement() ;
+ }
+
+ while ( oContainer )
+ {
+ if ( oContainer.tagName == nodeTagName ) return true ;
+ oContainer = oContainer.parentNode ;
+ }
+
+ return false ;
+}
+
+// The "nodeTagName" parameter must be Upper Case.
+FCKSelection.MoveToAncestorNode = function( nodeTagName )
+{
+ var oNode ;
+
+ if ( FCK.EditorDocument.selection.type == "Control" )
+ {
+ var oRange = FCK.EditorDocument.selection.createRange() ;
+ for ( i = 0 ; i < oRange.length ; i++ )
+ {
+ if (oRange(i).parentNode)
+ {
+ oNode = oRange(i).parentNode ;
+ break ;
+ }
+ }
+ }
+ else
+ {
+ var oRange = FCK.EditorDocument.selection.createRange() ;
+ oNode = oRange.parentElement() ;
+ }
+
+ while ( oNode && oNode.nodeName != nodeTagName )
+ oNode = oNode.parentNode ;
+
+ return oNode ;
+}
+
+FCKSelection.Delete = function()
+{
+ // Gets the actual selection.
+ var oSel = FCK.EditorDocument.selection ;
+
+ // Deletes the actual selection contents.
+ if ( oSel.type.toLowerCase() != "none" )
+ {
+ oSel.clear() ;
+ }
+
+ return oSel ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fcktablehandler.js b/lib/editor/_source/internals/fcktablehandler.js
new file mode 100644
index 0000000..5487a6a
--- /dev/null
+++ b/lib/editor/_source/internals/fcktablehandler.js
@@ -0,0 +1,353 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktablehandler.js
+ * Manage table operations.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-16 00:41:05
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKTableHandler = new Object() ;
+
+FCKTableHandler.InsertRow = function()
+{
+ // Get the row where the selection is placed in.
+ var oRow = FCKSelection.MoveToAncestorNode("TR") ;
+ if ( !oRow ) return ;
+
+ // Create a clone of the row.
+ var oNewRow = oRow.cloneNode( true ) ;
+
+ // Insert the new row (copy) before of it.
+ oRow.parentNode.insertBefore( oNewRow, oRow ) ;
+
+ // Clean the row (it seems that the new row has been added after it).
+ FCKTableHandler.ClearRow( oRow ) ;
+}
+
+FCKTableHandler.DeleteRows = function( row )
+{
+ // If no row has been passed as a parameer,
+ // then get the row where the selection is placed in.
+ if ( !row )
+ row = FCKSelection.MoveToAncestorNode("TR") ;
+ if ( !row ) return ;
+
+ // Get the row's table.
+ var oTable = FCKTools.GetElementAscensor( row, 'TABLE' ) ;
+
+ // If just one row is available then delete the entire table.
+ if ( oTable.rows.length == 1 )
+ {
+ FCKTableHandler.DeleteTable( oTable ) ;
+ return ;
+ }
+
+ // Delete the row.
+ row.parentNode.removeChild( row ) ;
+}
+
+FCKTableHandler.DeleteTable = function( table )
+{
+ // If no table has been passed as a parameer,
+ // then get the table where the selection is placed in.
+ if ( !table )
+ table = FCKSelection.MoveToAncestorNode("TABLE") ;
+ if ( !table ) return ;
+
+ // Delete the table.
+ table.parentNode.removeChild( table ) ;
+}
+
+FCKTableHandler.InsertColumn = function()
+{
+ // Get the cell where the selection is placed in.
+ var oCell = FCKSelection.MoveToAncestorNode("TD") ;
+ if ( !oCell ) return ;
+
+ // Get the cell's table.
+ var oTable = FCKTools.GetElementAscensor( oCell, 'TABLE' ) ;
+
+ // Get the index of the column to be created (based on the cell).
+ var iIndex = oCell.cellIndex + 1 ;
+
+ // Loop throw all rows available in the table.
+ for ( var i = 0 ; i < oTable.rows.length ; i++ )
+ {
+ // Get the row.
+ var oRow = oTable.rows[i] ;
+
+ // If the row doens't have enought cells, ignore it.
+ if ( oRow.cells.length < iIndex )
+ continue ;
+
+ // Create the new cell element to be added.
+ oCell = FCK.EditorDocument.createElement('TD') ;
+ oCell.innerHTML = '&nbsp;' ;
+
+ // Get the cell that is placed in the new cell place.
+ var oBaseCell = oRow.cells[iIndex] ;
+
+ // If the cell is available (we are not in the last cell of the row).
+ if ( oBaseCell )
+ {
+ // Insert the new cell just before of it.
+ oRow.insertBefore( oCell, oBaseCell ) ;
+ }
+ else
+ {
+ // Append the cell at the end of the row.
+ oRow.appendChild( oCell ) ;
+ }
+ }
+}
+
+FCKTableHandler.DeleteColumns = function()
+{
+ // Get the cell where the selection is placed in.
+ var oCell = FCKSelection.MoveToAncestorNode("TD") ;
+ if ( !oCell ) return ;
+
+ // Get the cell's table.
+ var oTable = FCKTools.GetElementAscensor( oCell, 'TABLE' ) ;
+
+ // Get the cell index.
+ var iIndex = oCell.cellIndex ;
+
+ // Loop throw all rows (from down to up, because it's possible that some
+ // rows will be deleted).
+ for ( var i = oTable.rows.length - 1 ; i >= 0 ; i-- )
+ {
+ // Get the row.
+ var oRow = oTable.rows[i] ;
+
+ // If the cell to be removed is the first one and the row has just one cell.
+ if ( iIndex == 0 && oRow.cells.length == 1 )
+ {
+ // Remove the entire row.
+ FCKTableHandler.DeleteRows( oRow ) ;
+ continue ;
+ }
+
+ // If the cell to be removed exists the delete it.
+ if ( oRow.cells[iIndex] )
+ oRow.removeChild( oRow.cells[iIndex] ) ;
+ }
+}
+
+FCKTableHandler.InsertCell = function( cell )
+{
+ // Get the cell where the selection is placed in.
+ var oCell = cell ? cell : FCKSelection.MoveToAncestorNode("TD") ;
+ if ( !oCell ) return ;
+
+ // Create the new cell element to be added.
+ var oNewCell = FCK.EditorDocument.createElement("TD");
+ oNewCell.innerHTML = "&nbsp;" ;
+
+ // If it is the last cell in the row.
+ if ( oCell.cellIndex == oCell.parentNode.cells.lenght - 1 )
+ {
+ // Add the new cell at the end of the row.
+ oCell.parentNode.appendChild( oNewCell ) ;
+ }
+ else
+ {
+ // Add the new cell before the next cell (after the active one).
+ oCell.parentNode.insertBefore( oNewCell, oCell.nextSibling ) ;
+ }
+
+ return oNewCell ;
+}
+
+FCKTableHandler.DeleteCell = function( cell )
+{
+ // If this is the last cell in the row.
+ if ( cell.parentNode.cells.length == 1 )
+ {
+ // Delete the entire row.
+ FCKTableHandler.DeleteRows( FCKTools.GetElementAscensor( cell, 'TR' ) ) ;
+ return ;
+ }
+
+ // Delete the cell from the row.
+ cell.parentNode.removeChild( cell ) ;
+}
+
+FCKTableHandler.DeleteCells = function()
+{
+ var aCells = FCKTableHandler.GetSelectedCells() ;
+
+ for ( var i = aCells.length - 1 ; i >= 0 ; i-- )
+ {
+ FCKTableHandler.DeleteCell( aCells[i] ) ;
+ }
+}
+
+FCKTableHandler.MergeCells = function()
+{
+ // Get all selected cells.
+ var aCells = FCKTableHandler.GetSelectedCells() ;
+
+ // At least 2 cells must be selected.
+ if ( aCells.length < 2 )
+ return ;
+
+ // The merge can occour only if the selected cells are from the same row.
+ if ( aCells[0].parentNode != aCells[aCells.length-1].parentNode )
+ return ;
+
+ // Calculate the new colSpan for the first cell.
+ var iColSpan = isNaN( aCells[0].colSpan ) ? 1 : aCells[0].colSpan ;
+
+ var sHtml = '' ;
+
+ for ( var i = aCells.length - 1 ; i > 0 ; i-- )
+ {
+ iColSpan += isNaN( aCells[i].colSpan ) ? 1 : aCells[i].colSpan ;
+
+ // Append the HTML of each cell.
+ sHtml = aCells[i].innerHTML + sHtml ;
+
+ // Delete the cell.
+ FCKTableHandler.DeleteCell( aCells[i] ) ;
+ }
+
+ // Set the innerHTML of the remaining cell (the first one).
+ aCells[0].colSpan = iColSpan ;
+ aCells[0].innerHTML += sHtml ;
+}
+
+FCKTableHandler.SplitCell = function()
+{
+ // Check that just one cell is selected, otherwise return.
+ var aCells = FCKTableHandler.GetSelectedCells() ;
+ if ( aCells.length != 1 )
+ return ;
+
+ var aMap = this._CreateTableMap( aCells[0].parentNode.parentNode ) ;
+ var iCellIndex = FCKTableHandler._GetCellIndexSpan( aMap, aCells[0].parentNode.rowIndex , aCells[0] ) ;
+
+ var aCollCells = this._GetCollumnCells( aMap, iCellIndex ) ;
+
+ for ( var i = 0 ; i < aCollCells.length ; i++ )
+ {
+ if ( aCollCells[i] == aCells[0] )
+ {
+ var oNewCell = this.InsertCell( aCells[0] ) ;
+ if ( !isNaN( aCells[0].rowSpan ) && aCells[0].rowSpan > 1 )
+ oNewCell.rowSpan = aCells[0].rowSpan ;
+ }
+ else
+ {
+ if ( isNaN( aCollCells[i].colSpan ) )
+ aCollCells[i].colSpan = 2 ;
+ else
+ aCollCells[i].colSpan += 1 ;
+ }
+ }
+}
+
+// Get the cell index from a TableMap.
+FCKTableHandler._GetCellIndexSpan = function( tableMap, rowIndex, cell )
+{
+ if ( tableMap.length < rowIndex + 1 )
+ return ;
+
+ var oRow = tableMap[ rowIndex ] ;
+
+ for ( var c = 0 ; c < oRow.length ; c++ )
+ {
+ if ( oRow[c] == cell )
+ return c ;
+ }
+}
+
+// Get the cells available in a collumn of a TableMap.
+FCKTableHandler._GetCollumnCells = function( tableMap, collumnIndex )
+{
+ var aCollCells = new Array() ;
+
+ for ( var r = 0 ; r < tableMap.length ; r++ )
+ {
+ var oCell = tableMap[r][collumnIndex] ;
+ if ( oCell && ( aCollCells.length == 0 || aCollCells[ aCollCells.length - 1 ] != oCell ) )
+ aCollCells[ aCollCells.length ] = oCell ;
+ }
+
+ return aCollCells ;
+}
+
+// This function is quite hard to explain. It creates a matrix representing all cells in a table.
+// The difference here is that the "spanned" cells (colSpan and rowSpan) are duplicated on the matrix
+// cells that are "spanned". For example, a row with 3 cells where the second cell has colSpan=2 and rowSpan=3
+// will produce a bi-dimensional matrix with the following values (representing the cells):
+// Cell1, Cell2, Cell2, Cell 3
+// Cell4, Cell2, Cell2, Cell 5
+FCKTableHandler._CreateTableMap = function( table )
+{
+ var aRows = table.rows ;
+
+ // Row and Collumn counters.
+ var r = -1 ;
+
+ var aMap = new Array() ;
+
+ for ( var i = 0 ; i < aRows.length ; i++ )
+ {
+ r++ ;
+ if ( !aMap[r] )
+ aMap[r] = new Array() ;
+
+ var c = -1 ;
+
+ for ( var j = 0 ; j < aRows[i].cells.length ; j++ )
+ {
+ var oCell = aRows[i].cells[j] ;
+
+ c++ ;
+ while ( aMap[r][c] )
+ c++ ;
+
+ var iColSpan = isNaN( oCell.colSpan ) ? 1 : oCell.colSpan ;
+ var iRowSpan = isNaN( oCell.rowSpan ) ? 1 : oCell.rowSpan ;
+
+ for ( var rs = 0 ; rs < iRowSpan ; rs++ )
+ {
+ if ( !aMap[r + rs] )
+ aMap[r + rs] = new Array() ;
+
+ for ( var cs = 0 ; cs < iColSpan ; cs++ )
+ {
+ aMap[r + rs][c + cs] = aRows[i].cells[j] ;
+ }
+ }
+
+ c += iColSpan - 1 ;
+ }
+ }
+ return aMap ;
+}
+
+FCKTableHandler.ClearRow = function( tr )
+{
+ // Get the array of row's cells.
+ var aCells = tr.cells ;
+
+ // Replace the contents of each cell with "nbsp;".
+ for ( var i = 0 ; i < aCells.length ; i++ )
+ {
+ aCells[i].innerHTML = '&nbsp;' ;
+ }
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fcktablehandler_gecko.js b/lib/editor/_source/internals/fcktablehandler_gecko.js
new file mode 100644
index 0000000..381f2de
--- /dev/null
+++ b/lib/editor/_source/internals/fcktablehandler_gecko.js
@@ -0,0 +1,49 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktablehandler_gecko.js
+ * Manage table operations (IE specific).
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-09-07 00:52:56
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+FCKTableHandler.GetSelectedCells = function()
+{
+ var aCells = new Array() ;
+
+ var oSelection = FCK.EditorWindow.getSelection() ;
+
+ // If the selection is a text.
+ if ( oSelection.rangeCount == 1 && oSelection.anchorNode.nodeType == 3 )
+ {
+ var oParent = FCKTools.GetElementAscensor( oSelection.anchorNode, 'TD' ) ;
+
+ if ( oParent )
+ {
+ aCells[0] = oParent ;
+ return aCells ;
+ }
+ }
+
+ for ( var i = 0 ; i < oSelection.rangeCount ; i++ )
+ {
+ var oRange = oSelection.getRangeAt(i) ;
+ var oCell = oRange.startContainer.childNodes[ oRange.startOffset ] ;
+
+ if ( oCell.tagName == 'TD' )
+ aCells[aCells.length] = oCell ;
+ }
+
+ return aCells ;
+}
diff --git a/lib/editor/_source/internals/fcktablehandler_ie.js b/lib/editor/_source/internals/fcktablehandler_ie.js
new file mode 100644
index 0000000..15e6c7b
--- /dev/null
+++ b/lib/editor/_source/internals/fcktablehandler_ie.js
@@ -0,0 +1,54 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktablehandler_ie.js
+ * Manage table operations (IE specific).
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-09-05 02:17:58
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+FCKTableHandler.GetSelectedCells = function()
+{
+ var aCells = new Array() ;
+
+ var oRange = FCK.EditorDocument.selection.createRange() ;
+ var oParent = oRange.parentElement() ;
+
+ if ( oParent && oParent.tagName == "TD" )
+ aCells[0] = oParent ;
+ else
+ {
+ var oParent = FCKSelection.MoveToAncestorNode( "TABLE" ) ;
+
+ if ( oParent )
+ {
+ // Loops throw all cells checking if the cell is, or part of it, is inside the selection
+ // and then add it to the selected cells collection.
+ for ( var i = 0 ; i < oParent.cells.length ; i++ )
+ {
+ var oCellRange = FCK.EditorDocument.selection.createRange() ;
+ oCellRange.moveToElementText( oParent.cells[i] ) ;
+
+ if ( oRange.inRange( oCellRange )
+ || ( oRange.compareEndPoints('StartToStart',oCellRange) >= 0 && oRange.compareEndPoints('StartToEnd',oCellRange) <= 0 )
+ || ( oRange.compareEndPoints('EndToStart',oCellRange) >= 0 && oRange.compareEndPoints('EndToEnd',oCellRange) <= 0 ) )
+ {
+ aCells[aCells.length] = oParent.cells[i] ;
+ }
+ }
+ }
+ }
+
+ return aCells ;
+}
diff --git a/lib/editor/_source/internals/fcktoolbaritems.js b/lib/editor/_source/internals/fcktoolbaritems.js
new file mode 100644
index 0000000..8ab26ae
--- /dev/null
+++ b/lib/editor/_source/internals/fcktoolbaritems.js
@@ -0,0 +1,101 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktoolbaritems.js
+ * Toolbar items definitions.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-23 19:42:05
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKToolbarItems = new Object() ;
+FCKToolbarItems.LoadedItems = new Object() ;
+
+FCKToolbarItems.RegisterItem = function( itemName, item )
+{
+ this.LoadedItems[ itemName ] = item ;
+}
+
+FCKToolbarItems.GetItem = function( itemName )
+{
+ var oItem = FCKToolbarItems.LoadedItems[ itemName ] ;
+
+ if ( oItem )
+ return oItem ;
+
+ switch ( itemName )
+ {
+ case 'Source' : oItem = new FCKToolbarButton( 'Source' , FCKLang.Source, null, FCK_TOOLBARITEM_ICONTEXT, true ) ; break ;
+ case 'Save' : oItem = new FCKToolbarButton( 'Save' , FCKLang.Save, null, null, true ) ; break ;
+ case 'NewPage' : oItem = new FCKToolbarButton( 'NewPage' , FCKLang.NewPage, null, null, true ) ; break ;
+ case 'Preview' : oItem = new FCKToolbarButton( 'Preview' , FCKLang.Preview, null, null, true ) ; break ;
+ case 'About' : oItem = new FCKToolbarButton( 'About' , FCKLang.About ) ; break ;
+
+ case 'Cut' : oItem = new FCKToolbarButton( 'Cut' , FCKLang.Cut, null, null, true ) ; break ;
+ case 'Copy' : oItem = new FCKToolbarButton( 'Copy' , FCKLang.Copy, null, null, true ) ; break ;
+ case 'Paste' : oItem = new FCKToolbarButton( 'Paste' , FCKLang.Paste, null, null, true ) ; break ;
+ case 'PasteText' : oItem = new FCKToolbarButton( 'PasteText' , FCKLang.PasteText ) ; break ;
+ case 'PasteWord' : oItem = new FCKToolbarButton( 'PasteWord' , FCKLang.PasteWord ) ; break ;
+ case 'Print' : oItem = new FCKToolbarButton( 'Print' , FCKLang.Print, null, null, true ) ; break ;
+ case 'Undo' : oItem = new FCKToolbarButton( 'Undo' , FCKLang.Undo, null, null, true ) ; break ;
+ case 'Redo' : oItem = new FCKToolbarButton( 'Redo' , FCKLang.Redo, null, null, true ) ; break ;
+ case 'SelectAll' : oItem = new FCKToolbarButton( 'SelectAll' , FCKLang.SelectAll, null, null, true ) ; break ;
+ case 'RemoveFormat' : oItem = new FCKToolbarButton( 'RemoveFormat', FCKLang.RemoveFormat ) ; break ;
+
+ case 'Bold' : oItem = new FCKToolbarButton( 'Bold' , FCKLang.Bold ) ; break ;
+ case 'Italic' : oItem = new FCKToolbarButton( 'Italic' , FCKLang.Italic ) ; break ;
+ case 'Underline' : oItem = new FCKToolbarButton( 'Underline' , FCKLang.Underline ) ; break ;
+ case 'StrikeThrough' : oItem = new FCKToolbarButton( 'StrikeThrough' , FCKLang.StrikeThrough ) ; break ;
+ case 'Subscript' : oItem = new FCKToolbarButton( 'Subscript' , FCKLang.Subscript ) ; break ;
+ case 'Superscript' : oItem = new FCKToolbarButton( 'Superscript' , FCKLang.Superscript ) ; break ;
+
+ case 'OrderedList' : oItem = new FCKToolbarButton( 'InsertOrderedList' , FCKLang.NumberedListLbl, FCKLang.NumberedList ) ; break ;
+ case 'UnorderedList' : oItem = new FCKToolbarButton( 'InsertUnorderedList' , FCKLang.BulletedListLbl, FCKLang.BulletedList ) ; break ;
+ case 'Outdent' : oItem = new FCKToolbarButton( 'Outdent' , FCKLang.DecreaseIndent ) ; break ;
+ case 'Indent' : oItem = new FCKToolbarButton( 'Indent' , FCKLang.IncreaseIndent ) ; break ;
+
+ case 'Link' : oItem = new FCKToolbarButton( 'Link' , FCKLang.InsertLinkLbl, FCKLang.InsertLink ) ; break ;
+ case 'Unlink' : oItem = new FCKToolbarButton( 'Unlink' , FCKLang.RemoveLink ) ; break ;
+
+ case 'Image' : oItem = new FCKToolbarButton( 'Image' , FCKLang.InsertImageLbl, FCKLang.InsertImage ) ; break ;
+ case 'Table' : oItem = new FCKToolbarButton( 'Table' , FCKLang.InsertTableLbl, FCKLang.InsertTable ) ; break ;
+ case 'SpecialChar' : oItem = new FCKToolbarButton( 'SpecialChar' , FCKLang.InsertSpecialCharLbl, FCKLang.InsertSpecialChar ) ; break ;
+ case 'Smiley' : oItem = new FCKToolbarButton( 'Smiley' , FCKLang.InsertSmileyLbl, FCKLang.InsertSmiley ) ; break ;
+
+ case 'Rule' : oItem = new FCKToolbarButton( 'InsertHorizontalRule', FCKLang.InsertLineLbl, FCKLang.InsertLine ) ; break ;
+
+ case 'JustifyLeft' : oItem = new FCKToolbarButton( 'JustifyLeft' , FCKLang.LeftJustify ) ; break ;
+ case 'JustifyCenter' : oItem = new FCKToolbarButton( 'JustifyCenter' , FCKLang.CenterJustify ) ; break ;
+ case 'JustifyRight' : oItem = new FCKToolbarButton( 'JustifyRight' , FCKLang.RightJustify ) ; break ;
+ case 'JustifyFull' : oItem = new FCKToolbarButton( 'JustifyFull' , FCKLang.BlockJustify ) ; break ;
+
+ case 'Style' : oItem = new FCKToolbarStyleCombo() ; break ;
+ case 'FontName' : oItem = new FCKToolbarFontsCombo() ; break ;
+ case 'FontSize' : oItem = new FCKToolbarFontSizeCombo() ; break ;
+ case 'FontFormat' : oItem = new FCKToolbarFontFormatCombo() ; break ;
+
+ case 'TextColor' : oItem = new FCKToolbarPanelButton( 'TextColor', FCKLang.TextColor ) ; break ;
+ case 'BGColor' : oItem = new FCKToolbarPanelButton( 'BGColor' , FCKLang.BGColor ) ; break ;
+
+ case 'Find' : oItem = new FCKToolbarButton( 'Find' , FCKLang.Find ) ; break ;
+ case 'Replace' : oItem = new FCKToolbarButton( 'Replace' , FCKLang.Replace ) ; break ;
+
+ default:
+ alert( FCKLang.UnknownToolbarItem.replace( /%1/g, itemName ) ) ;
+ return ;
+ }
+
+ FCKToolbarItems.LoadedItems[ itemName ] = oItem ;
+
+ return oItem ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fcktoolbarset.js b/lib/editor/_source/internals/fcktoolbarset.js
new file mode 100644
index 0000000..784035d
--- /dev/null
+++ b/lib/editor/_source/internals/fcktoolbarset.js
@@ -0,0 +1,121 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktoolbarset.js
+ * Defines the FCKToolbarSet object that is used to load and draw the
+ * toolbar.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-23 19:53:19
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKToolbarSet = FCK.ToolbarSet = new Object() ;
+
+document.getElementById( 'ExpandHandle' ).title = FCKLang.ToolbarExpand ;
+document.getElementById( 'CollapseHandle' ).title = FCKLang.ToolbarCollapse ;
+
+FCKToolbarSet.Toolbars = new Array() ;
+
+FCKToolbarSet.Expand = function()
+{
+ document.getElementById( 'Collapsed' ).style.display = 'none' ;
+ document.getElementById( 'Expanded' ).style.display = '' ;
+
+ if ( ! FCKBrowserInfo.IsIE )
+ {
+ // I had to use "setTimeout" because Gecko was not responding in a right
+ // way when calling window.onresize() directly.
+ window.setTimeout( "window.onresize()", 1 ) ;
+ }
+}
+
+FCKToolbarSet.Collapse = function()
+{
+ document.getElementById( 'Collapsed' ).style.display = '' ;
+ document.getElementById( 'Expanded' ).style.display = 'none' ;
+
+ if ( ! FCKBrowserInfo.IsIE )
+ {
+ // I had to use "setTimeout" because Gecko was not responding in a right
+ // way when calling window.onresize() directly.
+ window.setTimeout( "window.onresize()", 1 ) ;
+ }
+}
+
+FCKToolbarSet.Restart = function()
+{
+ if ( !FCKConfig.ToolbarCanCollapse || FCKConfig.ToolbarStartExpanded )
+ this.Expand() ;
+ else
+ this.Collapse() ;
+
+ document.getElementById( 'CollapseHandle' ).style.display = FCKConfig.ToolbarCanCollapse ? '' : 'none' ;
+}
+
+FCKToolbarSet.Load = function( toolbarSetName )
+{
+ this.DOMElement = document.getElementById( 'eToolbar' ) ;
+
+ var ToolbarSet = FCKConfig.ToolbarSets[toolbarSetName] ;
+
+ if (! ToolbarSet)
+ {
+ alert( FCKLang.UnknownToolbarSet.replace( /%1/g, toolbarSetName ) ) ;
+ return ;
+ }
+
+ this.Toolbars = new Array() ;
+
+ for ( var x = 0 ; x < ToolbarSet.length ; x++ )
+ {
+ var oToolbar = new FCKToolbar() ;
+
+ for ( var j = 0 ; j < ToolbarSet[x].length ; j++ )
+ {
+ var sItem = ToolbarSet[x][j] ;
+
+ if ( sItem == '-')
+ oToolbar.AddSeparator() ;
+ else
+ {
+ var oItem = FCKToolbarItems.GetItem( sItem ) ;
+ if ( oItem )
+ oToolbar.AddItem( oItem ) ;
+ }
+ }
+
+ oToolbar.AddTerminator() ;
+
+ this.Toolbars[ this.Toolbars.length ] = oToolbar ;
+ }
+
+ this.Redraw() ;
+}
+
+FCKToolbarSet.Redraw = function()
+{
+}
+
+FCKToolbarSet.RefreshItemsState = function()
+{
+
+ for ( var i = 0 ; i < FCKToolbarSet.Toolbars.length ; i++ )
+ {
+ var oToolbar = FCKToolbarSet.Toolbars[i] ;
+ for ( var j = 0 ; j < oToolbar.Items.length ; j++ )
+ {
+ oToolbar.Items[j].RefreshState() ;
+ }
+ }
+}
+
diff --git a/lib/editor/_source/internals/fcktools.js b/lib/editor/_source/internals/fcktools.js
new file mode 100644
index 0000000..f5acd8b
--- /dev/null
+++ b/lib/editor/_source/internals/fcktools.js
@@ -0,0 +1,192 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktools.js
+ * Utility functions.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-23 20:35:40
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKTools = new Object() ;
+
+//**
+// FCKTools.GetLinkedFieldValue: Gets the value of the hidden INPUT element
+// that is associated to the editor. This element has its ID set to the
+// editor's instance name so the user reffers to the instance name when getting
+// the posted data.
+FCKTools.GetLinkedFieldValue = function()
+{
+ return FCK.LinkedField.value ;
+}
+
+//**
+// FCKTools.SetLinkedFieldValue: Sets the value of the hidden INPUT element
+// that is associated to the editor. This element has its ID set to the
+// editor's instance name so the user reffers to the instance name when getting
+// the posted data.
+FCKTools.SetLinkedFieldValue = function( value )
+{
+ FCK.LinkedField.value = value ;
+}
+
+//**
+// FCKTools.AttachToLinkedFieldFormSubmit: attaches a function call to the
+// submit event of the linked field form. This function us generally used to
+// update the linked field value before submitting the form.
+FCKTools.AttachToLinkedFieldFormSubmit = function( functionPointer )
+{
+ // Gets the linked field form
+ var oForm = FCK.LinkedField.form ;
+
+ // Return now if no form is available
+ if (!oForm) return ;
+
+ // Attaches the functionPointer call to the onsubmit event
+ if ( FCKBrowserInfo.IsIE )
+ oForm.attachEvent( "onsubmit", functionPointer ) ;
+ else
+ oForm.addEventListener( 'submit', functionPointer, true ) ;
+
+ //**
+ // Attaches the functionPointer call to the submit method
+ // This is done because IE doesn't fire onsubmit when the submit method is called
+ // BEGIN --
+
+ // Creates a Array in the form object that will hold all Attached function call
+ // (in the case there are more than one editor in the same page)
+ if (! oForm.updateFCKEditor) oForm.updateFCKEditor = new Array() ;
+
+ // Adds the function pointer to the array of functions to call when "submit" is called
+ oForm.updateFCKEditor[oForm.updateFCKEditor.length] = functionPointer ;
+
+ // Switches the original submit method with a new one that first call all functions
+ // on the above array and the call the original submit
+ if (! oForm.originalSubmit && ! oForm.submit.tagName )
+ {
+ // Creates a copy of the original submit
+ oForm.originalSubmit = oForm.submit ;
+
+ // Creates our replacement for the submit
+ oForm.submit = function()
+ {
+ if (this.updateFCKEditor)
+ {
+ // Calls all functions in the functions array
+ for (var i = 0 ; i < this.updateFCKEditor.length ; i++)
+ this.updateFCKEditor[i]() ;
+ }
+ // Calls the original "submit"
+ this.originalSubmit() ;
+ }
+ }
+ // END --
+}
+
+//**
+// FCKTools.AddSelectOption: Adds a option to a SELECT element.
+FCKTools.AddSelectOption = function( targetDocument, selectElement, optionText, optionValue )
+{
+ var oOption = targetDocument.createElement("OPTION") ;
+
+ oOption.text = optionText ;
+ oOption.value = optionValue ;
+
+ selectElement.options.add(oOption) ;
+
+ return oOption ;
+}
+
+FCKTools.RemoveAllSelectOptions = function( selectElement )
+{
+ for ( var i = selectElement.options.length - 1 ; i >= 0 ; i-- )
+ {
+ selectElement.options.remove(i) ;
+ }
+}
+
+FCKTools.SelectNoCase = function( selectElement, value, defaultValue )
+{
+ var sNoCaseValue = value.toString().toLowerCase() ;
+
+ for ( var i = 0 ; i < selectElement.options.length ; i++ )
+ {
+ if ( sNoCaseValue == selectElement.options[i].value.toLowerCase() )
+ {
+ selectElement.selectedIndex = i ;
+ return ;
+ }
+ }
+
+ if ( defaultValue != null ) FCKTools.SelectNoCase( selectElement, defaultValue ) ;
+}
+
+FCKTools.HTMLEncode = function( text )
+{
+ text = text.replace( /&/g, "&amp;" ) ;
+ text = text.replace( /"/g, "&quot;" ) ;
+ text = text.replace( /</g, "&lt;" ) ;
+ text = text.replace( />/g, "&gt;" ) ;
+ text = text.replace( /'/g, "&#39;" ) ;
+
+ return text ;
+}
+
+//**
+// FCKTools.GetResultingArray: Gets a array from a string (where the elements
+// are separated by a character), a fuction (that returns a array) or a array.
+FCKTools.GetResultingArray = function( arraySource, separator )
+{
+ switch ( typeof( arraySource ) )
+ {
+ case "string" :
+ return arraySource.split( separator ) ;
+ case "function" :
+ return separator() ;
+ default :
+ if ( isArray( arraySource ) ) return arraySource ;
+ else return new Array() ;
+ }
+}
+
+FCKTools.GetElementPosition = function( el )
+{
+ // Initializes the Coordinates object that will be returned by the function.
+ var c = { X:0, Y:0 } ;
+
+ // Loop throw the offset chain.
+ while ( el )
+ {
+ c.X += el.offsetLeft ;
+ c.Y += el.offsetTop ;
+
+ el = el.offsetParent ;
+ }
+
+ // Return the Coordinates object
+ return c ;
+}
+
+FCKTools.GetElementAscensor = function( element, ascensorTagName )
+{
+ var e = element.parentNode ;
+
+ while ( e )
+ {
+ if ( e.nodeName == ascensorTagName )
+ return e ;
+
+ e = e.parentNode ;
+ }
+}
+
diff --git a/lib/editor/_source/internals/fcktools_gecko.js b/lib/editor/_source/internals/fcktools_gecko.js
new file mode 100644
index 0000000..0330bf3
--- /dev/null
+++ b/lib/editor/_source/internals/fcktools_gecko.js
@@ -0,0 +1,77 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktools_gecko.js
+ * Utility functions. (Gecko version).
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-18 00:55:13
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// Appends a CSS file to a document.
+FCKTools.AppendStyleSheet = function( documentElement, cssFileUrl )
+{
+ var e = documentElement.createElement( 'LINK' ) ;
+ e.rel = 'stylesheet' ;
+ e.type = 'text/css' ;
+ e.href = cssFileUrl ;
+ documentElement.getElementsByTagName("HEAD")[0].appendChild( e ) ;
+}
+
+// Removes all attributes and values from the element.
+FCKTools.ClearElementAttributes = function( element )
+{
+ // Loop throw all attributes in the element
+ for ( var i = 0 ; i < element.attributes.length ; i++ )
+ {
+ // Remove the element by name.
+ element.removeAttribute( element.attributes[i].name, 0 ) ; // 0 : Case Insensitive
+ }
+}
+
+// Returns an Array of strings with all defined in the elements inside another element.
+FCKTools.GetAllChildrenIds = function( parentElement )
+{
+ // Create the array that will hold all Ids.
+ var aIds = new Array() ;
+
+ // Define a recursive function that search for the Ids.
+ var fGetIds = function( parent )
+ {
+ for ( var i = 0 ; i < parent.childNodes.length ; i++ )
+ {
+ var sId = parent.childNodes[i].id ;
+
+ // Check if the Id is defined for the element.
+ if ( sId && sId.length > 0 ) aIds[ aIds.length ] = sId ;
+
+ // Recursive call.
+ fGetIds( parent.childNodes[i] ) ;
+ }
+ }
+
+ // Start the recursive calls.
+ fGetIds( parentElement ) ;
+
+ return aIds ;
+}
+
+FCKTools.RemoveOuterTags = function( e )
+{
+ var oFragment = e.ownerDocument.createDocumentFragment() ;
+
+ for ( var i = 0 ; i < e.childNodes.length ; i++ )
+ oFragment.appendChild( e.childNodes[i] ) ;
+
+ e.parentNode.replaceChild( oFragment, e ) ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fcktools_ie.js b/lib/editor/_source/internals/fcktools_ie.js
new file mode 100644
index 0000000..57ff9f5
--- /dev/null
+++ b/lib/editor/_source/internals/fcktools_ie.js
@@ -0,0 +1,49 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fcktools_ie.js
+ * Utility functions. (IE version).
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-18 00:54:37
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// Appends a CSS file to a document.
+FCKTools.AppendStyleSheet = function( documentElement, cssFileUrl )
+{
+ return documentElement.createStyleSheet( cssFileUrl ) ;
+}
+
+// Removes all attributes and values from the element.
+FCKTools.ClearElementAttributes = function( element )
+{
+ element.clearAttributes() ;
+}
+
+FCKTools.GetAllChildrenIds = function( parentElement )
+{
+ var aIds = new Array() ;
+ for ( var i = 0 ; i < parentElement.all.length ; i++ )
+ {
+ var sId = parentElement.all[i].id ;
+ if ( sId && sId.length > 0 )
+ aIds[ aIds.length ] = sId ;
+ }
+ return aIds ;
+}
+
+FCKTools.RemoveOuterTags = function( e )
+{
+ e.insertAdjacentHTML( 'beforeBegin', e.innerHTML ) ;
+ e.parentNode.removeChild( e ) ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckurlparams.js b/lib/editor/_source/internals/fckurlparams.js
new file mode 100644
index 0000000..31c6ec2
--- /dev/null
+++ b/lib/editor/_source/internals/fckurlparams.js
@@ -0,0 +1,33 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckurlparams.js
+ * Defines the FCKURLParams object that is used to get all parameters
+ * passed by the URL QueryString (after the "?").
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-05-31 23:07:51
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// #### URLParams: holds all URL passed parameters (like ?Param1=Value1&Param2=Value2)
+var FCKURLParams = new Object() ;
+
+var aParams = document.location.search.substr(1).split('&') ;
+for ( i = 0 ; i < aParams.length ; i++ )
+{
+ var aParam = aParams[i].split('=') ;
+ var sParamName = aParam[0] ;
+ var sParamValue = aParam[1] ;
+
+ FCKURLParams[ sParamName ] = sParamValue ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckxhtml.js b/lib/editor/_source/internals/fckxhtml.js
new file mode 100644
index 0000000..74b0b29
--- /dev/null
+++ b/lib/editor/_source/internals/fckxhtml.js
@@ -0,0 +1,280 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckxhtml.js
+ * Defines the FCKXHtml object, responsible for the XHTML operations.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-12-12 17:31:20
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var FCKXHtml = new Object() ;
+
+FCKXHtml.EmptyElementsRegex = /^(?:BASE|META|LINK|HR|BR|PARAM|IMG|AREA|INPUT)$/i ;
+
+FCKXHtml.GetXHTML = function( node )
+{
+ // Create the XML DOMDocument objetc.
+ if ( window.ActiveXObject ) // IE
+ this.XML = new ActiveXObject( 'Msxml2.DOMDocument' ) ;
+ else // Gecko
+ this.XML = document.implementation.createDocument( '', '', null ) ;
+
+ // Add a root element that holds all child nodes.
+ this.MainNode = this.XML.appendChild( this.XML.createElement( 'xhtml' ) ) ;
+
+ // Start recursivelly calling the _AppendNode function.
+ this._AppendChildNodes( this.MainNode, node ) ;
+
+ // Get the resulting XHTML as a string.
+ var sXHTML = FCKBrowserInfo.IsIE ? this.MainNode.xml : FCKXHtml._GetGeckoNodeXml( this.MainNode ) ;
+
+ if ( FCKConfig.ForceSimpleAmpersand )
+ sXHTML = sXHTML.replace( /___FCKAmp___/g, '&' ) ;
+
+ // Strip the "XHTML" root node.
+ return sXHTML.substr( 7, sXHTML.length - 15 ) ;
+}
+
+FCKXHtml._GetGeckoNodeXml = function( node )
+{
+ // Create the XMLSerializer.
+ var oSerializer = new XMLSerializer() ;
+
+ // Return the serialized XML as a string.
+ // Due to a BUG on Gecko, the special chars sequence "#?-:" must be replaced with "&"
+ // for the XHTML entities.
+ return oSerializer.serializeToString( node ).replace( FCKXHtmlEntities.GeckoEntitiesMarkerRegex, '&' ) ;
+}
+
+FCKXHtml._AppendAttribute = function( xmlNode, attributeName, attributeValue )
+{
+ // There is a bug in Mozilla that returns '_moz_dirty' as specified.
+ if ( FCKBrowserInfo.IsGecko && attributeName.indexOf( '_moz' ) == 0 )
+ return ;
+
+ // Create the attribute.
+ var oXmlAtt = this.XML.createAttribute( attributeName ) ;
+
+ // XHTML doens't support attribute minimization like "CHECKED". It must be trasformed to cheched="checked".
+ if ( attributeValue === true )
+ oXmlAtt.value = attributeName ;
+ else
+ oXmlAtt.value = attributeValue ;
+
+ // Set the attribute in the node.
+ xmlNode.attributes.setNamedItem( oXmlAtt ) ;
+}
+
+FCKXHtml._AppendChildNodes = function( xmlNode, htmlNode )
+{
+ // Get all children nodes.
+ var oChildren = htmlNode.childNodes ;
+
+ var i = 0 ;
+ while ( i < oChildren.length )
+ {
+ i += this._AppendNode( xmlNode, oChildren[i] ) ;
+ }
+
+ // We can't use short representation of empty elements that are not marked
+ // as empty in th XHTML DTD.
+ if ( i == 0 && ! this.EmptyElementsRegex.test( htmlNode.nodeName ) )
+ xmlNode.appendChild( this.XML.createTextNode('') ) ;
+}
+
+FCKXHtml._AppendNode = function( xmlNode, htmlNode )
+{
+ var iAddedNodes = 1 ;
+
+ switch ( htmlNode.nodeType )
+ {
+ // Element Node.
+ case 1 :
+ // Mozilla insert custom nodes in the DOM.
+ if ( FCKBrowserInfo.IsGecko && htmlNode.hasAttribute('_moz_editor_bogus_node') )
+ return ;
+
+ // Create the Element.
+ var sNodeName = htmlNode.nodeName.toLowerCase() ;
+
+ // If the nodeName starts with a slash, it is a orphan closing tag.
+ if ( sNodeName.substr(0,1) == '/' )
+ break ;
+
+ var oNode = this.XML.createElement( sNodeName ) ;
+
+ // Add all attributes.
+ var oAttributes = htmlNode.attributes ;
+ for ( var n = 0 ; n < oAttributes.length ; n++ )
+ {
+ var oAttribute = oAttributes[n] ;
+ if ( oAttribute.specified )
+ {
+ var sAttName = oAttribute.nodeName.toLowerCase() ;
+
+ // The following must be done because of a bug on IE regarding the style
+ // attribute. It returns "null" for the nodeValue.
+ if ( FCKBrowserInfo.IsIE && sAttName == 'style' )
+ var sAttValue = htmlNode.style.cssText ;
+ // There are two cases when the oAttribute.nodeValue must be used:
+ // - for the "class" attribute
+ // - for events attributes (on IE only).
+ else if ( sAttName == 'class' || ( FCKBrowserInfo.IsIE && sAttName.indexOf('on') == 0 ) )
+ var sAttValue = oAttribute.nodeValue ;
+ else
+ var sAttValue = htmlNode.getAttribute( sAttName, 2 ) ; // We must use getAttribute to get it exactly as it is defined.
+
+ if ( FCKConfig.ForceSimpleAmpersand && sAttValue.replace )
+ sAttValue = sAttValue.replace( /&/g, '___FCKAmp___' ) ;
+
+ this._AppendAttribute( oNode, sAttName, sAttValue ) ;
+ }
+ }
+
+ var bProcessChild = true ;
+
+ // Proccess the node.
+ switch ( sNodeName )
+ {
+ case "img" :
+ // The "ALT" attribute is required in XHTML.
+ if ( ! oNode.attributes.getNamedItem( 'alt' ) )
+ this._AppendAttribute( oNode, 'alt', '' ) ;
+
+ bProcessChild = false ;
+
+ break ;
+
+ // IE automaticaly changes <FONT> tags to <FONT size=+0>
+ case "font" :
+ if ( FCKBrowserInfo.IsIE && oNode.attributes.length == 0 )
+ oNode = this.XML.createDocumentFragment() ;
+ break ;
+
+ // IE doens't see the value attribute as an attribute for the <INPUT> tag.
+ case "input" :
+ if ( FCKBrowserInfo.IsIE && htmlNode.value && !oNode.attributes.getNamedItem( 'value' ) )
+ this._AppendAttribute( oNode, 'value', htmlNode.value ) ;
+
+ bProcessChild = false ;
+
+ break ;
+
+ // There is a BUG in IE regarding the ABBR tag.
+ case "abbr" :
+ if ( FCKBrowserInfo.IsIE )
+ {
+ var oNextNode = htmlNode.nextSibling ;
+ while ( true )
+ {
+ iAddedNodes++ ;
+ if ( oNextNode && oNextNode.nodeName != '/ABBR' )
+ {
+ this._AppendNode( oNode, oNextNode ) ;
+ oNextNode = oNextNode.nextSibling ;
+ }
+ else
+ break ;
+ }
+ bProcessChild = false ;
+ }
+ break ;
+
+ // IE ignores the "COORDS" attribute so we must add it manually.
+ case "area" :
+ if ( FCKBrowserInfo.IsIE && ! oNode.attributes.getNamedItem( 'coords' ) )
+ {
+ var sCoords = htmlNode.getAttribute( 'coords', 2 ) ;
+ if ( sCoords && sCoords != '0,0,0' )
+ this._AppendAttribute( oNode, 'coords', sCoords ) ;
+ }
+ break ;
+
+ // "SCRIPT" and "STYLE" must be a CDATA.
+ case "script" :
+ // The "TYPE" attribute is required in XHTML.
+ if ( ! oNode.attributes.getNamedItem( 'type' ) )
+ this._AppendAttribute( oNode, 'type', 'text/javascript' ) ;
+
+ oNode.appendChild( this.XML.createTextNode( '\n' + htmlNode.text.trim() + '\n' ) ) ;
+
+ bProcessChild = false ;
+ break ;
+
+ case "style" :
+ // The "TYPE" attribute is required in XHTML.
+ if ( ! oNode.attributes.getNamedItem( 'type' ) )
+ this._AppendAttribute( oNode, 'type', 'text/css' ) ;
+
+ oNode.appendChild( this.XML.createTextNode( '\n' + htmlNode.innerHTML.trim() + '\n' ) ) ;
+
+ bProcessChild = false ;
+ break ;
+ }
+
+ // Recursivelly call the function.
+ if ( bProcessChild )
+ this._AppendChildNodes( oNode, htmlNode ) ;
+
+ xmlNode.appendChild( oNode ) ;
+
+ break ;
+
+ // Text Node.
+ case 3 :
+ // We can't just replace the special chars with entities and create a
+ // text node with it. We must split the text isolating the special chars
+ // and add each piece a time.
+ var asPieces = htmlNode.nodeValue.match( FCKXHtmlEntities.EntitiesRegex ) ;
+
+ if ( asPieces )
+ {
+ for ( var i = 0 ; i < asPieces.length ; i++ )
+ {
+ if ( asPieces[i].length == 1 )
+ {
+ var sEntity = FCKXHtmlEntities.Entities[ asPieces[i] ] ;
+ if ( sEntity != null )
+ {
+ // There is a BUG on Gecko... createEntityReference returns null.
+ if ( FCKBrowserInfo.IsIE )
+ var oEnt = this.XML.createEntityReference( sEntity ) ;
+ else
+ var oEnt = this.XML.createTextNode( '#?-:' + sEntity + ';' ) ;
+ xmlNode.appendChild( oEnt ) ;
+ continue ;
+ }
+ }
+ xmlNode.appendChild( this.XML.createTextNode( asPieces[i] ) ) ;
+ }
+ }
+
+ // This is the original code. It doesn't care about the entities.
+ //xmlNode.appendChild( this.XML.createTextNode( htmlNode.nodeValue ) ) ;
+
+ break ;
+
+ // Comment
+ case 8 :
+ xmlNode.appendChild( this.XML.createComment( htmlNode.nodeValue ) ) ;
+ break ;
+
+ // Unknown Node type.
+ default :
+ xmlNode.appendChild( this.XML.createComment( "Element not supported - Type: " + htmlNode.nodeType + " Name: " + htmlNode.nodeName ) ) ;
+ break ;
+ }
+
+ return iAddedNodes ;
+} \ No newline at end of file
diff --git a/lib/editor/_source/internals/fckxhtmlentities.js b/lib/editor/_source/internals/fckxhtmlentities.js
new file mode 100644
index 0000000..3574124
--- /dev/null
+++ b/lib/editor/_source/internals/fckxhtmlentities.js
@@ -0,0 +1,295 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckxhtmlentities.js
+ * This file define the HTML entities handled by the editor.
+ *
+ * Version: 2.0 RC2
+ * Modified: 2004-11-22 16:23:11
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+FCKXHtmlEntities = new Object();
+
+FCKXHtmlEntities.Entities = {
+ // Latin-1 Entities
+ ' ':'nbsp',
+ '¡':'iexcl',
+ '¢':'cent',
+ '£':'pound',
+ '¤':'curren',
+ '¥':'yen',
+ '¦':'brvbar',
+ '§':'sect',
+ '¨':'uml',
+ '©':'copy',
+ 'ª':'ordf',
+ '«':'laquo',
+ '¬':'not',
+ '­':'shy',
+ '®':'reg',
+ '¯':'macr',
+ '°':'deg',
+ '±':'plusmn',
+ '²':'sup2',
+ '³':'sup3',
+ '´':'acute',
+ 'µ':'micro',
+ '¶':'para',
+ '·':'middot',
+ '¸':'cedil',
+ '¹':'sup1',
+ 'º':'ordm',
+ '»':'raquo',
+ '¼':'frac14',
+ '½':'frac12',
+ '¾':'frac34',
+ '¿':'iquest',
+ 'À':'Agrave',
+ 'Á':'Aacute',
+ 'Â':'Acirc',
+ 'Ã':'Atilde',
+ 'Ä':'Auml',
+ 'Å':'Aring',
+ 'Æ':'AElig',
+ 'Ç':'Ccedil',
+ 'È':'Egrave',
+ 'É':'Eacute',
+ 'Ê':'Ecirc',
+ 'Ë':'Euml',
+ 'Ì':'Igrave',
+ 'Í':'Iacute',
+ 'Î':'Icirc',
+ 'Ï':'Iuml',
+ 'Ð':'ETH',
+ 'Ñ':'Ntilde',
+ 'Ò':'Ograve',
+ 'Ó':'Oacute',
+ 'Ô':'Ocirc',
+ 'Õ':'Otilde',
+ 'Ö':'Ouml',
+ '×':'times',
+ 'Ø':'Oslash',
+ 'Ù':'Ugrave',
+ 'Ú':'Uacute',
+ 'Û':'Ucirc',
+ 'Ü':'Uuml',
+ 'Ý':'Yacute',
+ 'Þ':'THORN',
+ 'ß':'szlig',
+ 'à':'agrave',
+ 'á':'aacute',
+ 'â':'acirc',
+ 'ã':'atilde',
+ 'ä':'auml',
+ 'å':'aring',
+ 'æ':'aelig',
+ 'ç':'ccedil',
+ 'è':'egrave',
+ 'é':'eacute',
+ 'ê':'ecirc',
+ 'ë':'euml',
+ 'ì':'igrave',
+ 'í':'iacute',
+ 'î':'icirc',
+ 'ï':'iuml',
+ 'ð':'eth',
+ 'ñ':'ntilde',
+ 'ò':'ograve',
+ 'ó':'oacute',
+ 'ô':'ocirc',
+ 'õ':'otilde',
+ 'ö':'ouml',
+ '÷':'divide',
+ 'ø':'oslash',
+ 'ù':'ugrave',
+ 'ú':'uacute',
+ 'û':'ucirc',
+ 'ü':'uuml',
+ 'ý':'yacute',
+ 'þ':'thorn',
+ 'ÿ':'yuml',
+
+ // Symbols and Greek Letters
+
+ 'ƒ':'fnof',
+ 'Α':'Alpha',
+ 'Β':'Beta',
+ 'Γ':'Gamma',
+ 'Δ':'Delta',
+ 'Ε':'Epsilon',
+ 'Ζ':'Zeta',
+ 'Η':'Eta',
+ 'Θ':'Theta',
+ 'Ι':'Iota',
+ 'Κ':'Kappa',
+ 'Λ':'Lambda',
+ 'Μ':'Mu',
+ 'Ν':'Nu',
+ 'Ξ':'Xi',
+ 'Ο':'Omicron',
+ 'Π':'Pi',
+ 'Ρ':'Rho',
+ 'Σ':'Sigma',
+ 'Τ':'Tau',
+ 'Υ':'Upsilon',
+ 'Φ':'Phi',
+ 'Χ':'Chi',
+ 'Ψ':'Psi',
+ 'Ω':'Omega',
+ 'α':'alpha',
+ 'β':'beta',
+ 'γ':'gamma',
+ 'δ':'delta',
+ 'ε':'epsilon',
+ 'ζ':'zeta',
+ 'η':'eta',
+ 'θ':'theta',
+ 'ι':'iota',
+ 'κ':'kappa',
+ 'λ':'lambda',
+ 'μ':'mu',
+ 'ν':'nu',
+ 'ξ':'xi',
+ 'ο':'omicron',
+ 'π':'pi',
+ 'ρ':'rho',
+ 'ς':'sigmaf',
+ 'σ':'sigma',
+ 'τ':'tau',
+ 'υ':'upsilon',
+ 'φ':'phi',
+ 'χ':'chi',
+ 'ψ':'psi',
+ 'ω':'omega',
+ 'ϑ':'thetasym',
+ 'ϒ':'upsih',
+ 'ϖ':'piv',
+ '•':'bull',
+ '…':'hellip',
+ '′':'prime',
+ '″':'Prime',
+ '‾':'oline',
+ '⁄':'frasl',
+ '℘':'weierp',
+ 'ℑ':'image',
+ 'ℜ':'real',
+ '™':'trade',
+ 'ℵ':'alefsym',
+ '←':'larr',
+ '↑':'uarr',
+ '→':'rarr',
+ '↓':'darr',
+ '↔':'harr',
+ '↵':'crarr',
+ '⇐':'lArr',
+ '⇑':'uArr',
+ '⇒':'rArr',
+ '⇓':'dArr',
+ '⇔':'hArr',
+ '∀':'forall',
+ '∂':'part',
+ '∃':'exist',
+ '∅':'empty',
+ '∇':'nabla',
+ '∈':'isin',
+ '∉':'notin',
+ '∋':'ni',
+ '∏':'prod',
+ '∑':'sum',
+ '−':'minus',
+ '∗':'lowast',
+ '√':'radic',
+ '∝':'prop',
+ '∞':'infin',
+ '∠':'ang',
+ '∧':'and',
+ '∨':'or',
+ '∩':'cap',
+ '∪':'cup',
+ '∫':'int',
+ '∴':'there4',
+ '∼':'sim',
+ '≅':'cong',
+ '≈':'asymp',
+ '≠':'ne',
+ '≡':'equiv',
+ '≤':'le',
+ '≥':'ge',
+ '⊂':'sub',
+ '⊃':'sup',
+ '⊄':'nsub',
+ '⊆':'sube',
+ '⊇':'supe',
+ '⊕':'oplus',
+ '⊗':'otimes',
+ '⊥':'perp',
+ '⋅':'sdot',
+ '⌈':'lceil',
+ '⌉':'rceil',
+ '⌊':'lfloor',
+ '⌋':'rfloor',
+ '〈':'lang',
+ '〉':'rang',
+ '◊':'loz',
+ '♠':'spades',
+ '♣':'clubs',
+ '♥':'hearts',
+ '♦':'diams',
+
+ // Other Special Characters
+
+ '"':'quot',
+// '&':'amp', // This entity is automatically handled by the XHTML parser.
+// '<':'lt', // This entity is automatically handled by the XHTML parser.
+// '>':'gt', // This entity is automatically handled by the XHTML parser.
+ 'Œ':'OElig',
+ 'œ':'oelig',
+ 'Š':'Scaron',
+ 'š':'scaron',
+ 'Ÿ':'Yuml',
+ 'ˆ':'circ',
+ '˜':'tilde',
+ ' ':'ensp',
+ ' ':'emsp',
+ ' ':'thinsp',
+ '‌':'zwnj',
+ '‍':'zwj',
+ '‎':'lrm',
+ '‏':'rlm',
+ '–':'ndash',
+ '—':'mdash',
+ '‘':'lsquo',
+ '’':'rsquo',
+ '‚':'sbquo',
+ '“':'ldquo',
+ '”':'rdquo',
+ '„':'bdquo',
+ '†':'dagger',
+ '‡':'Dagger',
+ '‰':'permil',
+ '‹':'lsaquo',
+ '›':'rsaquo',
+ '€':'euro'
+
+} ;
+
+FCKXHtmlEntities.Chars = '' ;
+
+for ( var e in FCKXHtmlEntities.Entities )
+ FCKXHtmlEntities.Chars += e ;
+
+FCKXHtmlEntities.EntitiesRegex = new RegExp('','') ;
+
+FCKXHtmlEntities.EntitiesRegex.compile( '[' + FCKXHtmlEntities.Chars + ']|[^' + FCKXHtmlEntities.Chars + ']+', 'g' ) ;
+
+FCKXHtmlEntities.GeckoEntitiesMarkerRegex = /#\?-\:/g ; \ No newline at end of file
diff --git a/lib/editor/filemanager/browser/default/images/ButtonArrow.gif b/lib/editor/filemanager/browser/default/images/ButtonArrow.gif
new file mode 100644
index 0000000..a355e5a
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/ButtonArrow.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/Folder.gif b/lib/editor/filemanager/browser/default/images/Folder.gif
new file mode 100644
index 0000000..ab6824d
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/Folder.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/Folder32.gif b/lib/editor/filemanager/browser/default/images/Folder32.gif
new file mode 100644
index 0000000..b93b752
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/Folder32.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/FolderOpened.gif b/lib/editor/filemanager/browser/default/images/FolderOpened.gif
new file mode 100644
index 0000000..0c5dd41
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/FolderOpened.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/FolderOpened32.gif b/lib/editor/filemanager/browser/default/images/FolderOpened32.gif
new file mode 100644
index 0000000..3e3fcf5
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/FolderOpened32.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/FolderUp.gif b/lib/editor/filemanager/browser/default/images/FolderUp.gif
new file mode 100644
index 0000000..ad5bc20
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/FolderUp.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/ai.gif b/lib/editor/filemanager/browser/default/images/icons/ai.gif
new file mode 100644
index 0000000..ba5a913
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/ai.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/avi.gif b/lib/editor/filemanager/browser/default/images/icons/avi.gif
new file mode 100644
index 0000000..6f3bac9
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/avi.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/bmp.gif b/lib/editor/filemanager/browser/default/images/icons/bmp.gif
new file mode 100644
index 0000000..7708dd8
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/bmp.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/cs.gif b/lib/editor/filemanager/browser/default/images/icons/cs.gif
new file mode 100644
index 0000000..4d92723
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/cs.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/default.icon.gif b/lib/editor/filemanager/browser/default/images/icons/default.icon.gif
new file mode 100644
index 0000000..6ce26a4
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/default.icon.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/dll.gif b/lib/editor/filemanager/browser/default/images/icons/dll.gif
new file mode 100644
index 0000000..48d445a
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/dll.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/doc.gif b/lib/editor/filemanager/browser/default/images/icons/doc.gif
new file mode 100644
index 0000000..6535b4c
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/doc.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/exe.gif b/lib/editor/filemanager/browser/default/images/icons/exe.gif
new file mode 100644
index 0000000..315817f
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/exe.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/fla.gif b/lib/editor/filemanager/browser/default/images/icons/fla.gif
new file mode 100644
index 0000000..8f91a98
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/fla.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/gif.gif b/lib/editor/filemanager/browser/default/images/icons/gif.gif
new file mode 100644
index 0000000..a5e3e6c
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/gif.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/htm.gif b/lib/editor/filemanager/browser/default/images/icons/htm.gif
new file mode 100644
index 0000000..0b5d6ba
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/htm.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/html.gif b/lib/editor/filemanager/browser/default/images/icons/html.gif
new file mode 100644
index 0000000..0b5d6ba
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/html.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/jpg.gif b/lib/editor/filemanager/browser/default/images/icons/jpg.gif
new file mode 100644
index 0000000..634b386
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/jpg.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/js.gif b/lib/editor/filemanager/browser/default/images/icons/js.gif
new file mode 100644
index 0000000..4ea17d4
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/js.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/mdb.gif b/lib/editor/filemanager/browser/default/images/icons/mdb.gif
new file mode 100644
index 0000000..0d7c102
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/mdb.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/mp3.gif b/lib/editor/filemanager/browser/default/images/icons/mp3.gif
new file mode 100644
index 0000000..6f3bac9
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/mp3.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/pdf.gif b/lib/editor/filemanager/browser/default/images/icons/pdf.gif
new file mode 100644
index 0000000..ca1f94a
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/pdf.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/ppt.gif b/lib/editor/filemanager/browser/default/images/icons/ppt.gif
new file mode 100644
index 0000000..877a8c8
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/ppt.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/rdp.gif b/lib/editor/filemanager/browser/default/images/icons/rdp.gif
new file mode 100644
index 0000000..916cd7e
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/rdp.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/swf.gif b/lib/editor/filemanager/browser/default/images/icons/swf.gif
new file mode 100644
index 0000000..314469d
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/swf.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/swt.gif b/lib/editor/filemanager/browser/default/images/icons/swt.gif
new file mode 100644
index 0000000..314469d
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/swt.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/txt.gif b/lib/editor/filemanager/browser/default/images/icons/txt.gif
new file mode 100644
index 0000000..1511ba3
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/txt.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/vsd.gif b/lib/editor/filemanager/browser/default/images/icons/vsd.gif
new file mode 100644
index 0000000..9be3daa
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/vsd.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/xls.gif b/lib/editor/filemanager/browser/default/images/icons/xls.gif
new file mode 100644
index 0000000..f57715d
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/xls.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/xml.gif b/lib/editor/filemanager/browser/default/images/icons/xml.gif
new file mode 100644
index 0000000..4559928
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/xml.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/icons/zip.gif b/lib/editor/filemanager/browser/default/images/icons/zip.gif
new file mode 100644
index 0000000..b1e2492
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/icons/zip.gif
Binary files differ
diff --git a/lib/editor/filemanager/browser/default/images/spacer.gif b/lib/editor/filemanager/browser/default/images/spacer.gif
new file mode 100644
index 0000000..35d42e8
--- /dev/null
+++ b/lib/editor/filemanager/browser/default/images/spacer.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/aiua.gif b/lib/editor/images/smiley/fun/aiua.gif
new file mode 100644
index 0000000..63a1aba
--- /dev/null
+++ b/lib/editor/images/smiley/fun/aiua.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/ak.gif b/lib/editor/images/smiley/fun/ak.gif
new file mode 100644
index 0000000..4072380
--- /dev/null
+++ b/lib/editor/images/smiley/fun/ak.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/alien.gif b/lib/editor/images/smiley/fun/alien.gif
new file mode 100644
index 0000000..8fb0ed6
--- /dev/null
+++ b/lib/editor/images/smiley/fun/alien.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/alien2.gif b/lib/editor/images/smiley/fun/alien2.gif
new file mode 100644
index 0000000..3c84a06
--- /dev/null
+++ b/lib/editor/images/smiley/fun/alien2.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/angry.gif b/lib/editor/images/smiley/fun/angry.gif
new file mode 100644
index 0000000..c36b285
--- /dev/null
+++ b/lib/editor/images/smiley/fun/angry.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/angry1.gif b/lib/editor/images/smiley/fun/angry1.gif
new file mode 100644
index 0000000..488fb6e
--- /dev/null
+++ b/lib/editor/images/smiley/fun/angry1.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/apophys.gif b/lib/editor/images/smiley/fun/apophys.gif
new file mode 100644
index 0000000..2734348
--- /dev/null
+++ b/lib/editor/images/smiley/fun/apophys.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/assjani.gif b/lib/editor/images/smiley/fun/assjani.gif
new file mode 100644
index 0000000..3df8800
--- /dev/null
+++ b/lib/editor/images/smiley/fun/assjani.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/asthanos.gif b/lib/editor/images/smiley/fun/asthanos.gif
new file mode 100644
index 0000000..ea9b61b
--- /dev/null
+++ b/lib/editor/images/smiley/fun/asthanos.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/bazuzeus.gif b/lib/editor/images/smiley/fun/bazuzeus.gif
new file mode 100644
index 0000000..ac8bf22
--- /dev/null
+++ b/lib/editor/images/smiley/fun/bazuzeus.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/beaute.gif b/lib/editor/images/smiley/fun/beaute.gif
new file mode 100644
index 0000000..55f8474
--- /dev/null
+++ b/lib/editor/images/smiley/fun/beaute.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/bigsmile.gif b/lib/editor/images/smiley/fun/bigsmile.gif
new file mode 100644
index 0000000..068d5a1
--- /dev/null
+++ b/lib/editor/images/smiley/fun/bigsmile.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/blush.gif b/lib/editor/images/smiley/fun/blush.gif
new file mode 100644
index 0000000..17afd39
--- /dev/null
+++ b/lib/editor/images/smiley/fun/blush.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/boid.gif b/lib/editor/images/smiley/fun/boid.gif
new file mode 100644
index 0000000..9d2c73f
--- /dev/null
+++ b/lib/editor/images/smiley/fun/boid.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/bonk.gif b/lib/editor/images/smiley/fun/bonk.gif
new file mode 100644
index 0000000..d770efe
--- /dev/null
+++ b/lib/editor/images/smiley/fun/bonk.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/bored.gif b/lib/editor/images/smiley/fun/bored.gif
new file mode 100644
index 0000000..58de953
--- /dev/null
+++ b/lib/editor/images/smiley/fun/bored.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/borg.gif b/lib/editor/images/smiley/fun/borg.gif
new file mode 100644
index 0000000..18e5edc
--- /dev/null
+++ b/lib/editor/images/smiley/fun/borg.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/capo.gif b/lib/editor/images/smiley/fun/capo.gif
new file mode 100644
index 0000000..f145423
--- /dev/null
+++ b/lib/editor/images/smiley/fun/capo.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/confused.gif b/lib/editor/images/smiley/fun/confused.gif
new file mode 100644
index 0000000..fb93a50
--- /dev/null
+++ b/lib/editor/images/smiley/fun/confused.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/cool.gif b/lib/editor/images/smiley/fun/cool.gif
new file mode 100644
index 0000000..cead030
--- /dev/null
+++ b/lib/editor/images/smiley/fun/cool.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/crazy.gif b/lib/editor/images/smiley/fun/crazy.gif
new file mode 100644
index 0000000..659fbb6
--- /dev/null
+++ b/lib/editor/images/smiley/fun/crazy.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/cwm14.gif b/lib/editor/images/smiley/fun/cwm14.gif
new file mode 100644
index 0000000..c2e8547
--- /dev/null
+++ b/lib/editor/images/smiley/fun/cwm14.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/demis_roussos.gif b/lib/editor/images/smiley/fun/demis_roussos.gif
new file mode 100644
index 0000000..3e3c4f5
--- /dev/null
+++ b/lib/editor/images/smiley/fun/demis_roussos.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/devil.gif b/lib/editor/images/smiley/fun/devil.gif
new file mode 100644
index 0000000..da2dfcd
--- /dev/null
+++ b/lib/editor/images/smiley/fun/devil.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/devil2.gif b/lib/editor/images/smiley/fun/devil2.gif
new file mode 100644
index 0000000..7a57c15
--- /dev/null
+++ b/lib/editor/images/smiley/fun/devil2.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/double0smile.gif b/lib/editor/images/smiley/fun/double0smile.gif
new file mode 100644
index 0000000..65b3c76
--- /dev/null
+++ b/lib/editor/images/smiley/fun/double0smile.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/eek3.gif b/lib/editor/images/smiley/fun/eek3.gif
new file mode 100644
index 0000000..f799acd
--- /dev/null
+++ b/lib/editor/images/smiley/fun/eek3.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/eltaf.gif b/lib/editor/images/smiley/fun/eltaf.gif
new file mode 100644
index 0000000..66bc075
--- /dev/null
+++ b/lib/editor/images/smiley/fun/eltaf.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/gele.gif b/lib/editor/images/smiley/fun/gele.gif
new file mode 100644
index 0000000..c7dbd04
--- /dev/null
+++ b/lib/editor/images/smiley/fun/gele.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/halm.gif b/lib/editor/images/smiley/fun/halm.gif
new file mode 100644
index 0000000..a239fb1
--- /dev/null
+++ b/lib/editor/images/smiley/fun/halm.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/happy.gif b/lib/editor/images/smiley/fun/happy.gif
new file mode 100644
index 0000000..fcaf0e5
--- /dev/null
+++ b/lib/editor/images/smiley/fun/happy.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/icon12.gif b/lib/editor/images/smiley/fun/icon12.gif
new file mode 100644
index 0000000..d0b786b
--- /dev/null
+++ b/lib/editor/images/smiley/fun/icon12.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/icon23.gif b/lib/editor/images/smiley/fun/icon23.gif
new file mode 100644
index 0000000..a65d12e
--- /dev/null
+++ b/lib/editor/images/smiley/fun/icon23.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/icon26.gif b/lib/editor/images/smiley/fun/icon26.gif
new file mode 100644
index 0000000..4d9a1dd
--- /dev/null
+++ b/lib/editor/images/smiley/fun/icon26.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/icon_angel.gif b/lib/editor/images/smiley/fun/icon_angel.gif
new file mode 100644
index 0000000..4121e58
--- /dev/null
+++ b/lib/editor/images/smiley/fun/icon_angel.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/icon_bandit.gif b/lib/editor/images/smiley/fun/icon_bandit.gif
new file mode 100644
index 0000000..98d674b
--- /dev/null
+++ b/lib/editor/images/smiley/fun/icon_bandit.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/icon_bravo.gif b/lib/editor/images/smiley/fun/icon_bravo.gif
new file mode 100644
index 0000000..aab5693
--- /dev/null
+++ b/lib/editor/images/smiley/fun/icon_bravo.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/icon_clown.gif b/lib/editor/images/smiley/fun/icon_clown.gif
new file mode 100644
index 0000000..45e2665
--- /dev/null
+++ b/lib/editor/images/smiley/fun/icon_clown.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/jesors.gif b/lib/editor/images/smiley/fun/jesors.gif
new file mode 100644
index 0000000..f756d4f
--- /dev/null
+++ b/lib/editor/images/smiley/fun/jesors.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/jesors1.gif b/lib/editor/images/smiley/fun/jesors1.gif
new file mode 100644
index 0000000..bfdfb29
--- /dev/null
+++ b/lib/editor/images/smiley/fun/jesors1.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/lol3.gif b/lib/editor/images/smiley/fun/lol3.gif
new file mode 100644
index 0000000..f477054
--- /dev/null
+++ b/lib/editor/images/smiley/fun/lol3.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/love.gif b/lib/editor/images/smiley/fun/love.gif
new file mode 100644
index 0000000..1006369
--- /dev/null
+++ b/lib/editor/images/smiley/fun/love.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/mad.gif b/lib/editor/images/smiley/fun/mad.gif
new file mode 100644
index 0000000..f62eb17
--- /dev/null
+++ b/lib/editor/images/smiley/fun/mad.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/megaphone.gif b/lib/editor/images/smiley/fun/megaphone.gif
new file mode 100644
index 0000000..a641989
--- /dev/null
+++ b/lib/editor/images/smiley/fun/megaphone.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/mmm.gif b/lib/editor/images/smiley/fun/mmm.gif
new file mode 100644
index 0000000..ef3e906
--- /dev/null
+++ b/lib/editor/images/smiley/fun/mmm.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/music.gif b/lib/editor/images/smiley/fun/music.gif
new file mode 100644
index 0000000..9b77a2a
--- /dev/null
+++ b/lib/editor/images/smiley/fun/music.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/notify.gif b/lib/editor/images/smiley/fun/notify.gif
new file mode 100644
index 0000000..d0e1b44
--- /dev/null
+++ b/lib/editor/images/smiley/fun/notify.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/nuts.gif b/lib/editor/images/smiley/fun/nuts.gif
new file mode 100644
index 0000000..df69c2c
--- /dev/null
+++ b/lib/editor/images/smiley/fun/nuts.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/obanon.gif b/lib/editor/images/smiley/fun/obanon.gif
new file mode 100644
index 0000000..230dbb6
--- /dev/null
+++ b/lib/editor/images/smiley/fun/obanon.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/ouaip.gif b/lib/editor/images/smiley/fun/ouaip.gif
new file mode 100644
index 0000000..67c7a04
--- /dev/null
+++ b/lib/editor/images/smiley/fun/ouaip.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/pleure.gif b/lib/editor/images/smiley/fun/pleure.gif
new file mode 100644
index 0000000..ba78f6e
--- /dev/null
+++ b/lib/editor/images/smiley/fun/pleure.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/plugin.gif b/lib/editor/images/smiley/fun/plugin.gif
new file mode 100644
index 0000000..754fa21
--- /dev/null
+++ b/lib/editor/images/smiley/fun/plugin.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/question.gif b/lib/editor/images/smiley/fun/question.gif
new file mode 100644
index 0000000..9d07226
--- /dev/null
+++ b/lib/editor/images/smiley/fun/question.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/question2.gif b/lib/editor/images/smiley/fun/question2.gif
new file mode 100644
index 0000000..d81046f
--- /dev/null
+++ b/lib/editor/images/smiley/fun/question2.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/rasta2.gif b/lib/editor/images/smiley/fun/rasta2.gif
new file mode 100644
index 0000000..c9ebdb2
--- /dev/null
+++ b/lib/editor/images/smiley/fun/rasta2.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/rastapop.gif b/lib/editor/images/smiley/fun/rastapop.gif
new file mode 100644
index 0000000..3c1a0dc
--- /dev/null
+++ b/lib/editor/images/smiley/fun/rastapop.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/rosebud.gif b/lib/editor/images/smiley/fun/rosebud.gif
new file mode 100644
index 0000000..868f204
--- /dev/null
+++ b/lib/editor/images/smiley/fun/rosebud.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/sad.gif b/lib/editor/images/smiley/fun/sad.gif
new file mode 100644
index 0000000..52ff5b9
--- /dev/null
+++ b/lib/editor/images/smiley/fun/sad.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/sad2.gif b/lib/editor/images/smiley/fun/sad2.gif
new file mode 100644
index 0000000..559c960
--- /dev/null
+++ b/lib/editor/images/smiley/fun/sad2.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/shocked.gif b/lib/editor/images/smiley/fun/shocked.gif
new file mode 100644
index 0000000..8311599
--- /dev/null
+++ b/lib/editor/images/smiley/fun/shocked.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/sick.gif b/lib/editor/images/smiley/fun/sick.gif
new file mode 100644
index 0000000..61c6646
--- /dev/null
+++ b/lib/editor/images/smiley/fun/sick.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/sick2.gif b/lib/editor/images/smiley/fun/sick2.gif
new file mode 100644
index 0000000..b8d1944
--- /dev/null
+++ b/lib/editor/images/smiley/fun/sick2.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/slaap.gif b/lib/editor/images/smiley/fun/slaap.gif
new file mode 100644
index 0000000..46b746b
--- /dev/null
+++ b/lib/editor/images/smiley/fun/slaap.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/sleep.gif b/lib/editor/images/smiley/fun/sleep.gif
new file mode 100644
index 0000000..1ea1245
--- /dev/null
+++ b/lib/editor/images/smiley/fun/sleep.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/smile.gif b/lib/editor/images/smiley/fun/smile.gif
new file mode 100644
index 0000000..7b1f6d3
--- /dev/null
+++ b/lib/editor/images/smiley/fun/smile.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/smiley_peur.gif b/lib/editor/images/smiley/fun/smiley_peur.gif
new file mode 100644
index 0000000..560a88e
--- /dev/null
+++ b/lib/editor/images/smiley/fun/smiley_peur.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/sors.gif b/lib/editor/images/smiley/fun/sors.gif
new file mode 100644
index 0000000..f8c0ae0
--- /dev/null
+++ b/lib/editor/images/smiley/fun/sors.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/sovxx.gif b/lib/editor/images/smiley/fun/sovxx.gif
new file mode 100644
index 0000000..49836c5
--- /dev/null
+++ b/lib/editor/images/smiley/fun/sovxx.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/spamafote.gif b/lib/editor/images/smiley/fun/spamafote.gif
new file mode 100644
index 0000000..d0cce23
--- /dev/null
+++ b/lib/editor/images/smiley/fun/spamafote.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/tap67.gif b/lib/editor/images/smiley/fun/tap67.gif
new file mode 100644
index 0000000..45f6a38
--- /dev/null
+++ b/lib/editor/images/smiley/fun/tap67.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/thumbdown.gif b/lib/editor/images/smiley/fun/thumbdown.gif
new file mode 100644
index 0000000..e023349
--- /dev/null
+++ b/lib/editor/images/smiley/fun/thumbdown.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/thumbup.gif b/lib/editor/images/smiley/fun/thumbup.gif
new file mode 100644
index 0000000..651d761
--- /dev/null
+++ b/lib/editor/images/smiley/fun/thumbup.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/tigi.gif b/lib/editor/images/smiley/fun/tigi.gif
new file mode 100644
index 0000000..487eb01
--- /dev/null
+++ b/lib/editor/images/smiley/fun/tigi.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/toad666.gif b/lib/editor/images/smiley/fun/toad666.gif
new file mode 100644
index 0000000..480fd81
--- /dev/null
+++ b/lib/editor/images/smiley/fun/toad666.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/tongue.gif b/lib/editor/images/smiley/fun/tongue.gif
new file mode 100644
index 0000000..1a50ac1
--- /dev/null
+++ b/lib/editor/images/smiley/fun/tongue.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/tuffgong.gif b/lib/editor/images/smiley/fun/tuffgong.gif
new file mode 100644
index 0000000..5859936
--- /dev/null
+++ b/lib/editor/images/smiley/fun/tuffgong.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/urgeman.gif b/lib/editor/images/smiley/fun/urgeman.gif
new file mode 100644
index 0000000..26f22ce
--- /dev/null
+++ b/lib/editor/images/smiley/fun/urgeman.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/vanadium.gif b/lib/editor/images/smiley/fun/vanadium.gif
new file mode 100644
index 0000000..7a0a536
--- /dev/null
+++ b/lib/editor/images/smiley/fun/vanadium.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/wink.gif b/lib/editor/images/smiley/fun/wink.gif
new file mode 100644
index 0000000..d148288
--- /dev/null
+++ b/lib/editor/images/smiley/fun/wink.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/worship.gif b/lib/editor/images/smiley/fun/worship.gif
new file mode 100644
index 0000000..04cc5a1
--- /dev/null
+++ b/lib/editor/images/smiley/fun/worship.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/wouaf.gif b/lib/editor/images/smiley/fun/wouaf.gif
new file mode 100644
index 0000000..f62ed31
--- /dev/null
+++ b/lib/editor/images/smiley/fun/wouaf.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/wow.gif b/lib/editor/images/smiley/fun/wow.gif
new file mode 100644
index 0000000..94762b6
--- /dev/null
+++ b/lib/editor/images/smiley/fun/wow.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/xp1700.gif b/lib/editor/images/smiley/fun/xp1700.gif
new file mode 100644
index 0000000..9c0d10a
--- /dev/null
+++ b/lib/editor/images/smiley/fun/xp1700.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/yltype.gif b/lib/editor/images/smiley/fun/yltype.gif
new file mode 100644
index 0000000..40095b4
--- /dev/null
+++ b/lib/editor/images/smiley/fun/yltype.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/yopyopyop.gif b/lib/editor/images/smiley/fun/yopyopyop.gif
new file mode 100644
index 0000000..e661454
--- /dev/null
+++ b/lib/editor/images/smiley/fun/yopyopyop.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/youpi.gif b/lib/editor/images/smiley/fun/youpi.gif
new file mode 100644
index 0000000..19ba508
--- /dev/null
+++ b/lib/editor/images/smiley/fun/youpi.gif
Binary files differ
diff --git a/lib/editor/images/smiley/fun/zoor.gif b/lib/editor/images/smiley/fun/zoor.gif
new file mode 100644
index 0000000..cb5ddef
--- /dev/null
+++ b/lib/editor/images/smiley/fun/zoor.gif
Binary files differ
diff --git a/lib/editor/skins/default/images/toolbar.arrowright.gif b/lib/editor/skins/default/images/toolbar.arrowright.gif
new file mode 100644
index 0000000..6843c8d
--- /dev/null
+++ b/lib/editor/skins/default/images/toolbar.arrowright.gif
Binary files differ
diff --git a/lib/editor/skins/default/images/toolbar.buttonarrow.gif b/lib/editor/skins/default/images/toolbar.buttonarrow.gif
new file mode 100644
index 0000000..ea60995
--- /dev/null
+++ b/lib/editor/skins/default/images/toolbar.buttonarrow.gif
Binary files differ
diff --git a/lib/editor/skins/default/images/toolbar.collapse.gif b/lib/editor/skins/default/images/toolbar.collapse.gif
new file mode 100644
index 0000000..87aa56d
--- /dev/null
+++ b/lib/editor/skins/default/images/toolbar.collapse.gif
Binary files differ
diff --git a/lib/editor/skins/default/images/toolbar.end.gif b/lib/editor/skins/default/images/toolbar.end.gif
new file mode 100644
index 0000000..5bfd67a
--- /dev/null
+++ b/lib/editor/skins/default/images/toolbar.end.gif
Binary files differ
diff --git a/lib/editor/skins/default/images/toolbar.expand.gif b/lib/editor/skins/default/images/toolbar.expand.gif
new file mode 100644
index 0000000..79075e7
--- /dev/null
+++ b/lib/editor/skins/default/images/toolbar.expand.gif
Binary files differ
diff --git a/lib/editor/skins/default/images/toolbar.separator.gif b/lib/editor/skins/default/images/toolbar.separator.gif
new file mode 100644
index 0000000..eaed04a
--- /dev/null
+++ b/lib/editor/skins/default/images/toolbar.separator.gif
Binary files differ
diff --git a/lib/editor/skins/default/images/toolbar.start.gif b/lib/editor/skins/default/images/toolbar.start.gif
new file mode 100644
index 0000000..066ca41
--- /dev/null
+++ b/lib/editor/skins/default/images/toolbar.start.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.about.gif b/lib/editor/skins/silver/toolbar/button.about.gif
new file mode 100644
index 0000000..2cb368f
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.about.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.bgcolor.gif b/lib/editor/skins/silver/toolbar/button.bgcolor.gif
new file mode 100644
index 0000000..b1805cb
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.bgcolor.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.bold.gif b/lib/editor/skins/silver/toolbar/button.bold.gif
new file mode 100644
index 0000000..714a03a
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.bold.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.copy.gif b/lib/editor/skins/silver/toolbar/button.copy.gif
new file mode 100644
index 0000000..09ef299
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.copy.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.cut.gif b/lib/editor/skins/silver/toolbar/button.cut.gif
new file mode 100644
index 0000000..d2161a8
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.cut.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.find.gif b/lib/editor/skins/silver/toolbar/button.find.gif
new file mode 100644
index 0000000..304697c
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.find.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.image.gif b/lib/editor/skins/silver/toolbar/button.image.gif
new file mode 100644
index 0000000..0590ca8
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.image.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.indent.gif b/lib/editor/skins/silver/toolbar/button.indent.gif
new file mode 100644
index 0000000..dbb4fd8
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.indent.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.inserthorizontalrule.gif b/lib/editor/skins/silver/toolbar/button.inserthorizontalrule.gif
new file mode 100644
index 0000000..ca34159
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.inserthorizontalrule.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.insertorderedlist.gif b/lib/editor/skins/silver/toolbar/button.insertorderedlist.gif
new file mode 100644
index 0000000..4a62037
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.insertorderedlist.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.insertunorderedlist.gif b/lib/editor/skins/silver/toolbar/button.insertunorderedlist.gif
new file mode 100644
index 0000000..7f4016c
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.insertunorderedlist.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.italic.gif b/lib/editor/skins/silver/toolbar/button.italic.gif
new file mode 100644
index 0000000..7ad11e8
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.italic.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.justifycenter.gif b/lib/editor/skins/silver/toolbar/button.justifycenter.gif
new file mode 100644
index 0000000..a2b9ae1
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.justifycenter.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.justifyfull.gif b/lib/editor/skins/silver/toolbar/button.justifyfull.gif
new file mode 100644
index 0000000..ce76f24
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.justifyfull.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.justifyleft.gif b/lib/editor/skins/silver/toolbar/button.justifyleft.gif
new file mode 100644
index 0000000..28554db
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.justifyleft.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.justifyright.gif b/lib/editor/skins/silver/toolbar/button.justifyright.gif
new file mode 100644
index 0000000..988df81
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.justifyright.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.link.gif b/lib/editor/skins/silver/toolbar/button.link.gif
new file mode 100644
index 0000000..71758e4
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.link.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.newpage.gif b/lib/editor/skins/silver/toolbar/button.newpage.gif
new file mode 100644
index 0000000..59da17d
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.newpage.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.outdent.gif b/lib/editor/skins/silver/toolbar/button.outdent.gif
new file mode 100644
index 0000000..7a861ae
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.outdent.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.paste.gif b/lib/editor/skins/silver/toolbar/button.paste.gif
new file mode 100644
index 0000000..6648eb2
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.paste.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.pastetext.gif b/lib/editor/skins/silver/toolbar/button.pastetext.gif
new file mode 100644
index 0000000..d10f46b
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.pastetext.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.pasteword.gif b/lib/editor/skins/silver/toolbar/button.pasteword.gif
new file mode 100644
index 0000000..1fad9b8
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.pasteword.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.preview.gif b/lib/editor/skins/silver/toolbar/button.preview.gif
new file mode 100644
index 0000000..99ccb6b
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.preview.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.print.gif b/lib/editor/skins/silver/toolbar/button.print.gif
new file mode 100644
index 0000000..9f5ef1d
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.print.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.redo.gif b/lib/editor/skins/silver/toolbar/button.redo.gif
new file mode 100644
index 0000000..ab3dca0
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.redo.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.removeformat.gif b/lib/editor/skins/silver/toolbar/button.removeformat.gif
new file mode 100644
index 0000000..309d785
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.removeformat.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.replace.gif b/lib/editor/skins/silver/toolbar/button.replace.gif
new file mode 100644
index 0000000..85b2d22
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.replace.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.save.gif b/lib/editor/skins/silver/toolbar/button.save.gif
new file mode 100644
index 0000000..53af37f
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.save.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.selectall.gif b/lib/editor/skins/silver/toolbar/button.selectall.gif
new file mode 100644
index 0000000..6e5e278
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.selectall.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.showdetails.gif b/lib/editor/skins/silver/toolbar/button.showdetails.gif
new file mode 100644
index 0000000..9e5ffb4
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.showdetails.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.showtableborders.gif b/lib/editor/skins/silver/toolbar/button.showtableborders.gif
new file mode 100644
index 0000000..b5eccc5
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.showtableborders.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.smiley.gif b/lib/editor/skins/silver/toolbar/button.smiley.gif
new file mode 100644
index 0000000..ad44f7e
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.smiley.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.source.gif b/lib/editor/skins/silver/toolbar/button.source.gif
new file mode 100644
index 0000000..423db3f
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.source.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.specialchar.gif b/lib/editor/skins/silver/toolbar/button.specialchar.gif
new file mode 100644
index 0000000..99d8b6e
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.specialchar.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.spellcheck.gif b/lib/editor/skins/silver/toolbar/button.spellcheck.gif
new file mode 100644
index 0000000..2ae3973
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.spellcheck.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.strikethrough.gif b/lib/editor/skins/silver/toolbar/button.strikethrough.gif
new file mode 100644
index 0000000..80dad40
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.strikethrough.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.subscript.gif b/lib/editor/skins/silver/toolbar/button.subscript.gif
new file mode 100644
index 0000000..2d13490
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.subscript.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.superscript.gif b/lib/editor/skins/silver/toolbar/button.superscript.gif
new file mode 100644
index 0000000..1945d39
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.superscript.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.table.gif b/lib/editor/skins/silver/toolbar/button.table.gif
new file mode 100644
index 0000000..035bc40
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.table.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.tablecell.gif b/lib/editor/skins/silver/toolbar/button.tablecell.gif
new file mode 100644
index 0000000..52fe4d4
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.tablecell.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.tabledeletecells.gif b/lib/editor/skins/silver/toolbar/button.tabledeletecells.gif
new file mode 100644
index 0000000..1edd84e
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.tabledeletecells.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.tabledeletecolumns.gif b/lib/editor/skins/silver/toolbar/button.tabledeletecolumns.gif
new file mode 100644
index 0000000..e087427
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.tabledeletecolumns.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.tabledeleterows.gif b/lib/editor/skins/silver/toolbar/button.tabledeleterows.gif
new file mode 100644
index 0000000..da7bf49
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.tabledeleterows.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.tableinsertcell.gif b/lib/editor/skins/silver/toolbar/button.tableinsertcell.gif
new file mode 100644
index 0000000..0a7f2ce
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.tableinsertcell.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.tableinsertcolumn.gif b/lib/editor/skins/silver/toolbar/button.tableinsertcolumn.gif
new file mode 100644
index 0000000..a3ecc64
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.tableinsertcolumn.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.tableinsertrow.gif b/lib/editor/skins/silver/toolbar/button.tableinsertrow.gif
new file mode 100644
index 0000000..92231f9
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.tableinsertrow.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.tablemergecells.gif b/lib/editor/skins/silver/toolbar/button.tablemergecells.gif
new file mode 100644
index 0000000..f9ca1d4
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.tablemergecells.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.tablesplitcell.gif b/lib/editor/skins/silver/toolbar/button.tablesplitcell.gif
new file mode 100644
index 0000000..ecc6e42
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.tablesplitcell.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.textcolor.gif b/lib/editor/skins/silver/toolbar/button.textcolor.gif
new file mode 100644
index 0000000..0f21945
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.textcolor.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.underline.gif b/lib/editor/skins/silver/toolbar/button.underline.gif
new file mode 100644
index 0000000..75b9ca6
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.underline.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.undo.gif b/lib/editor/skins/silver/toolbar/button.undo.gif
new file mode 100644
index 0000000..be85aa8
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.undo.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.unlink.gif b/lib/editor/skins/silver/toolbar/button.unlink.gif
new file mode 100644
index 0000000..33778a2
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.unlink.gif
Binary files differ
diff --git a/lib/editor/skins/silver/toolbar/button.unorderedlist.gif b/lib/editor/skins/silver/toolbar/button.unorderedlist.gif
new file mode 100644
index 0000000..7f4016c
--- /dev/null
+++ b/lib/editor/skins/silver/toolbar/button.unorderedlist.gif
Binary files differ