esp-ckeditor 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,379 @@
|
|
|
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( 'esp_link',
|
|
7
|
+
{
|
|
8
|
+
lang: ['en', 'ru', 'uk'],
|
|
9
|
+
init : function( editor )
|
|
10
|
+
{
|
|
11
|
+
// Add the link and unlink buttons.
|
|
12
|
+
editor.addCommand( 'esp_link', new CKEDITOR.dialogCommand( 'esp_link' ) );
|
|
13
|
+
editor.addCommand( 'esp_anchor', new CKEDITOR.dialogCommand( 'esp_anchor' ) );
|
|
14
|
+
editor.addCommand( 'unlink', new CKEDITOR.unlinkCommand() );
|
|
15
|
+
editor.addCommand( 'removeAnchor', new CKEDITOR.removeAnchorCommand() );
|
|
16
|
+
editor.ui.addButton( 'Esp_link',
|
|
17
|
+
{
|
|
18
|
+
label : editor.lang.link.toolbar,
|
|
19
|
+
command : 'esp_link',
|
|
20
|
+
icon: this.path + "images/esp_link.png"
|
|
21
|
+
} );
|
|
22
|
+
editor.ui.addButton( 'Esp_unlink',
|
|
23
|
+
{
|
|
24
|
+
label : editor.lang.unlink,
|
|
25
|
+
command : 'unlink',
|
|
26
|
+
icon: this.path + "images/esp_unlink.png"
|
|
27
|
+
} );
|
|
28
|
+
editor.ui.addButton( 'Esp_anchor',
|
|
29
|
+
{
|
|
30
|
+
label : editor.lang.anchor.toolbar,
|
|
31
|
+
command : 'esp_anchor',
|
|
32
|
+
icon: this.path + "images/esp_anchor.png"
|
|
33
|
+
} );
|
|
34
|
+
CKEDITOR.dialog.add( 'esp_link', this.path + 'dialogs/esp_link.js' );
|
|
35
|
+
CKEDITOR.dialog.add( 'esp_anchor', this.path + 'dialogs/esp_anchor.js' );
|
|
36
|
+
|
|
37
|
+
// Add the CSS styles for anchor placeholders.
|
|
38
|
+
|
|
39
|
+
var side = ( editor.lang.dir == 'rtl' ? 'right' : 'left' );
|
|
40
|
+
var basicCss =
|
|
41
|
+
'background:url(' + CKEDITOR.getUrl( this.path + 'images/anchor.png' ) + ') no-repeat ' + side + ' center;' +
|
|
42
|
+
'border:1px dotted #00f;';
|
|
43
|
+
|
|
44
|
+
editor.addCss(
|
|
45
|
+
'a.cke_anchor,a.cke_anchor_empty' +
|
|
46
|
+
// IE6 breaks with the following selectors.
|
|
47
|
+
( ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 ) ? '' :
|
|
48
|
+
',a[name],a[data-cke-saved-name]' ) +
|
|
49
|
+
'{' +
|
|
50
|
+
basicCss +
|
|
51
|
+
'padding-' + side + ':18px;' +
|
|
52
|
+
// Show the arrow cursor for the anchor image (FF at least).
|
|
53
|
+
'cursor:auto;' +
|
|
54
|
+
'}' +
|
|
55
|
+
( CKEDITOR.env.ie ? (
|
|
56
|
+
'a.cke_anchor_empty' +
|
|
57
|
+
'{' +
|
|
58
|
+
// Make empty anchor selectable on IE.
|
|
59
|
+
'display:inline-block;' +
|
|
60
|
+
'}'
|
|
61
|
+
) : '' ) +
|
|
62
|
+
'img.cke_anchor' +
|
|
63
|
+
'{' +
|
|
64
|
+
basicCss +
|
|
65
|
+
'width:16px;' +
|
|
66
|
+
'min-height:15px;' +
|
|
67
|
+
// The default line-height on IE.
|
|
68
|
+
'height:1.15em;' +
|
|
69
|
+
// Opera works better with "middle" (even if not perfect)
|
|
70
|
+
'vertical-align:' + ( CKEDITOR.env.opera ? 'middle' : 'text-bottom' ) + ';' +
|
|
71
|
+
'}');
|
|
72
|
+
|
|
73
|
+
// Register selection change handler for the unlink button.
|
|
74
|
+
editor.on( 'selectionChange', function( evt )
|
|
75
|
+
{
|
|
76
|
+
if ( editor.readOnly )
|
|
77
|
+
return;
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
* Despite our initial hope, document.queryCommandEnabled() does not work
|
|
81
|
+
* for this in Firefox. So we must detect the state by element paths.
|
|
82
|
+
*/
|
|
83
|
+
var command = editor.getCommand( 'unlink' ),
|
|
84
|
+
element = evt.data.path.lastElement && evt.data.path.lastElement.getAscendant( 'a', true );
|
|
85
|
+
if ( element && element.getName() == 'a' && element.getAttribute( 'href' ) && element.getChildCount() )
|
|
86
|
+
command.setState( CKEDITOR.TRISTATE_OFF );
|
|
87
|
+
else
|
|
88
|
+
command.setState( CKEDITOR.TRISTATE_DISABLED );
|
|
89
|
+
} );
|
|
90
|
+
|
|
91
|
+
editor.on( 'doubleclick', function( evt )
|
|
92
|
+
{
|
|
93
|
+
var element = CKEDITOR.plugins.esp_link.getSelectedLink( editor ) || evt.data.element;
|
|
94
|
+
|
|
95
|
+
if ( !element.isReadOnly() )
|
|
96
|
+
{
|
|
97
|
+
if ( element.is( 'a' ) )
|
|
98
|
+
{
|
|
99
|
+
evt.data.dialog = ( element.getAttribute( 'name' ) && ( !element.getAttribute( 'href' ) || !element.getChildCount() ) ) ? 'anchor' : 'link';
|
|
100
|
+
editor.getSelection().selectElement( element );
|
|
101
|
+
}
|
|
102
|
+
else if ( CKEDITOR.plugins.esp_link.tryRestoreFakeAnchor( editor, element ) )
|
|
103
|
+
evt.data.dialog = 'anchor';
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// If the "menu" plugin is loaded, register the menu items.
|
|
108
|
+
if ( editor.addMenuItems )
|
|
109
|
+
{
|
|
110
|
+
editor.addMenuItems(
|
|
111
|
+
{
|
|
112
|
+
anchor :
|
|
113
|
+
{
|
|
114
|
+
label : editor.lang.anchor.menu,
|
|
115
|
+
command : 'anchor',
|
|
116
|
+
group : 'anchor',
|
|
117
|
+
order : 1
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
removeAnchor :
|
|
121
|
+
{
|
|
122
|
+
label : editor.lang.anchor.remove,
|
|
123
|
+
command : 'removeAnchor',
|
|
124
|
+
group : 'anchor',
|
|
125
|
+
order : 5
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
link :
|
|
129
|
+
{
|
|
130
|
+
label : editor.lang.link.menu,
|
|
131
|
+
command : 'link',
|
|
132
|
+
group : 'link',
|
|
133
|
+
order : 1
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
unlink :
|
|
137
|
+
{
|
|
138
|
+
label : editor.lang.unlink,
|
|
139
|
+
command : 'unlink',
|
|
140
|
+
group : 'link',
|
|
141
|
+
order : 5
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// If the "contextmenu" plugin is loaded, register the listeners.
|
|
147
|
+
if ( editor.contextMenu )
|
|
148
|
+
{
|
|
149
|
+
editor.contextMenu.addListener( function( element, selection )
|
|
150
|
+
{
|
|
151
|
+
if ( !element || element.isReadOnly() )
|
|
152
|
+
return null;
|
|
153
|
+
|
|
154
|
+
var anchor = CKEDITOR.plugins.esp_link.tryRestoreFakeAnchor( editor, element );
|
|
155
|
+
|
|
156
|
+
if ( !anchor && !( anchor = CKEDITOR.plugins.esp_link.getSelectedLink( editor ) ) )
|
|
157
|
+
return null;
|
|
158
|
+
|
|
159
|
+
var menu = {};
|
|
160
|
+
|
|
161
|
+
if ( anchor.getAttribute( 'href' ) && anchor.getChildCount() )
|
|
162
|
+
menu = { link : CKEDITOR.TRISTATE_OFF, unlink : CKEDITOR.TRISTATE_OFF };
|
|
163
|
+
|
|
164
|
+
if ( anchor && anchor.hasAttribute( 'name' ) )
|
|
165
|
+
menu.anchor = menu.removeAnchor = CKEDITOR.TRISTATE_OFF;
|
|
166
|
+
|
|
167
|
+
return menu;
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
afterInit : function( editor )
|
|
173
|
+
{
|
|
174
|
+
// Register a filter to displaying placeholders after mode change.
|
|
175
|
+
|
|
176
|
+
var dataProcessor = editor.dataProcessor,
|
|
177
|
+
dataFilter = dataProcessor && dataProcessor.dataFilter,
|
|
178
|
+
htmlFilter = dataProcessor && dataProcessor.htmlFilter,
|
|
179
|
+
pathFilters = editor._.elementsPath && editor._.elementsPath.filters;
|
|
180
|
+
|
|
181
|
+
if ( dataFilter )
|
|
182
|
+
{
|
|
183
|
+
dataFilter.addRules(
|
|
184
|
+
{
|
|
185
|
+
elements :
|
|
186
|
+
{
|
|
187
|
+
a : function( element )
|
|
188
|
+
{
|
|
189
|
+
var attributes = element.attributes;
|
|
190
|
+
if ( !attributes.name )
|
|
191
|
+
return null;
|
|
192
|
+
|
|
193
|
+
var isEmpty = !element.children.length;
|
|
194
|
+
|
|
195
|
+
if ( CKEDITOR.plugins.esp_link.synAnchorSelector )
|
|
196
|
+
{
|
|
197
|
+
// IE needs a specific class name to be applied
|
|
198
|
+
// to the anchors, for appropriate styling.
|
|
199
|
+
var ieClass = isEmpty ? 'cke_anchor_empty' : 'cke_anchor';
|
|
200
|
+
var cls = attributes[ 'class' ];
|
|
201
|
+
if ( attributes.name && ( !cls || cls.indexOf( ieClass ) < 0 ) )
|
|
202
|
+
attributes[ 'class' ] = ( cls || '' ) + ' ' + ieClass;
|
|
203
|
+
|
|
204
|
+
if ( isEmpty && CKEDITOR.plugins.esp_link.emptyAnchorFix )
|
|
205
|
+
{
|
|
206
|
+
attributes.contenteditable = 'false';
|
|
207
|
+
attributes[ 'data-cke-editable' ] = 1;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
else if ( CKEDITOR.plugins.esp_link.fakeAnchor && isEmpty )
|
|
211
|
+
return editor.createFakeParserElement( element, 'cke_anchor', 'anchor' );
|
|
212
|
+
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if ( CKEDITOR.plugins.esp_link.emptyAnchorFix && htmlFilter )
|
|
220
|
+
{
|
|
221
|
+
htmlFilter.addRules(
|
|
222
|
+
{
|
|
223
|
+
elements :
|
|
224
|
+
{
|
|
225
|
+
a : function( element )
|
|
226
|
+
{
|
|
227
|
+
delete element.attributes.contenteditable;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if ( pathFilters )
|
|
234
|
+
{
|
|
235
|
+
pathFilters.push( function( element, name )
|
|
236
|
+
{
|
|
237
|
+
if ( name == 'a' )
|
|
238
|
+
{
|
|
239
|
+
if ( CKEDITOR.plugins.esp_link.tryRestoreFakeAnchor( editor, element ) ||
|
|
240
|
+
( element.getAttribute( 'name' ) && ( !element.getAttribute( 'href' ) || !element.getChildCount() ) ) )
|
|
241
|
+
{
|
|
242
|
+
return 'anchor';
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
|
|
249
|
+
requires : [ 'fakeobjects' ]
|
|
250
|
+
} );
|
|
251
|
+
|
|
252
|
+
CKEDITOR.plugins.esp_link =
|
|
253
|
+
{
|
|
254
|
+
/**
|
|
255
|
+
* Get the surrounding link element of current selection.
|
|
256
|
+
* @param editor
|
|
257
|
+
* @example CKEDITOR.plugins.link.getSelectedLink( editor );
|
|
258
|
+
* @since 3.2.1
|
|
259
|
+
* The following selection will all return the link element.
|
|
260
|
+
* <pre>
|
|
261
|
+
* <a href="#">li^nk</a>
|
|
262
|
+
* <a href="#">[link]</a>
|
|
263
|
+
* text[<a href="#">link]</a>
|
|
264
|
+
* <a href="#">li[nk</a>]
|
|
265
|
+
* [<b><a href="#">li]nk</a></b>]
|
|
266
|
+
* [<a href="#"><b>li]nk</b></a>
|
|
267
|
+
* </pre>
|
|
268
|
+
*/
|
|
269
|
+
getSelectedLink : function( editor )
|
|
270
|
+
{
|
|
271
|
+
try
|
|
272
|
+
{
|
|
273
|
+
var selection = editor.getSelection();
|
|
274
|
+
if ( selection.getType() == CKEDITOR.SELECTION_ELEMENT )
|
|
275
|
+
{
|
|
276
|
+
var selectedElement = selection.getSelectedElement();
|
|
277
|
+
if ( selectedElement.is( 'a' ) )
|
|
278
|
+
return selectedElement;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
var range = selection.getRanges( true )[ 0 ];
|
|
282
|
+
range.shrink( CKEDITOR.SHRINK_TEXT );
|
|
283
|
+
var root = range.getCommonAncestor();
|
|
284
|
+
return root.getAscendant( 'a', true );
|
|
285
|
+
}
|
|
286
|
+
catch( e ) { return null; }
|
|
287
|
+
},
|
|
288
|
+
|
|
289
|
+
// Opera and WebKit don't make it possible to select empty anchors. Fake
|
|
290
|
+
// elements must be used for them.
|
|
291
|
+
fakeAnchor : CKEDITOR.env.opera || CKEDITOR.env.webkit,
|
|
292
|
+
|
|
293
|
+
// For browsers that don't support CSS3 a[name]:empty(), note IE9 is included because of #7783.
|
|
294
|
+
synAnchorSelector : CKEDITOR.env.ie,
|
|
295
|
+
|
|
296
|
+
// For browsers that have editing issue with empty anchor.
|
|
297
|
+
emptyAnchorFix : CKEDITOR.env.ie && CKEDITOR.env.version < 8,
|
|
298
|
+
|
|
299
|
+
tryRestoreFakeAnchor : function( editor, element )
|
|
300
|
+
{
|
|
301
|
+
if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'anchor' )
|
|
302
|
+
{
|
|
303
|
+
var link = editor.restoreRealElement( element );
|
|
304
|
+
if ( link.data( 'cke-saved-name' ) )
|
|
305
|
+
return link;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
CKEDITOR.unlinkCommand = function(){};
|
|
311
|
+
CKEDITOR.unlinkCommand.prototype =
|
|
312
|
+
{
|
|
313
|
+
/** @ignore */
|
|
314
|
+
exec : function( editor )
|
|
315
|
+
{
|
|
316
|
+
/*
|
|
317
|
+
* execCommand( 'unlink', ... ) in Firefox leaves behind <span> tags at where
|
|
318
|
+
* the <a> was, so again we have to remove the link ourselves. (See #430)
|
|
319
|
+
*
|
|
320
|
+
* TODO: Use the style system when it's complete. Let's use execCommand()
|
|
321
|
+
* as a stopgap solution for now.
|
|
322
|
+
*/
|
|
323
|
+
var selection = editor.getSelection(),
|
|
324
|
+
bookmarks = selection.createBookmarks(),
|
|
325
|
+
ranges = selection.getRanges(),
|
|
326
|
+
rangeRoot,
|
|
327
|
+
element;
|
|
328
|
+
|
|
329
|
+
for ( var i = 0 ; i < ranges.length ; i++ )
|
|
330
|
+
{
|
|
331
|
+
rangeRoot = ranges[i].getCommonAncestor( true );
|
|
332
|
+
element = rangeRoot.getAscendant( 'a', true );
|
|
333
|
+
if ( !element )
|
|
334
|
+
continue;
|
|
335
|
+
ranges[i].selectNodeContents( element );
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
selection.selectRanges( ranges );
|
|
339
|
+
editor.document.$.execCommand( 'unlink', false, null );
|
|
340
|
+
selection.selectBookmarks( bookmarks );
|
|
341
|
+
},
|
|
342
|
+
|
|
343
|
+
startDisabled : true
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
CKEDITOR.removeAnchorCommand = function(){};
|
|
347
|
+
CKEDITOR.removeAnchorCommand.prototype =
|
|
348
|
+
{
|
|
349
|
+
/** @ignore */
|
|
350
|
+
exec : function( editor )
|
|
351
|
+
{
|
|
352
|
+
var sel = editor.getSelection(),
|
|
353
|
+
bms = sel.createBookmarks(),
|
|
354
|
+
anchor;
|
|
355
|
+
if ( sel && ( anchor = sel.getSelectedElement() ) && ( CKEDITOR.plugins.esp_link.fakeAnchor && !anchor.getChildCount() ? CKEDITOR.plugins.esp_link.tryRestoreFakeAnchor( editor, anchor ) : anchor.is( 'a' ) ) )
|
|
356
|
+
anchor.remove( 1 );
|
|
357
|
+
else
|
|
358
|
+
{
|
|
359
|
+
if ( ( anchor = CKEDITOR.plugins.esp_link.getSelectedLink( editor ) ) )
|
|
360
|
+
{
|
|
361
|
+
if ( anchor.hasAttribute( 'href' ) )
|
|
362
|
+
{
|
|
363
|
+
anchor.removeAttributes( { name : 1, 'data-cke-saved-name' : 1 } );
|
|
364
|
+
anchor.removeClass( 'cke_anchor' );
|
|
365
|
+
}
|
|
366
|
+
else
|
|
367
|
+
anchor.remove( 1 );
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
sel.selectBookmarks( bms );
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
CKEDITOR.tools.extend( CKEDITOR.config,
|
|
375
|
+
{
|
|
376
|
+
linkShowAdvancedTab : true,
|
|
377
|
+
linkShowTargetTab : true
|
|
378
|
+
} );
|
|
379
|
+
|
data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_address.png
ADDED
|
Binary file
|
data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_blockquote.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/esp_showblocks.png
ADDED
|
Binary file
|
|
@@ -0,0 +1,163 @@
|
|
|
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 The "showblocks" plugin. Enable it will make all block level
|
|
8
|
+
* elements being decorated with a border and the element name
|
|
9
|
+
* displayed on the left-right corner.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
(function()
|
|
13
|
+
{
|
|
14
|
+
var cssTemplate = '.%2 p,'+
|
|
15
|
+
'.%2 div,'+
|
|
16
|
+
'.%2 pre,'+
|
|
17
|
+
'.%2 address,'+
|
|
18
|
+
'.%2 blockquote,'+
|
|
19
|
+
'.%2 h1,'+
|
|
20
|
+
'.%2 h2,'+
|
|
21
|
+
'.%2 h3,'+
|
|
22
|
+
'.%2 h4,'+
|
|
23
|
+
'.%2 h5,'+
|
|
24
|
+
'.%2 h6'+
|
|
25
|
+
'{'+
|
|
26
|
+
'background-repeat: no-repeat;'+
|
|
27
|
+
'background-position: top %3;'+
|
|
28
|
+
'border: 1px dotted gray;'+
|
|
29
|
+
'padding-top: 8px;'+
|
|
30
|
+
'padding-bottom: 8px;'+
|
|
31
|
+
'padding-%3: 8px;'+
|
|
32
|
+
'}'+
|
|
33
|
+
|
|
34
|
+
'.%2 p'+
|
|
35
|
+
'{'+
|
|
36
|
+
'%1p.png);'+
|
|
37
|
+
'}'+
|
|
38
|
+
|
|
39
|
+
'.%2 div'+
|
|
40
|
+
'{'+
|
|
41
|
+
'%1div.png);'+
|
|
42
|
+
'}'+
|
|
43
|
+
|
|
44
|
+
'.%2 pre'+
|
|
45
|
+
'{'+
|
|
46
|
+
'%1pre.png);'+
|
|
47
|
+
'}'+
|
|
48
|
+
|
|
49
|
+
'.%2 address'+
|
|
50
|
+
'{'+
|
|
51
|
+
'%1address.png);'+
|
|
52
|
+
'}'+
|
|
53
|
+
|
|
54
|
+
'.%2 blockquote'+
|
|
55
|
+
'{'+
|
|
56
|
+
'%1blockquote.png);'+
|
|
57
|
+
'}'+
|
|
58
|
+
|
|
59
|
+
'.%2 h1'+
|
|
60
|
+
'{'+
|
|
61
|
+
'%1h1.png);'+
|
|
62
|
+
'}'+
|
|
63
|
+
|
|
64
|
+
'.%2 h2'+
|
|
65
|
+
'{'+
|
|
66
|
+
'%1h2.png);'+
|
|
67
|
+
'}'+
|
|
68
|
+
|
|
69
|
+
'.%2 h3'+
|
|
70
|
+
'{'+
|
|
71
|
+
'%1h3.png);'+
|
|
72
|
+
'}'+
|
|
73
|
+
|
|
74
|
+
'.%2 h4'+
|
|
75
|
+
'{'+
|
|
76
|
+
'%1h4.png);'+
|
|
77
|
+
'}'+
|
|
78
|
+
|
|
79
|
+
'.%2 h5'+
|
|
80
|
+
'{'+
|
|
81
|
+
'%1h5.png);'+
|
|
82
|
+
'}'+
|
|
83
|
+
|
|
84
|
+
'.%2 h6'+
|
|
85
|
+
'{'+
|
|
86
|
+
'%1h6.png);'+
|
|
87
|
+
'}';
|
|
88
|
+
|
|
89
|
+
var cssTemplateRegex = /%1/g, cssClassRegex = /%2/g, backgroundPositionRegex = /%3/g;
|
|
90
|
+
|
|
91
|
+
var commandDefinition =
|
|
92
|
+
{
|
|
93
|
+
readOnly : 1,
|
|
94
|
+
preserveState : true,
|
|
95
|
+
editorFocus : false,
|
|
96
|
+
|
|
97
|
+
exec : function ( editor )
|
|
98
|
+
{
|
|
99
|
+
this.toggleState();
|
|
100
|
+
this.refresh( editor );
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
refresh : function( editor )
|
|
104
|
+
{
|
|
105
|
+
if ( editor.document )
|
|
106
|
+
{
|
|
107
|
+
var funcName = ( this.state == CKEDITOR.TRISTATE_ON ) ? 'addClass' : 'removeClass';
|
|
108
|
+
editor.document.getBody()[ funcName ]( 'cke_show_blocks' );
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
CKEDITOR.plugins.add( 'esp_showblocks',
|
|
114
|
+
{
|
|
115
|
+
requires : [ 'wysiwygarea' ],
|
|
116
|
+
|
|
117
|
+
init : function( editor )
|
|
118
|
+
{
|
|
119
|
+
var command = editor.addCommand( 'esp_showblocks', commandDefinition );
|
|
120
|
+
command.canUndo = false;
|
|
121
|
+
|
|
122
|
+
if ( editor.config.startupOutlineBlocks )
|
|
123
|
+
command.setState( CKEDITOR.TRISTATE_ON );
|
|
124
|
+
|
|
125
|
+
editor.addCss( cssTemplate
|
|
126
|
+
.replace( cssTemplateRegex, 'background-image: url(' + CKEDITOR.getUrl( this.path ) + 'images/block_' )
|
|
127
|
+
.replace( cssClassRegex, 'cke_show_blocks ' )
|
|
128
|
+
.replace( backgroundPositionRegex, editor.lang.dir == 'rtl' ? 'right' : 'left' ) );
|
|
129
|
+
|
|
130
|
+
editor.ui.addButton( 'Esp_ShowBlocks',
|
|
131
|
+
{
|
|
132
|
+
label : editor.lang.esp_showBlocks,
|
|
133
|
+
command : 'esp_showblocks',
|
|
134
|
+
icon : this.path + 'images/esp_showblocks.png'
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// Refresh the command on setData.
|
|
138
|
+
editor.on( 'mode', function()
|
|
139
|
+
{
|
|
140
|
+
if ( command.state != CKEDITOR.TRISTATE_DISABLED )
|
|
141
|
+
command.refresh( editor );
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// Refresh the command on setData.
|
|
145
|
+
editor.on( 'contentDom', function()
|
|
146
|
+
{
|
|
147
|
+
if ( command.state != CKEDITOR.TRISTATE_DISABLED )
|
|
148
|
+
command.refresh( editor );
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
} )();
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Whether to automaticaly enable the "show block" command when the editor
|
|
156
|
+
* loads. (StartupShowBlocks in FCKeditor)
|
|
157
|
+
* @name CKEDITOR.config.startupOutlineBlocks
|
|
158
|
+
* @type Boolean
|
|
159
|
+
* @default false
|
|
160
|
+
* @example
|
|
161
|
+
* config.startupOutlineBlocks = true;
|
|
162
|
+
*/
|
|
163
|
+
|