esp-ckeditor 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +32 -0
- data/Rakefile +28 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/_bootstrap.js +87 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor.js +141 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor_base.js +227 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor_basic.js +238 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/command.js +209 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/commanddefinition.js +129 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/config.js +423 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dataprocessor.js +65 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/comment.js +32 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/document.js +251 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/documentfragment.js +49 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/domobject.js +258 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/element.js +1691 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/elementpath.js +119 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/event.js +145 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/node.js +696 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/nodelist.js +26 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/range.js +2054 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/rangelist.js +213 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/text.js +128 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/walker.js +462 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/window.js +96 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom.js +20 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dtd.js +266 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/editor.js +1060 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/editor_basic.js +186 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/env.js +305 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/event.js +342 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/eventInfo.js +120 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/focusmanager.js +152 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/basicwriter.js +145 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/cdata.js +43 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/comment.js +60 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/element.js +308 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/filter.js +288 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/fragment.js +518 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/text.js +53 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser.js +224 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/lang.js +157 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/loader.js +240 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/plugindefinition.js +83 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/plugins.js +103 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/resourcemanager.js +238 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/scriptloader.js +180 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/skins.js +184 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/themes.js +19 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/tools.js +763 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/ui.js +128 -0
- data/app/assets/javascripts/esp-ckeditor/_source/lang/_languages.js +27 -0
- data/app/assets/javascripts/esp-ckeditor/_source/lang/en.js +815 -0
- data/app/assets/javascripts/esp-ckeditor/_source/lang/ru.js +815 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +222 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/lang/en.js +108 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/lang/he.js +216 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/plugin.js +47 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/basicstyles/plugin.js +129 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/button/plugin.js +290 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/clipboard/dialogs/paste.js +223 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/clipboard/plugin.js +453 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/contextmenu/plugin.js +179 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialog/dialogDefinition.js +1166 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialog/plugin.js +3308 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialogadvtab/plugin.js +208 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialogui/plugin.js +1541 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/domiterator/plugin.js +361 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/editingblock/plugin.js +278 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/elementspath/plugin.js +218 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/enterkey/plugin.js +433 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/entities/plugin.js +250 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/dialogs/esp_attachment.js +234 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/images/esp_attachment.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/en.js +22 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/ru.js +22 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/uk.js +22 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/plugin.js +23 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/dialogs/esp_audio.js +207 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/images/esp_audio.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/images/placeholder.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/en.js +18 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/ru.js +18 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/uk.js +18 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/plugin.js +182 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_blockquote/dialogs/esp_blockquote.js +132 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_blockquote/plugin.js +235 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/dialogs/esp_image.js +1414 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/images/esp_image.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/en.js +9 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/ru.js +9 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/uk.js +9 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/plugin.js +80 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/dialogs/esp_anchor.js +145 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/dialogs/esp_link.js +1396 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/anchor.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_anchor.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_link.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_unlink.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/en.js +8 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/ru.js +8 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/uk.js +8 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/plugin.js +379 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_address.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_blockquote.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_div.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h1.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h2.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h3.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h4.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h5.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h6.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_p.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_pre.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/esp_showblocks.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/plugin.js +163 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/dialogs/esp_video.js +277 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/images/esp_video.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/images/placeholder.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/en.js +19 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/ru.js +19 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/uk.js +19 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/plugin.js +182 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/fakeobjects/plugin.js +175 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/filebrowser/plugin.js +534 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/find/dialogs/find.js +915 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/find/plugin.js +47 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/floatpanel/plugin.js +428 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/format/plugin.js +197 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/htmldataprocessor/plugin.js +596 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/htmlwriter/plugin.js +319 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/image/dialogs/image.js +1407 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/image/plugin.js +81 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/indent/plugin.js +461 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/justify/plugin.js +253 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/keystrokes/plugin.js +225 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/list/plugin.js +774 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/listblock/plugin.js +266 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +225 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/plugin.js +66 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/maximize/plugin.js +353 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/menu/plugin.js +541 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/panel/plugin.js +400 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastefromword/filter/default.js +1367 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastefromword/plugin.js +141 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +67 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastetext/plugin.js +98 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/popup/plugin.js +64 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/removeformat/plugin.js +185 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/resize/plugin.js +168 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/richcombo/plugin.js +381 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/selection/plugin.js +1729 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/showborders/plugin.js +207 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/sourcearea/plugin.js +209 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/styles/plugin.js +1700 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/styles/styles/default.js +88 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/stylescombo/plugin.js +218 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/tab/plugin.js +367 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/table/dialogs/table.js +623 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/table/plugin.js +78 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +525 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/tabletools/plugin.js +1194 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/toolbar/plugin.js +545 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/undo/plugin.js +578 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/wysiwygarea/plugin.js +1347 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/dialog.css +988 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/editor.css +25 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/elementspath.css +73 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons.css +367 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons_rtl.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/mini.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/noimage.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/sprites.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/mainui.css +209 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/menu.css +232 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/panel.css +227 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/presets.css +49 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/reset.css +85 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/richcombo.css +287 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/skin.js +236 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/templates.css +88 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/toolbar.css +412 -0
- data/app/assets/javascripts/esp-ckeditor/_source/themes/default/theme.js +407 -0
- data/app/assets/javascripts/esp-ckeditor/application.js +8 -0
- data/app/assets/javascripts/esp-ckeditor/ckeditor.js +137 -0
- data/app/assets/javascripts/esp-ckeditor/ckeditor.pack +194 -0
- data/app/assets/javascripts/esp-ckeditor/ckeditor_source.js +35 -0
- data/app/assets/javascripts/esp-ckeditor/ckpackager.jar +0 -0
- data/app/assets/javascripts/esp-ckeditor/ckpackager.txt +2 -0
- data/app/assets/javascripts/esp-ckeditor/config.js +147 -0
- data/app/assets/javascripts/esp-ckeditor/contents.css +38 -0
- data/app/assets/javascripts/esp-ckeditor/images/spacer.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/init_ckeditor.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/lang/he.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/basicstyles/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/button/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/clipboard/dialogs/paste.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/clipboard/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/contextmenu/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/dialog/dialogDefinition.js +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/dialog/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/dialogadvtab/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/dialogui/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/domiterator/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/editingblock/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/elementspath/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/enterkey/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/entities/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/dialogs/esp_attachment.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/images/esp_attachment.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/dialogs/esp_audio.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/images/esp_audio.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/images/placeholder.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_blockquote/dialogs/esp_blockquote.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_blockquote/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/dialogs/esp_image.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/images/esp_image.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/dialogs/esp_anchor.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/dialogs/esp_link.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/anchor.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_anchor.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_link.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_unlink.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_address.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_blockquote.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_div.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h1.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h2.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h3.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h4.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h5.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h6.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_p.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_pre.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/esp_showblocks.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/dialogs/esp_video.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/images/esp_video.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/images/placeholder.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/fakeobjects/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/filebrowser/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/find/dialogs/find.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/find/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/floatpanel/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/format/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/htmldataprocessor/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/htmlwriter/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/image/dialogs/image.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/image/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/indent/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/justify/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/keystrokes/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/list/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/listblock/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/liststyle/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/maximize/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/menu/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/panel/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/pastefromword/filter/default.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/pastefromword/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/pastetext/dialogs/pastetext.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/pastetext/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/popup/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/removeformat/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/resize/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/richcombo/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/selection/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/showborders/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/sourcearea/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/styles/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/styles/styles/default.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/stylescombo/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/tab/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/table/dialogs/table.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/table/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/tabletools/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/toolbar/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/undo/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/wysiwygarea/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/dialog.css +988 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/editor.css +25 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/elementspath.css +73 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/icons.css +367 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/icons.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/icons_rtl.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/mini.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/noimage.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/sprites.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/sprites_ie6.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/toolbar_start.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/mainui.css +209 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/menu.css +232 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/panel.css +227 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/presets.css +49 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/reset.css +85 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/richcombo.css +287 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/skin.js +236 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/templates.css +88 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/toolbar.css +412 -0
- data/app/inputs/ckeditor_input.rb +42 -0
- data/config/routes.rb +2 -0
- data/lib/esp-ckeditor/engine.rb +9 -0
- data/lib/esp-ckeditor/version.rb +3 -0
- data/lib/esp-ckeditor.rb +17 -0
- data/lib/tasks/esp-ckeditor_tasks.rake +4 -0
- metadata +434 -0
@@ -0,0 +1,78 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
CKEDITOR.plugins.add( 'table',
|
7
|
+
{
|
8
|
+
init : function( editor )
|
9
|
+
{
|
10
|
+
var table = CKEDITOR.plugins.table,
|
11
|
+
lang = editor.lang.table;
|
12
|
+
|
13
|
+
editor.addCommand( 'table', new CKEDITOR.dialogCommand( 'table' ) );
|
14
|
+
editor.addCommand( 'tableProperties', new CKEDITOR.dialogCommand( 'tableProperties' ) );
|
15
|
+
|
16
|
+
editor.ui.addButton( 'Table',
|
17
|
+
{
|
18
|
+
label : lang.toolbar,
|
19
|
+
command : 'table'
|
20
|
+
});
|
21
|
+
|
22
|
+
CKEDITOR.dialog.add( 'table', this.path + 'dialogs/table.js' );
|
23
|
+
CKEDITOR.dialog.add( 'tableProperties', this.path + 'dialogs/table.js' );
|
24
|
+
|
25
|
+
// If the "menu" plugin is loaded, register the menu items.
|
26
|
+
if ( editor.addMenuItems )
|
27
|
+
{
|
28
|
+
editor.addMenuItems(
|
29
|
+
{
|
30
|
+
table :
|
31
|
+
{
|
32
|
+
label : lang.menu,
|
33
|
+
command : 'tableProperties',
|
34
|
+
group : 'table',
|
35
|
+
order : 5
|
36
|
+
},
|
37
|
+
|
38
|
+
tabledelete :
|
39
|
+
{
|
40
|
+
label : lang.deleteTable,
|
41
|
+
command : 'tableDelete',
|
42
|
+
group : 'table',
|
43
|
+
order : 1
|
44
|
+
}
|
45
|
+
} );
|
46
|
+
}
|
47
|
+
|
48
|
+
editor.on( 'doubleclick', function( evt )
|
49
|
+
{
|
50
|
+
var element = evt.data.element;
|
51
|
+
|
52
|
+
if ( element.is( 'table' ) )
|
53
|
+
evt.data.dialog = 'tableProperties';
|
54
|
+
});
|
55
|
+
|
56
|
+
// If the "contextmenu" plugin is loaded, register the listeners.
|
57
|
+
if ( editor.contextMenu )
|
58
|
+
{
|
59
|
+
editor.contextMenu.addListener( function( element, selection )
|
60
|
+
{
|
61
|
+
if ( !element || element.isReadOnly() )
|
62
|
+
return null;
|
63
|
+
|
64
|
+
var isTable = element.hasAscendant( 'table', 1 );
|
65
|
+
|
66
|
+
if ( isTable )
|
67
|
+
{
|
68
|
+
return {
|
69
|
+
tabledelete : CKEDITOR.TRISTATE_OFF,
|
70
|
+
table : CKEDITOR.TRISTATE_OFF
|
71
|
+
};
|
72
|
+
}
|
73
|
+
|
74
|
+
return null;
|
75
|
+
} );
|
76
|
+
}
|
77
|
+
}
|
78
|
+
} );
|
@@ -0,0 +1,525 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
CKEDITOR.dialog.add( 'cellProperties', function( editor )
|
7
|
+
{
|
8
|
+
var langTable = editor.lang.table,
|
9
|
+
langCell = langTable.cell,
|
10
|
+
langCommon = editor.lang.common,
|
11
|
+
validate = CKEDITOR.dialog.validate,
|
12
|
+
widthPattern = /^(\d+(?:\.\d+)?)(px|%)$/,
|
13
|
+
heightPattern = /^(\d+(?:\.\d+)?)px$/,
|
14
|
+
bind = CKEDITOR.tools.bind,
|
15
|
+
spacer = { type : 'html', html : ' ' },
|
16
|
+
rtl = editor.lang.dir == 'rtl';
|
17
|
+
|
18
|
+
/**
|
19
|
+
*
|
20
|
+
* @param dialogName
|
21
|
+
* @param callback [ childDialog ]
|
22
|
+
*/
|
23
|
+
function getDialogValue( dialogName, callback )
|
24
|
+
{
|
25
|
+
var onOk = function()
|
26
|
+
{
|
27
|
+
releaseHandlers( this );
|
28
|
+
callback( this, this._.parentDialog );
|
29
|
+
this._.parentDialog.changeFocus( true );
|
30
|
+
};
|
31
|
+
var onCancel = function()
|
32
|
+
{
|
33
|
+
releaseHandlers( this );
|
34
|
+
this._.parentDialog.changeFocus();
|
35
|
+
};
|
36
|
+
var releaseHandlers = function( dialog )
|
37
|
+
{
|
38
|
+
dialog.removeListener( 'ok', onOk );
|
39
|
+
dialog.removeListener( 'cancel', onCancel );
|
40
|
+
};
|
41
|
+
var bindToDialog = function( dialog )
|
42
|
+
{
|
43
|
+
dialog.on( 'ok', onOk );
|
44
|
+
dialog.on( 'cancel', onCancel );
|
45
|
+
};
|
46
|
+
editor.execCommand( dialogName );
|
47
|
+
if ( editor._.storedDialogs.colordialog )
|
48
|
+
bindToDialog( editor._.storedDialogs.colordialog );
|
49
|
+
else
|
50
|
+
{
|
51
|
+
CKEDITOR.on( 'dialogDefinition', function( e )
|
52
|
+
{
|
53
|
+
if ( e.data.name != dialogName )
|
54
|
+
return;
|
55
|
+
|
56
|
+
var definition = e.data.definition;
|
57
|
+
|
58
|
+
e.removeListener();
|
59
|
+
definition.onLoad = CKEDITOR.tools.override( definition.onLoad, function( orginal )
|
60
|
+
{
|
61
|
+
return function()
|
62
|
+
{
|
63
|
+
bindToDialog( this );
|
64
|
+
definition.onLoad = orginal;
|
65
|
+
if ( typeof orginal == 'function' )
|
66
|
+
orginal.call( this );
|
67
|
+
};
|
68
|
+
} );
|
69
|
+
});
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
return {
|
74
|
+
title : langCell.title,
|
75
|
+
minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks? 450 : 410,
|
76
|
+
minHeight : CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks )? 230 : 200,
|
77
|
+
contents : [
|
78
|
+
{
|
79
|
+
id : 'info',
|
80
|
+
label : langCell.title,
|
81
|
+
accessKey : 'I',
|
82
|
+
elements :
|
83
|
+
[
|
84
|
+
{
|
85
|
+
type : 'hbox',
|
86
|
+
widths : [ '40%', '5%', '40%' ],
|
87
|
+
children :
|
88
|
+
[
|
89
|
+
{
|
90
|
+
type : 'vbox',
|
91
|
+
padding : 0,
|
92
|
+
children :
|
93
|
+
[
|
94
|
+
{
|
95
|
+
type : 'hbox',
|
96
|
+
widths : [ '70%', '30%' ],
|
97
|
+
children :
|
98
|
+
[
|
99
|
+
{
|
100
|
+
type : 'text',
|
101
|
+
id : 'width',
|
102
|
+
width: '100px',
|
103
|
+
label : langCommon.width,
|
104
|
+
validate : validate[ 'number' ]( langCell.invalidWidth ),
|
105
|
+
|
106
|
+
// Extra labelling of width unit type.
|
107
|
+
onLoad : function()
|
108
|
+
{
|
109
|
+
var widthType = this.getDialog().getContentElement( 'info', 'widthType' ),
|
110
|
+
labelElement = widthType.getElement(),
|
111
|
+
inputElement = this.getInputElement(),
|
112
|
+
ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' );
|
113
|
+
|
114
|
+
inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) );
|
115
|
+
},
|
116
|
+
|
117
|
+
setup : function( element )
|
118
|
+
{
|
119
|
+
var widthAttr = parseInt( element.getAttribute( 'width' ), 10 ),
|
120
|
+
widthStyle = parseInt( element.getStyle( 'width' ), 10 );
|
121
|
+
|
122
|
+
!isNaN( widthAttr ) && this.setValue( widthAttr );
|
123
|
+
!isNaN( widthStyle ) && this.setValue( widthStyle );
|
124
|
+
},
|
125
|
+
commit : function( element )
|
126
|
+
{
|
127
|
+
var value = parseInt( this.getValue(), 10 ),
|
128
|
+
unit = this.getDialog().getValueOf( 'info', 'widthType' );
|
129
|
+
|
130
|
+
if ( !isNaN( value ) )
|
131
|
+
element.setStyle( 'width', value + unit );
|
132
|
+
else
|
133
|
+
element.removeStyle( 'width' );
|
134
|
+
|
135
|
+
element.removeAttribute( 'width' );
|
136
|
+
},
|
137
|
+
'default' : ''
|
138
|
+
},
|
139
|
+
{
|
140
|
+
type : 'select',
|
141
|
+
id : 'widthType',
|
142
|
+
label : editor.lang.table.widthUnit,
|
143
|
+
labelStyle: 'visibility:hidden',
|
144
|
+
'default' : 'px',
|
145
|
+
items :
|
146
|
+
[
|
147
|
+
[ langTable.widthPx, 'px' ],
|
148
|
+
[ langTable.widthPc, '%' ]
|
149
|
+
],
|
150
|
+
setup : function( selectedCell )
|
151
|
+
{
|
152
|
+
var widthMatch = widthPattern.exec( selectedCell.getStyle( 'width' ) || selectedCell.getAttribute( 'width' ) );
|
153
|
+
if ( widthMatch )
|
154
|
+
this.setValue( widthMatch[2] );
|
155
|
+
}
|
156
|
+
}
|
157
|
+
]
|
158
|
+
},
|
159
|
+
{
|
160
|
+
type : 'hbox',
|
161
|
+
widths : [ '70%', '30%' ],
|
162
|
+
children :
|
163
|
+
[
|
164
|
+
{
|
165
|
+
type : 'text',
|
166
|
+
id : 'height',
|
167
|
+
label : langCommon.height,
|
168
|
+
width: '100px',
|
169
|
+
'default' : '',
|
170
|
+
validate : validate[ 'number' ]( langCell.invalidHeight ),
|
171
|
+
|
172
|
+
// Extra labelling of height unit type.
|
173
|
+
onLoad : function()
|
174
|
+
{
|
175
|
+
var heightType = this.getDialog().getContentElement( 'info', 'htmlHeightType' ),
|
176
|
+
labelElement = heightType.getElement(),
|
177
|
+
inputElement = this.getInputElement(),
|
178
|
+
ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' );
|
179
|
+
|
180
|
+
inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) );
|
181
|
+
},
|
182
|
+
|
183
|
+
setup : function( element )
|
184
|
+
{
|
185
|
+
var heightAttr = parseInt( element.getAttribute( 'height' ), 10 ),
|
186
|
+
heightStyle = parseInt( element.getStyle( 'height' ), 10 );
|
187
|
+
|
188
|
+
!isNaN( heightAttr ) && this.setValue( heightAttr );
|
189
|
+
!isNaN( heightStyle ) && this.setValue( heightStyle );
|
190
|
+
},
|
191
|
+
commit : function( element )
|
192
|
+
{
|
193
|
+
var value = parseInt( this.getValue(), 10 );
|
194
|
+
|
195
|
+
if ( !isNaN( value ) )
|
196
|
+
element.setStyle( 'height', CKEDITOR.tools.cssLength( value ) );
|
197
|
+
else
|
198
|
+
element.removeStyle( 'height' );
|
199
|
+
|
200
|
+
element.removeAttribute( 'height' );
|
201
|
+
}
|
202
|
+
},
|
203
|
+
{
|
204
|
+
id : 'htmlHeightType',
|
205
|
+
type : 'html',
|
206
|
+
html : '<br />'+ langTable.widthPx
|
207
|
+
}
|
208
|
+
]
|
209
|
+
},
|
210
|
+
spacer,
|
211
|
+
{
|
212
|
+
type : 'select',
|
213
|
+
id : 'wordWrap',
|
214
|
+
label : langCell.wordWrap,
|
215
|
+
'default' : 'yes',
|
216
|
+
items :
|
217
|
+
[
|
218
|
+
[ langCell.yes, 'yes' ],
|
219
|
+
[ langCell.no, 'no' ]
|
220
|
+
],
|
221
|
+
setup : function( element )
|
222
|
+
{
|
223
|
+
var wordWrapAttr = element.getAttribute( 'noWrap' ),
|
224
|
+
wordWrapStyle = element.getStyle( 'white-space' );
|
225
|
+
|
226
|
+
if ( wordWrapStyle == 'nowrap' || wordWrapAttr )
|
227
|
+
this.setValue( 'no' );
|
228
|
+
},
|
229
|
+
commit : function( element )
|
230
|
+
{
|
231
|
+
if ( this.getValue() == 'no' )
|
232
|
+
element.setStyle( 'white-space', 'nowrap' );
|
233
|
+
else
|
234
|
+
element.removeStyle( 'white-space' );
|
235
|
+
|
236
|
+
element.removeAttribute( 'noWrap' );
|
237
|
+
}
|
238
|
+
},
|
239
|
+
spacer,
|
240
|
+
{
|
241
|
+
type : 'select',
|
242
|
+
id : 'hAlign',
|
243
|
+
label : langCell.hAlign,
|
244
|
+
'default' : '',
|
245
|
+
items :
|
246
|
+
[
|
247
|
+
[ langCommon.notSet, '' ],
|
248
|
+
[ langCommon.alignLeft, 'left' ],
|
249
|
+
[ langCommon.alignCenter, 'center' ],
|
250
|
+
[ langCommon.alignRight, 'right' ]
|
251
|
+
],
|
252
|
+
setup : function( element )
|
253
|
+
{
|
254
|
+
var alignAttr = element.getAttribute( 'align' ),
|
255
|
+
textAlignStyle = element.getStyle( 'text-align');
|
256
|
+
|
257
|
+
this.setValue( textAlignStyle || alignAttr || '' );
|
258
|
+
},
|
259
|
+
commit : function( selectedCell )
|
260
|
+
{
|
261
|
+
var value = this.getValue();
|
262
|
+
|
263
|
+
if ( value )
|
264
|
+
selectedCell.setStyle( 'text-align', value );
|
265
|
+
else
|
266
|
+
selectedCell.removeStyle( 'text-align' );
|
267
|
+
|
268
|
+
selectedCell.removeAttribute( 'align' );
|
269
|
+
}
|
270
|
+
},
|
271
|
+
{
|
272
|
+
type : 'select',
|
273
|
+
id : 'vAlign',
|
274
|
+
label : langCell.vAlign,
|
275
|
+
'default' : '',
|
276
|
+
items :
|
277
|
+
[
|
278
|
+
[ langCommon.notSet, '' ],
|
279
|
+
[ langCommon.alignTop, 'top' ],
|
280
|
+
[ langCommon.alignMiddle, 'middle' ],
|
281
|
+
[ langCommon.alignBottom, 'bottom' ],
|
282
|
+
[ langCell.alignBaseline, 'baseline' ]
|
283
|
+
],
|
284
|
+
setup : function( element )
|
285
|
+
{
|
286
|
+
var vAlignAttr = element.getAttribute( 'vAlign' ),
|
287
|
+
vAlignStyle = element.getStyle( 'vertical-align' );
|
288
|
+
|
289
|
+
switch( vAlignStyle )
|
290
|
+
{
|
291
|
+
// Ignore all other unrelated style values..
|
292
|
+
case 'top':
|
293
|
+
case 'middle':
|
294
|
+
case 'bottom':
|
295
|
+
case 'baseline':
|
296
|
+
break;
|
297
|
+
default:
|
298
|
+
vAlignStyle = '';
|
299
|
+
}
|
300
|
+
|
301
|
+
this.setValue( vAlignStyle || vAlignAttr || '' );
|
302
|
+
},
|
303
|
+
commit : function( element )
|
304
|
+
{
|
305
|
+
var value = this.getValue();
|
306
|
+
|
307
|
+
if ( value )
|
308
|
+
element.setStyle( 'vertical-align', value );
|
309
|
+
else
|
310
|
+
element.removeStyle( 'vertical-align' );
|
311
|
+
|
312
|
+
element.removeAttribute( 'vAlign' );
|
313
|
+
}
|
314
|
+
}
|
315
|
+
]
|
316
|
+
},
|
317
|
+
spacer,
|
318
|
+
{
|
319
|
+
type : 'vbox',
|
320
|
+
padding : 0,
|
321
|
+
children :
|
322
|
+
[
|
323
|
+
{
|
324
|
+
type : 'select',
|
325
|
+
id : 'cellType',
|
326
|
+
label : langCell.cellType,
|
327
|
+
'default' : 'td',
|
328
|
+
items :
|
329
|
+
[
|
330
|
+
[ langCell.data, 'td' ],
|
331
|
+
[ langCell.header, 'th' ]
|
332
|
+
],
|
333
|
+
setup : function( selectedCell )
|
334
|
+
{
|
335
|
+
this.setValue( selectedCell.getName() );
|
336
|
+
},
|
337
|
+
commit : function( selectedCell )
|
338
|
+
{
|
339
|
+
selectedCell.renameNode( this.getValue() );
|
340
|
+
}
|
341
|
+
},
|
342
|
+
spacer,
|
343
|
+
{
|
344
|
+
type : 'text',
|
345
|
+
id : 'rowSpan',
|
346
|
+
label : langCell.rowSpan,
|
347
|
+
'default' : '',
|
348
|
+
validate : validate.integer( langCell.invalidRowSpan ),
|
349
|
+
setup : function( selectedCell )
|
350
|
+
{
|
351
|
+
var attrVal = parseInt( selectedCell.getAttribute( 'rowSpan' ), 10 );
|
352
|
+
if ( attrVal && attrVal != 1 )
|
353
|
+
this.setValue( attrVal );
|
354
|
+
},
|
355
|
+
commit : function( selectedCell )
|
356
|
+
{
|
357
|
+
var value = parseInt( this.getValue(), 10 );
|
358
|
+
if ( value && value != 1 )
|
359
|
+
selectedCell.setAttribute( 'rowSpan', this.getValue() );
|
360
|
+
else
|
361
|
+
selectedCell.removeAttribute( 'rowSpan' );
|
362
|
+
}
|
363
|
+
},
|
364
|
+
{
|
365
|
+
type : 'text',
|
366
|
+
id : 'colSpan',
|
367
|
+
label : langCell.colSpan,
|
368
|
+
'default' : '',
|
369
|
+
validate : validate.integer( langCell.invalidColSpan ),
|
370
|
+
setup : function( element )
|
371
|
+
{
|
372
|
+
var attrVal = parseInt( element.getAttribute( 'colSpan' ), 10 );
|
373
|
+
if ( attrVal && attrVal != 1 )
|
374
|
+
this.setValue( attrVal );
|
375
|
+
},
|
376
|
+
commit : function( selectedCell )
|
377
|
+
{
|
378
|
+
var value = parseInt( this.getValue(), 10 );
|
379
|
+
if ( value && value != 1 )
|
380
|
+
selectedCell.setAttribute( 'colSpan', this.getValue() );
|
381
|
+
else
|
382
|
+
selectedCell.removeAttribute( 'colSpan' );
|
383
|
+
}
|
384
|
+
},
|
385
|
+
spacer,
|
386
|
+
{
|
387
|
+
type : 'hbox',
|
388
|
+
padding : 0,
|
389
|
+
widths : [ '60%', '40%' ],
|
390
|
+
children :
|
391
|
+
[
|
392
|
+
{
|
393
|
+
type : 'text',
|
394
|
+
id : 'bgColor',
|
395
|
+
label : langCell.bgColor,
|
396
|
+
'default' : '',
|
397
|
+
setup : function( element )
|
398
|
+
{
|
399
|
+
var bgColorAttr = element.getAttribute( 'bgColor' ),
|
400
|
+
bgColorStyle = element.getStyle( 'background-color' );
|
401
|
+
|
402
|
+
this.setValue( bgColorStyle || bgColorAttr );
|
403
|
+
},
|
404
|
+
commit : function( selectedCell )
|
405
|
+
{
|
406
|
+
var value = this.getValue();
|
407
|
+
|
408
|
+
if ( value )
|
409
|
+
selectedCell.setStyle( 'background-color', this.getValue() );
|
410
|
+
else
|
411
|
+
selectedCell.removeStyle( 'background-color' );
|
412
|
+
|
413
|
+
selectedCell.removeAttribute( 'bgColor');
|
414
|
+
}
|
415
|
+
},
|
416
|
+
{
|
417
|
+
type : 'button',
|
418
|
+
id : 'bgColorChoose',
|
419
|
+
"class" : 'colorChooser',
|
420
|
+
label : langCell.chooseColor,
|
421
|
+
onLoad : function()
|
422
|
+
{
|
423
|
+
// Stick the element to the bottom (#5587)
|
424
|
+
this.getElement().getParent().setStyle( 'vertical-align', 'bottom' );
|
425
|
+
},
|
426
|
+
onClick : function()
|
427
|
+
{
|
428
|
+
var self = this;
|
429
|
+
getDialogValue( 'colordialog', function( colorDialog )
|
430
|
+
{
|
431
|
+
self.getDialog().getContentElement( 'info', 'bgColor' ).setValue(
|
432
|
+
colorDialog.getContentElement( 'picker', 'selectedColor' ).getValue()
|
433
|
+
);
|
434
|
+
} );
|
435
|
+
}
|
436
|
+
}
|
437
|
+
]
|
438
|
+
},
|
439
|
+
spacer,
|
440
|
+
{
|
441
|
+
type : 'hbox',
|
442
|
+
padding : 0,
|
443
|
+
widths : [ '60%', '40%' ],
|
444
|
+
children :
|
445
|
+
[
|
446
|
+
{
|
447
|
+
type : 'text',
|
448
|
+
id : 'borderColor',
|
449
|
+
label : langCell.borderColor,
|
450
|
+
'default' : '',
|
451
|
+
setup : function( element )
|
452
|
+
{
|
453
|
+
var borderColorAttr = element.getAttribute( 'borderColor' ),
|
454
|
+
borderColorStyle = element.getStyle( 'border-color' );
|
455
|
+
|
456
|
+
this.setValue( borderColorStyle || borderColorAttr );
|
457
|
+
},
|
458
|
+
commit : function( selectedCell )
|
459
|
+
{
|
460
|
+
var value = this.getValue();
|
461
|
+
if ( value )
|
462
|
+
selectedCell.setStyle( 'border-color', this.getValue() );
|
463
|
+
else
|
464
|
+
selectedCell.removeStyle( 'border-color' );
|
465
|
+
|
466
|
+
selectedCell.removeAttribute( 'borderColor');
|
467
|
+
}
|
468
|
+
},
|
469
|
+
{
|
470
|
+
type : 'button',
|
471
|
+
id : 'borderColorChoose',
|
472
|
+
"class" : 'colorChooser',
|
473
|
+
label : langCell.chooseColor,
|
474
|
+
style : ( rtl ? 'margin-right' : 'margin-left' ) + ': 10px',
|
475
|
+
onLoad : function()
|
476
|
+
{
|
477
|
+
// Stick the element to the bottom (#5587)
|
478
|
+
this.getElement().getParent().setStyle( 'vertical-align', 'bottom' );
|
479
|
+
},
|
480
|
+
onClick : function()
|
481
|
+
{
|
482
|
+
var self = this;
|
483
|
+
getDialogValue( 'colordialog', function( colorDialog )
|
484
|
+
{
|
485
|
+
self.getDialog().getContentElement( 'info', 'borderColor' ).setValue(
|
486
|
+
colorDialog.getContentElement( 'picker', 'selectedColor' ).getValue()
|
487
|
+
);
|
488
|
+
} );
|
489
|
+
}
|
490
|
+
}
|
491
|
+
]
|
492
|
+
}
|
493
|
+
]
|
494
|
+
}
|
495
|
+
]
|
496
|
+
}
|
497
|
+
]
|
498
|
+
}
|
499
|
+
],
|
500
|
+
onShow : function()
|
501
|
+
{
|
502
|
+
this.cells = CKEDITOR.plugins.tabletools.getSelectedCells(
|
503
|
+
this._.editor.getSelection() );
|
504
|
+
this.setupContent( this.cells[ 0 ] );
|
505
|
+
},
|
506
|
+
onOk : function()
|
507
|
+
{
|
508
|
+
var selection = this._.editor.getSelection(),
|
509
|
+
bookmarks = selection.createBookmarks();
|
510
|
+
|
511
|
+
var cells = this.cells;
|
512
|
+
for ( var i = 0 ; i < cells.length ; i++ )
|
513
|
+
this.commitContent( cells[ i ] );
|
514
|
+
|
515
|
+
selection.selectBookmarks( bookmarks );
|
516
|
+
|
517
|
+
// Force selectionChange event because of alignment style.
|
518
|
+
var firstElement = selection.getStartElement();
|
519
|
+
var currentPath = new CKEDITOR.dom.elementPath( firstElement );
|
520
|
+
|
521
|
+
this._.editor._.selectionPreviousPath = currentPath;
|
522
|
+
this._.editor.fire( 'selectionChange', { selection : selection, path : currentPath, element : firstElement } );
|
523
|
+
}
|
524
|
+
};
|
525
|
+
} );
|