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,47 @@
|
|
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
|
+
/**
|
7
|
+
* @fileOverview Plugin definition for the a11yhelp, which provides a dialog
|
8
|
+
* with accessibility related help.
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function()
|
12
|
+
{
|
13
|
+
var pluginName = 'a11yhelp',
|
14
|
+
commandName = 'a11yHelp';
|
15
|
+
|
16
|
+
CKEDITOR.plugins.add( pluginName,
|
17
|
+
{
|
18
|
+
// List of available localizations.
|
19
|
+
availableLangs : { en:1, he:1 },
|
20
|
+
|
21
|
+
init : function( editor )
|
22
|
+
{
|
23
|
+
var plugin = this;
|
24
|
+
editor.addCommand( commandName,
|
25
|
+
{
|
26
|
+
exec : function()
|
27
|
+
{
|
28
|
+
var langCode = editor.langCode;
|
29
|
+
langCode = plugin.availableLangs[ langCode ] ? langCode : 'en';
|
30
|
+
|
31
|
+
CKEDITOR.scriptLoader.load(
|
32
|
+
CKEDITOR.getUrl( plugin.path + 'lang/' + langCode + '.js' ),
|
33
|
+
function()
|
34
|
+
{
|
35
|
+
CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ langCode ] );
|
36
|
+
editor.openDialog( commandName );
|
37
|
+
});
|
38
|
+
},
|
39
|
+
modes : { wysiwyg:1, source:1 },
|
40
|
+
readOnly : 1,
|
41
|
+
canUndo : false
|
42
|
+
});
|
43
|
+
|
44
|
+
CKEDITOR.dialog.add( commandName, this.path + 'dialogs/a11yhelp.js' );
|
45
|
+
}
|
46
|
+
});
|
47
|
+
})();
|
@@ -0,0 +1,129 @@
|
|
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( 'basicstyles',
|
7
|
+
{
|
8
|
+
requires : [ 'styles', 'button' ],
|
9
|
+
|
10
|
+
init : function( editor )
|
11
|
+
{
|
12
|
+
// All buttons use the same code to register. So, to avoid
|
13
|
+
// duplications, let's use this tool function.
|
14
|
+
var addButtonCommand = function( buttonName, buttonLabel, commandName, styleDefiniton )
|
15
|
+
{
|
16
|
+
var style = new CKEDITOR.style( styleDefiniton );
|
17
|
+
|
18
|
+
editor.attachStyleStateChange( style, function( state )
|
19
|
+
{
|
20
|
+
!editor.readOnly && editor.getCommand( commandName ).setState( state );
|
21
|
+
});
|
22
|
+
|
23
|
+
editor.addCommand( commandName, new CKEDITOR.styleCommand( style ) );
|
24
|
+
|
25
|
+
editor.ui.addButton( buttonName,
|
26
|
+
{
|
27
|
+
label : buttonLabel,
|
28
|
+
command : commandName
|
29
|
+
});
|
30
|
+
};
|
31
|
+
|
32
|
+
var config = editor.config,
|
33
|
+
lang = editor.lang;
|
34
|
+
|
35
|
+
addButtonCommand( 'Bold' , lang.bold , 'bold' , config.coreStyles_bold );
|
36
|
+
addButtonCommand( 'Italic' , lang.italic , 'italic' , config.coreStyles_italic );
|
37
|
+
addButtonCommand( 'Underline' , lang.underline , 'underline' , config.coreStyles_underline );
|
38
|
+
addButtonCommand( 'Strike' , lang.strike , 'strike' , config.coreStyles_strike );
|
39
|
+
addButtonCommand( 'Subscript' , lang.subscript , 'subscript' , config.coreStyles_subscript );
|
40
|
+
addButtonCommand( 'Superscript' , lang.superscript , 'superscript' , config.coreStyles_superscript );
|
41
|
+
}
|
42
|
+
});
|
43
|
+
|
44
|
+
// Basic Inline Styles.
|
45
|
+
|
46
|
+
/**
|
47
|
+
* The style definition that applies the <strong>bold</strong> style to the text.
|
48
|
+
* @type Object
|
49
|
+
* @default <code>{ element : 'strong', overrides : 'b' }</code>
|
50
|
+
* @example
|
51
|
+
* config.coreStyles_bold = { element : 'b', overrides : 'strong' };
|
52
|
+
* @example
|
53
|
+
* config.coreStyles_bold =
|
54
|
+
* {
|
55
|
+
* element : 'span',
|
56
|
+
* attributes : { 'class' : 'Bold' }
|
57
|
+
* };
|
58
|
+
*/
|
59
|
+
CKEDITOR.config.coreStyles_bold = { element : 'strong', overrides : 'b' };
|
60
|
+
|
61
|
+
/**
|
62
|
+
* The style definition that applies the <em>italics</em> style to the text.
|
63
|
+
* @type Object
|
64
|
+
* @default <code>{ element : 'em', overrides : 'i' }</code>
|
65
|
+
* @example
|
66
|
+
* config.coreStyles_italic = { element : 'i', overrides : 'em' };
|
67
|
+
* @example
|
68
|
+
* CKEDITOR.config.coreStyles_italic =
|
69
|
+
* {
|
70
|
+
* element : 'span',
|
71
|
+
* attributes : { 'class' : 'Italic' }
|
72
|
+
* };
|
73
|
+
*/
|
74
|
+
CKEDITOR.config.coreStyles_italic = { element : 'em', overrides : 'i' };
|
75
|
+
|
76
|
+
/**
|
77
|
+
* The style definition that applies the <u>underline</u> style to the text.
|
78
|
+
* @type Object
|
79
|
+
* @default <code>{ element : 'u' }</code>
|
80
|
+
* @example
|
81
|
+
* CKEDITOR.config.coreStyles_underline =
|
82
|
+
* {
|
83
|
+
* element : 'span',
|
84
|
+
* attributes : { 'class' : 'Underline' }
|
85
|
+
* };
|
86
|
+
*/
|
87
|
+
CKEDITOR.config.coreStyles_underline = { element : 'u' };
|
88
|
+
|
89
|
+
/**
|
90
|
+
* The style definition that applies the <strike>strike-through</strike> style to the text.
|
91
|
+
* @type Object
|
92
|
+
* @default <code>{ element : 'strike' }</code>
|
93
|
+
* @example
|
94
|
+
* CKEDITOR.config.coreStyles_strike =
|
95
|
+
* {
|
96
|
+
* element : 'span',
|
97
|
+
* attributes : { 'class' : 'StrikeThrough' },
|
98
|
+
* overrides : 'strike'
|
99
|
+
* };
|
100
|
+
*/
|
101
|
+
CKEDITOR.config.coreStyles_strike = { element : 'strike' };
|
102
|
+
|
103
|
+
/**
|
104
|
+
* The style definition that applies the subscript style to the text.
|
105
|
+
* @type Object
|
106
|
+
* @default <code>{ element : 'sub' }</code>
|
107
|
+
* @example
|
108
|
+
* CKEDITOR.config.coreStyles_subscript =
|
109
|
+
* {
|
110
|
+
* element : 'span',
|
111
|
+
* attributes : { 'class' : 'Subscript' },
|
112
|
+
* overrides : 'sub'
|
113
|
+
* };
|
114
|
+
*/
|
115
|
+
CKEDITOR.config.coreStyles_subscript = { element : 'sub' };
|
116
|
+
|
117
|
+
/**
|
118
|
+
* The style definition that applies the superscript style to the text.
|
119
|
+
* @type Object
|
120
|
+
* @default <code>{ element : 'sup' }</code>
|
121
|
+
* @example
|
122
|
+
* CKEDITOR.config.coreStyles_superscript =
|
123
|
+
* {
|
124
|
+
* element : 'span',
|
125
|
+
* attributes : { 'class' : 'Superscript' },
|
126
|
+
* overrides : 'sup'
|
127
|
+
* };
|
128
|
+
*/
|
129
|
+
CKEDITOR.config.coreStyles_superscript = { element : 'sup' };
|
@@ -0,0 +1,290 @@
|
|
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( 'button',
|
7
|
+
{
|
8
|
+
beforeInit : function( editor )
|
9
|
+
{
|
10
|
+
editor.ui.addHandler( CKEDITOR.UI_BUTTON, CKEDITOR.ui.button.handler );
|
11
|
+
}
|
12
|
+
});
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Button UI element.
|
16
|
+
* @constant
|
17
|
+
* @example
|
18
|
+
*/
|
19
|
+
CKEDITOR.UI_BUTTON = 'button';
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Represents a button UI element. This class should not be called directly. To
|
23
|
+
* create new buttons use {@link CKEDITOR.ui.prototype.addButton} instead.
|
24
|
+
* @constructor
|
25
|
+
* @param {Object} definition The button definition.
|
26
|
+
* @example
|
27
|
+
*/
|
28
|
+
CKEDITOR.ui.button = function( definition )
|
29
|
+
{
|
30
|
+
// Copy all definition properties to this object.
|
31
|
+
CKEDITOR.tools.extend( this, definition,
|
32
|
+
// Set defaults.
|
33
|
+
{
|
34
|
+
title : definition.label,
|
35
|
+
className : definition.className || ( definition.command && 'cke_button_' + definition.command ) || '',
|
36
|
+
click : definition.click || function( editor )
|
37
|
+
{
|
38
|
+
editor.execCommand( definition.command );
|
39
|
+
}
|
40
|
+
});
|
41
|
+
|
42
|
+
this._ = {};
|
43
|
+
};
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Transforms a button definition in a {@link CKEDITOR.ui.button} instance.
|
47
|
+
* @type Object
|
48
|
+
* @example
|
49
|
+
*/
|
50
|
+
CKEDITOR.ui.button.handler =
|
51
|
+
{
|
52
|
+
create : function( definition )
|
53
|
+
{
|
54
|
+
return new CKEDITOR.ui.button( definition );
|
55
|
+
}
|
56
|
+
};
|
57
|
+
|
58
|
+
( function()
|
59
|
+
{
|
60
|
+
CKEDITOR.ui.button.prototype =
|
61
|
+
{
|
62
|
+
/**
|
63
|
+
* Renders the button.
|
64
|
+
* @param {CKEDITOR.editor} editor The editor instance which this button is
|
65
|
+
* to be used by.
|
66
|
+
* @param {Array} output The output array to which append the HTML relative
|
67
|
+
* to this button.
|
68
|
+
* @example
|
69
|
+
*/
|
70
|
+
render : function( editor, output )
|
71
|
+
{
|
72
|
+
var env = CKEDITOR.env,
|
73
|
+
id = this._.id = CKEDITOR.tools.getNextId(),
|
74
|
+
classes = '',
|
75
|
+
command = this.command, // Get the command name.
|
76
|
+
clickFn;
|
77
|
+
|
78
|
+
this._.editor = editor;
|
79
|
+
|
80
|
+
var instance =
|
81
|
+
{
|
82
|
+
id : id,
|
83
|
+
button : this,
|
84
|
+
editor : editor,
|
85
|
+
focus : function()
|
86
|
+
{
|
87
|
+
var element = CKEDITOR.document.getById( id );
|
88
|
+
element.focus();
|
89
|
+
},
|
90
|
+
execute : function()
|
91
|
+
{
|
92
|
+
// IE 6 needs some time before execution (#7922)
|
93
|
+
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 )
|
94
|
+
CKEDITOR.tools.setTimeout( function(){ this.button.click( editor ); }, 0, this );
|
95
|
+
else
|
96
|
+
this.button.click( editor );
|
97
|
+
}
|
98
|
+
};
|
99
|
+
|
100
|
+
var keydownFn = CKEDITOR.tools.addFunction( function( ev )
|
101
|
+
{
|
102
|
+
if ( instance.onkey )
|
103
|
+
{
|
104
|
+
ev = new CKEDITOR.dom.event( ev );
|
105
|
+
return ( instance.onkey( instance, ev.getKeystroke() ) !== false );
|
106
|
+
}
|
107
|
+
});
|
108
|
+
|
109
|
+
var focusFn = CKEDITOR.tools.addFunction( function( ev )
|
110
|
+
{
|
111
|
+
var retVal;
|
112
|
+
|
113
|
+
if ( instance.onfocus )
|
114
|
+
retVal = ( instance.onfocus( instance, new CKEDITOR.dom.event( ev ) ) !== false );
|
115
|
+
|
116
|
+
// FF2: prevent focus event been bubbled up to editor container, which caused unexpected editor focus.
|
117
|
+
if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 )
|
118
|
+
ev.preventBubble();
|
119
|
+
return retVal;
|
120
|
+
});
|
121
|
+
|
122
|
+
instance.clickFn = clickFn = CKEDITOR.tools.addFunction( instance.execute, instance );
|
123
|
+
|
124
|
+
|
125
|
+
// Indicate a mode sensitive button.
|
126
|
+
if ( this.modes )
|
127
|
+
{
|
128
|
+
var modeStates = {};
|
129
|
+
|
130
|
+
function updateState()
|
131
|
+
{
|
132
|
+
// "this" is a CKEDITOR.ui.button instance.
|
133
|
+
|
134
|
+
var mode = editor.mode;
|
135
|
+
|
136
|
+
if ( mode )
|
137
|
+
{
|
138
|
+
// Restore saved button state.
|
139
|
+
var state = this.modes[ mode ] ? modeStates[ mode ] != undefined ? modeStates[ mode ] :
|
140
|
+
CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED;
|
141
|
+
|
142
|
+
this.setState( editor.readOnly && !this.readOnly ? CKEDITOR.TRISTATE_DISABLED : state );
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
editor.on( 'beforeModeUnload', function()
|
147
|
+
{
|
148
|
+
if ( editor.mode && this._.state != CKEDITOR.TRISTATE_DISABLED )
|
149
|
+
modeStates[ editor.mode ] = this._.state;
|
150
|
+
}, this );
|
151
|
+
|
152
|
+
editor.on( 'mode', updateState, this);
|
153
|
+
|
154
|
+
// If this button is sensitive to readOnly state, update it accordingly.
|
155
|
+
!this.readOnly && editor.on( 'readOnly', updateState, this);
|
156
|
+
}
|
157
|
+
else if ( command )
|
158
|
+
{
|
159
|
+
// Get the command instance.
|
160
|
+
command = editor.getCommand( command );
|
161
|
+
|
162
|
+
if ( command )
|
163
|
+
{
|
164
|
+
command.on( 'state', function()
|
165
|
+
{
|
166
|
+
this.setState( command.state );
|
167
|
+
}, this);
|
168
|
+
|
169
|
+
classes += 'cke_' + (
|
170
|
+
command.state == CKEDITOR.TRISTATE_ON ? 'on' :
|
171
|
+
command.state == CKEDITOR.TRISTATE_DISABLED ? 'disabled' :
|
172
|
+
'off' );
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
if ( !command )
|
177
|
+
classes += 'cke_off';
|
178
|
+
|
179
|
+
if ( this.className )
|
180
|
+
classes += ' ' + this.className;
|
181
|
+
|
182
|
+
output.push(
|
183
|
+
'<span class="cke_button' + ( this.icon && this.icon.indexOf( '.png' ) == -1 ? ' cke_noalphafix' : '' ) + '">',
|
184
|
+
'<a id="', id, '"' +
|
185
|
+
' class="', classes, '"',
|
186
|
+
env.gecko && env.version >= 10900 && !env.hc ? '' : '" href="javascript:void(\''+ ( this.title || '' ).replace( "'", '' )+ '\')"',
|
187
|
+
' title="', this.title, '"' +
|
188
|
+
' tabindex="-1"' +
|
189
|
+
' hidefocus="true"' +
|
190
|
+
' role="button"' +
|
191
|
+
' aria-labelledby="' + id + '_label"' +
|
192
|
+
( this.hasArrow ? ' aria-haspopup="true"' : '' ) );
|
193
|
+
|
194
|
+
// Some browsers don't cancel key events in the keydown but in the
|
195
|
+
// keypress.
|
196
|
+
// TODO: Check if really needed for Gecko+Mac.
|
197
|
+
if ( env.opera || ( env.gecko && env.mac ) )
|
198
|
+
{
|
199
|
+
output.push(
|
200
|
+
' onkeypress="return false;"' );
|
201
|
+
}
|
202
|
+
|
203
|
+
// With Firefox, we need to force the button to redraw, otherwise it
|
204
|
+
// will remain in the focus state.
|
205
|
+
if ( env.gecko )
|
206
|
+
{
|
207
|
+
output.push(
|
208
|
+
' onblur="this.style.cssText = this.style.cssText;"' );
|
209
|
+
}
|
210
|
+
|
211
|
+
output.push(
|
212
|
+
' onkeydown="return CKEDITOR.tools.callFunction(', keydownFn, ', event);"' +
|
213
|
+
' onfocus="return CKEDITOR.tools.callFunction(', focusFn,', event);" ' +
|
214
|
+
( CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : 'onclick' ) + // #188
|
215
|
+
'="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' +
|
216
|
+
'<span class="cke_icon"' );
|
217
|
+
|
218
|
+
if ( this.icon )
|
219
|
+
{
|
220
|
+
var offset = ( this.iconOffset || 0 ) * -16;
|
221
|
+
output.push( ' style="background-image:url(', CKEDITOR.getUrl( this.icon ), ');background-position:0 ' + offset + 'px;"' );
|
222
|
+
}
|
223
|
+
|
224
|
+
output.push(
|
225
|
+
'> </span>' +
|
226
|
+
'<span id="', id, '_label" class="cke_label">', this.label, '</span>' );
|
227
|
+
|
228
|
+
if ( this.hasArrow )
|
229
|
+
{
|
230
|
+
output.push(
|
231
|
+
'<span class="cke_buttonarrow">'
|
232
|
+
// BLACK DOWN-POINTING TRIANGLE
|
233
|
+
+ ( CKEDITOR.env.hc ? '▼' : ' ' )
|
234
|
+
+ '</span>' );
|
235
|
+
}
|
236
|
+
|
237
|
+
output.push(
|
238
|
+
'</a>',
|
239
|
+
'</span>' );
|
240
|
+
|
241
|
+
if ( this.onRender )
|
242
|
+
this.onRender();
|
243
|
+
|
244
|
+
return instance;
|
245
|
+
},
|
246
|
+
|
247
|
+
setState : function( state )
|
248
|
+
{
|
249
|
+
if ( this._.state == state )
|
250
|
+
return false;
|
251
|
+
|
252
|
+
this._.state = state;
|
253
|
+
|
254
|
+
var element = CKEDITOR.document.getById( this._.id );
|
255
|
+
|
256
|
+
if ( element )
|
257
|
+
{
|
258
|
+
element.setState( state );
|
259
|
+
state == CKEDITOR.TRISTATE_DISABLED ?
|
260
|
+
element.setAttribute( 'aria-disabled', true ) :
|
261
|
+
element.removeAttribute( 'aria-disabled' );
|
262
|
+
|
263
|
+
state == CKEDITOR.TRISTATE_ON ?
|
264
|
+
element.setAttribute( 'aria-pressed', true ) :
|
265
|
+
element.removeAttribute( 'aria-pressed' );
|
266
|
+
|
267
|
+
return true;
|
268
|
+
}
|
269
|
+
else
|
270
|
+
return false;
|
271
|
+
}
|
272
|
+
};
|
273
|
+
|
274
|
+
})();
|
275
|
+
|
276
|
+
/**
|
277
|
+
* Adds a button definition to the UI elements list.
|
278
|
+
* @param {String} name The button name.
|
279
|
+
* @param {Object} definition The button definition.
|
280
|
+
* @example
|
281
|
+
* editorInstance.ui.addButton( 'MyBold',
|
282
|
+
* {
|
283
|
+
* label : 'My Bold',
|
284
|
+
* command : 'bold'
|
285
|
+
* });
|
286
|
+
*/
|
287
|
+
CKEDITOR.ui.prototype.addButton = function( name, definition )
|
288
|
+
{
|
289
|
+
this.add( name, CKEDITOR.UI_BUTTON, definition );
|
290
|
+
};
|