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
|
@@ -0,0 +1,141 @@
|
|
|
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
|
+
(function()
|
|
6
|
+
{
|
|
7
|
+
function forceHtmlMode( evt ) { evt.data.mode = 'html'; }
|
|
8
|
+
|
|
9
|
+
CKEDITOR.plugins.add( 'pastefromword',
|
|
10
|
+
{
|
|
11
|
+
init : function( editor )
|
|
12
|
+
{
|
|
13
|
+
|
|
14
|
+
// Flag indicate this command is actually been asked instead of a generic
|
|
15
|
+
// pasting.
|
|
16
|
+
var forceFromWord = 0;
|
|
17
|
+
var resetFromWord = function( evt )
|
|
18
|
+
{
|
|
19
|
+
evt && evt.removeListener();
|
|
20
|
+
editor.removeListener( 'beforePaste', forceHtmlMode );
|
|
21
|
+
forceFromWord && setTimeout( function() { forceFromWord = 0; }, 0 );
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// Features bring by this command beside the normal process:
|
|
25
|
+
// 1. No more bothering of user about the clean-up.
|
|
26
|
+
// 2. Perform the clean-up even if content is not from MS-Word.
|
|
27
|
+
// (e.g. from a MS-Word similar application.)
|
|
28
|
+
editor.addCommand( 'pastefromword',
|
|
29
|
+
{
|
|
30
|
+
canUndo : false,
|
|
31
|
+
exec : function()
|
|
32
|
+
{
|
|
33
|
+
// Ensure the received data format is HTML and apply content filtering. (#6718)
|
|
34
|
+
forceFromWord = 1;
|
|
35
|
+
editor.on( 'beforePaste', forceHtmlMode );
|
|
36
|
+
|
|
37
|
+
if ( editor.execCommand( 'paste', 'html' ) === false )
|
|
38
|
+
{
|
|
39
|
+
editor.on( 'dialogShow', function ( evt )
|
|
40
|
+
{
|
|
41
|
+
evt.removeListener();
|
|
42
|
+
evt.data.on( 'cancel', resetFromWord );
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
editor.on( 'dialogHide', function( evt )
|
|
46
|
+
{
|
|
47
|
+
evt.data.removeListener( 'cancel', resetFromWord );
|
|
48
|
+
} );
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
editor.on( 'afterPaste', resetFromWord );
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Register the toolbar button.
|
|
56
|
+
editor.ui.addButton( 'PasteFromWord',
|
|
57
|
+
{
|
|
58
|
+
label : editor.lang.pastefromword.toolbar,
|
|
59
|
+
command : 'pastefromword'
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
editor.on( 'pasteState', function( evt )
|
|
63
|
+
{
|
|
64
|
+
editor.getCommand( 'pastefromword' ).setState( evt.data );
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
editor.on( 'paste', function( evt )
|
|
68
|
+
{
|
|
69
|
+
var data = evt.data,
|
|
70
|
+
mswordHtml;
|
|
71
|
+
|
|
72
|
+
// MS-WORD format sniffing.
|
|
73
|
+
if ( ( mswordHtml = data[ 'html' ] )
|
|
74
|
+
&& ( forceFromWord || ( /(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/ ).test( mswordHtml ) ) )
|
|
75
|
+
{
|
|
76
|
+
var isLazyLoad = this.loadFilterRules( function()
|
|
77
|
+
{
|
|
78
|
+
// Event continuation with the original data.
|
|
79
|
+
if ( isLazyLoad )
|
|
80
|
+
editor.fire( 'paste', data );
|
|
81
|
+
else if ( !editor.config.pasteFromWordPromptCleanup
|
|
82
|
+
|| ( forceFromWord || confirm( editor.lang.pastefromword.confirmCleanup ) ) )
|
|
83
|
+
{
|
|
84
|
+
data[ 'html' ] = CKEDITOR.cleanWord( mswordHtml, editor );
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// The cleanup rules are to be loaded, we should just cancel
|
|
89
|
+
// this event.
|
|
90
|
+
isLazyLoad && evt.cancel();
|
|
91
|
+
}
|
|
92
|
+
}, this );
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
loadFilterRules : function( callback )
|
|
96
|
+
{
|
|
97
|
+
|
|
98
|
+
var isLoaded = CKEDITOR.cleanWord;
|
|
99
|
+
|
|
100
|
+
if ( isLoaded )
|
|
101
|
+
callback();
|
|
102
|
+
else
|
|
103
|
+
{
|
|
104
|
+
var filterFilePath = CKEDITOR.getUrl(
|
|
105
|
+
CKEDITOR.config.pasteFromWordCleanupFile
|
|
106
|
+
|| ( this.path + 'filter/default.js' ) );
|
|
107
|
+
|
|
108
|
+
// Load with busy indicator.
|
|
109
|
+
CKEDITOR.scriptLoader.load( filterFilePath, callback, null, true );
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return !isLoaded;
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
requires : [ 'clipboard' ]
|
|
116
|
+
});
|
|
117
|
+
})();
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Whether to prompt the user about the clean up of content being pasted from
|
|
121
|
+
* MS Word.
|
|
122
|
+
* @name CKEDITOR.config.pasteFromWordPromptCleanup
|
|
123
|
+
* @since 3.1
|
|
124
|
+
* @type Boolean
|
|
125
|
+
* @default undefined
|
|
126
|
+
* @example
|
|
127
|
+
* config.pasteFromWordPromptCleanup = true;
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The file that provides the MS Word cleanup function for pasting operations.
|
|
132
|
+
* Note: This is a global configuration shared by all editor instances present
|
|
133
|
+
* in the page.
|
|
134
|
+
* @name CKEDITOR.config.pasteFromWordCleanupFile
|
|
135
|
+
* @since 3.1
|
|
136
|
+
* @type String
|
|
137
|
+
* @default 'default'
|
|
138
|
+
* @example
|
|
139
|
+
* // Load from 'pastefromword' plugin 'filter' sub folder (custom.js file).
|
|
140
|
+
* CKEDITOR.config.pasteFromWordCleanupFile = 'custom';
|
|
141
|
+
*/
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
(function()
|
|
7
|
+
{
|
|
8
|
+
CKEDITOR.dialog.add( 'pastetext', function( editor )
|
|
9
|
+
{
|
|
10
|
+
return {
|
|
11
|
+
title : editor.lang.pasteText.title,
|
|
12
|
+
|
|
13
|
+
minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 368 : 350,
|
|
14
|
+
minHeight : 240,
|
|
15
|
+
|
|
16
|
+
onShow : function(){ this.setupContent(); },
|
|
17
|
+
onOk : function(){ this.commitContent(); },
|
|
18
|
+
|
|
19
|
+
contents :
|
|
20
|
+
[
|
|
21
|
+
{
|
|
22
|
+
label : editor.lang.common.generalTab,
|
|
23
|
+
id : 'general',
|
|
24
|
+
elements :
|
|
25
|
+
[
|
|
26
|
+
{
|
|
27
|
+
type : 'html',
|
|
28
|
+
id : 'pasteMsg',
|
|
29
|
+
html : '<div style="white-space:normal;width:340px;">' + editor.lang.clipboard.pasteMsg + '</div>'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type : 'textarea',
|
|
33
|
+
id : 'content',
|
|
34
|
+
className : 'cke_pastetext',
|
|
35
|
+
|
|
36
|
+
onLoad : function()
|
|
37
|
+
{
|
|
38
|
+
var label = this.getDialog().getContentElement( 'general', 'pasteMsg' ).getElement(),
|
|
39
|
+
input = this.getElement().getElementsByTag( 'textarea' ).getItem( 0 );
|
|
40
|
+
|
|
41
|
+
input.setAttribute( 'aria-labelledby', label.$.id );
|
|
42
|
+
input.setStyle( 'direction', editor.config.contentsLangDirection );
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
focus : function()
|
|
46
|
+
{
|
|
47
|
+
this.getElement().focus();
|
|
48
|
+
},
|
|
49
|
+
setup : function()
|
|
50
|
+
{
|
|
51
|
+
this.setValue( '' );
|
|
52
|
+
},
|
|
53
|
+
commit : function()
|
|
54
|
+
{
|
|
55
|
+
var value = this.getValue();
|
|
56
|
+
setTimeout( function()
|
|
57
|
+
{
|
|
58
|
+
editor.fire( 'paste', { 'text' : value } );
|
|
59
|
+
}, 0 );
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
})();
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
* @file Paste as plain text plugin
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
(function()
|
|
11
|
+
{
|
|
12
|
+
// The pastetext command definition.
|
|
13
|
+
var pasteTextCmd =
|
|
14
|
+
{
|
|
15
|
+
exec : function( editor )
|
|
16
|
+
{
|
|
17
|
+
var clipboardText = CKEDITOR.tools.tryThese(
|
|
18
|
+
function()
|
|
19
|
+
{
|
|
20
|
+
var clipboardText = window.clipboardData.getData( 'Text' );
|
|
21
|
+
if ( !clipboardText )
|
|
22
|
+
throw 0;
|
|
23
|
+
return clipboardText;
|
|
24
|
+
}
|
|
25
|
+
// Any other approach that's working...
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
if ( !clipboardText ) // Clipboard access privilege is not granted.
|
|
29
|
+
{
|
|
30
|
+
editor.openDialog( 'pastetext' );
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
else
|
|
34
|
+
editor.fire( 'paste', { 'text' : clipboardText } );
|
|
35
|
+
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// Register the plugin.
|
|
41
|
+
CKEDITOR.plugins.add( 'pastetext',
|
|
42
|
+
{
|
|
43
|
+
init : function( editor )
|
|
44
|
+
{
|
|
45
|
+
var commandName = 'pastetext',
|
|
46
|
+
command = editor.addCommand( commandName, pasteTextCmd );
|
|
47
|
+
|
|
48
|
+
editor.ui.addButton( 'PasteText',
|
|
49
|
+
{
|
|
50
|
+
label : editor.lang.pasteText.button,
|
|
51
|
+
command : commandName
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
CKEDITOR.dialog.add( commandName, CKEDITOR.getUrl( this.path + 'dialogs/pastetext.js' ) );
|
|
55
|
+
|
|
56
|
+
if ( editor.config.forcePasteAsPlainText )
|
|
57
|
+
{
|
|
58
|
+
// Intercept the default pasting process.
|
|
59
|
+
editor.on( 'beforeCommandExec', function ( evt )
|
|
60
|
+
{
|
|
61
|
+
var mode = evt.data.commandData;
|
|
62
|
+
// Do NOT overwrite if HTML format is explicitly requested.
|
|
63
|
+
if ( evt.data.name == 'paste' && mode != 'html' )
|
|
64
|
+
{
|
|
65
|
+
editor.execCommand( 'pastetext' );
|
|
66
|
+
evt.cancel();
|
|
67
|
+
}
|
|
68
|
+
}, null, null, 0 );
|
|
69
|
+
|
|
70
|
+
editor.on( 'beforePaste', function( evt )
|
|
71
|
+
{
|
|
72
|
+
evt.data.mode = 'text';
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
editor.on( 'pasteState', function( evt )
|
|
77
|
+
{
|
|
78
|
+
editor.getCommand( 'pastetext' ).setState( evt.data );
|
|
79
|
+
});
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
requires : [ 'clipboard' ]
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
})();
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Whether to force all pasting operations to insert on plain text into the
|
|
90
|
+
* editor, loosing any formatting information possibly available in the source
|
|
91
|
+
* text.
|
|
92
|
+
* <strong>Note:</strong> paste from word is not affected by this configuration.
|
|
93
|
+
* @name CKEDITOR.config.forcePasteAsPlainText
|
|
94
|
+
* @type Boolean
|
|
95
|
+
* @default false
|
|
96
|
+
* @example
|
|
97
|
+
* config.forcePasteAsPlainText = true;
|
|
98
|
+
*/
|
|
@@ -0,0 +1,64 @@
|
|
|
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( 'popup' );
|
|
7
|
+
|
|
8
|
+
CKEDITOR.tools.extend( CKEDITOR.editor.prototype,
|
|
9
|
+
{
|
|
10
|
+
/**
|
|
11
|
+
* Opens Browser in a popup. The "width" and "height" parameters accept
|
|
12
|
+
* numbers (pixels) or percent (of screen size) values.
|
|
13
|
+
* @param {String} url The url of the external file browser.
|
|
14
|
+
* @param {String} width Popup window width.
|
|
15
|
+
* @param {String} height Popup window height.
|
|
16
|
+
* @param {String} options Popup window features.
|
|
17
|
+
*/
|
|
18
|
+
popup : function( url, width, height, options )
|
|
19
|
+
{
|
|
20
|
+
width = width || '80%';
|
|
21
|
+
height = height || '70%';
|
|
22
|
+
|
|
23
|
+
if ( typeof width == 'string' && width.length > 1 && width.substr( width.length - 1, 1 ) == '%' )
|
|
24
|
+
width = parseInt( window.screen.width * parseInt( width, 10 ) / 100, 10 );
|
|
25
|
+
|
|
26
|
+
if ( typeof height == 'string' && height.length > 1 && height.substr( height.length - 1, 1 ) == '%' )
|
|
27
|
+
height = parseInt( window.screen.height * parseInt( height, 10 ) / 100, 10 );
|
|
28
|
+
|
|
29
|
+
if ( width < 640 )
|
|
30
|
+
width = 640;
|
|
31
|
+
|
|
32
|
+
if ( height < 420 )
|
|
33
|
+
height = 420;
|
|
34
|
+
|
|
35
|
+
var top = parseInt( ( window.screen.height - height ) / 2, 10 ),
|
|
36
|
+
left = parseInt( ( window.screen.width - width ) / 2, 10 );
|
|
37
|
+
|
|
38
|
+
options = ( options || 'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes' ) +
|
|
39
|
+
',width=' + width +
|
|
40
|
+
',height=' + height +
|
|
41
|
+
',top=' + top +
|
|
42
|
+
',left=' + left;
|
|
43
|
+
|
|
44
|
+
var popupWindow = window.open( '', null, options, true );
|
|
45
|
+
|
|
46
|
+
// Blocked by a popup blocker.
|
|
47
|
+
if ( !popupWindow )
|
|
48
|
+
return false;
|
|
49
|
+
|
|
50
|
+
try
|
|
51
|
+
{
|
|
52
|
+
popupWindow.moveTo( left, top );
|
|
53
|
+
popupWindow.resizeTo( width, height );
|
|
54
|
+
popupWindow.focus();
|
|
55
|
+
popupWindow.location.href = url;
|
|
56
|
+
}
|
|
57
|
+
catch ( e )
|
|
58
|
+
{
|
|
59
|
+
popupWindow = window.open( url, null, options, true );
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
@@ -0,0 +1,185 @@
|
|
|
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( 'removeformat',
|
|
7
|
+
{
|
|
8
|
+
requires : [ 'selection' ],
|
|
9
|
+
|
|
10
|
+
init : function( editor )
|
|
11
|
+
{
|
|
12
|
+
editor.addCommand( 'removeFormat', CKEDITOR.plugins.removeformat.commands.removeformat );
|
|
13
|
+
editor.ui.addButton( 'RemoveFormat',
|
|
14
|
+
{
|
|
15
|
+
label : editor.lang.removeFormat,
|
|
16
|
+
command : 'removeFormat'
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
editor._.removeFormat = { filters: [] };
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
CKEDITOR.plugins.removeformat =
|
|
24
|
+
{
|
|
25
|
+
commands :
|
|
26
|
+
{
|
|
27
|
+
removeformat :
|
|
28
|
+
{
|
|
29
|
+
exec : function( editor )
|
|
30
|
+
{
|
|
31
|
+
var tagsRegex = editor._.removeFormatRegex ||
|
|
32
|
+
( editor._.removeFormatRegex = new RegExp( '^(?:' + editor.config.removeFormatTags.replace( /,/g,'|' ) + ')$', 'i' ) );
|
|
33
|
+
|
|
34
|
+
var removeAttributes = editor._.removeAttributes ||
|
|
35
|
+
( editor._.removeAttributes = editor.config.removeFormatAttributes.split( ',' ) );
|
|
36
|
+
|
|
37
|
+
var filter = CKEDITOR.plugins.removeformat.filter;
|
|
38
|
+
var ranges = editor.getSelection().getRanges( 1 ),
|
|
39
|
+
iterator = ranges.createIterator(),
|
|
40
|
+
range;
|
|
41
|
+
|
|
42
|
+
while ( ( range = iterator.getNextRange() ) )
|
|
43
|
+
{
|
|
44
|
+
if ( ! range.collapsed )
|
|
45
|
+
range.enlarge( CKEDITOR.ENLARGE_ELEMENT );
|
|
46
|
+
|
|
47
|
+
// Bookmark the range so we can re-select it after processing.
|
|
48
|
+
var bookmark = range.createBookmark(),
|
|
49
|
+
// The style will be applied within the bookmark boundaries.
|
|
50
|
+
startNode = bookmark.startNode,
|
|
51
|
+
endNode = bookmark.endNode,
|
|
52
|
+
currentNode;
|
|
53
|
+
|
|
54
|
+
// We need to check the selection boundaries (bookmark spans) to break
|
|
55
|
+
// the code in a way that we can properly remove partially selected nodes.
|
|
56
|
+
// For example, removing a <b> style from
|
|
57
|
+
// <b>This is [some text</b> to show <b>the] problem</b>
|
|
58
|
+
// ... where [ and ] represent the selection, must result:
|
|
59
|
+
// <b>This is </b>[some text to show the]<b> problem</b>
|
|
60
|
+
// The strategy is simple, we just break the partial nodes before the
|
|
61
|
+
// removal logic, having something that could be represented this way:
|
|
62
|
+
// <b>This is </b>[<b>some text</b> to show <b>the</b>]<b> problem</b>
|
|
63
|
+
|
|
64
|
+
var breakParent = function( node )
|
|
65
|
+
{
|
|
66
|
+
// Let's start checking the start boundary.
|
|
67
|
+
var path = new CKEDITOR.dom.elementPath( node ),
|
|
68
|
+
pathElements = path.elements;
|
|
69
|
+
|
|
70
|
+
for ( var i = 1, pathElement ; pathElement = pathElements[ i ] ; i++ )
|
|
71
|
+
{
|
|
72
|
+
if ( pathElement.equals( path.block ) || pathElement.equals( path.blockLimit ) )
|
|
73
|
+
break;
|
|
74
|
+
|
|
75
|
+
// If this element can be removed (even partially).
|
|
76
|
+
if ( tagsRegex.test( pathElement.getName() ) && filter( editor, pathElement ) )
|
|
77
|
+
node.breakParent( pathElement );
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
breakParent( startNode );
|
|
82
|
+
if ( endNode )
|
|
83
|
+
{
|
|
84
|
+
breakParent( endNode );
|
|
85
|
+
|
|
86
|
+
// Navigate through all nodes between the bookmarks.
|
|
87
|
+
currentNode = startNode.getNextSourceNode( true, CKEDITOR.NODE_ELEMENT );
|
|
88
|
+
|
|
89
|
+
while ( currentNode )
|
|
90
|
+
{
|
|
91
|
+
// If we have reached the end of the selection, stop looping.
|
|
92
|
+
if ( currentNode.equals( endNode ) )
|
|
93
|
+
break;
|
|
94
|
+
|
|
95
|
+
// Cache the next node to be processed. Do it now, because
|
|
96
|
+
// currentNode may be removed.
|
|
97
|
+
var nextNode = currentNode.getNextSourceNode( false, CKEDITOR.NODE_ELEMENT );
|
|
98
|
+
|
|
99
|
+
// This node must not be a fake element.
|
|
100
|
+
if ( !( currentNode.getName() == 'img'
|
|
101
|
+
&& currentNode.data( 'cke-realelement' ) )
|
|
102
|
+
&& filter( editor, currentNode ) )
|
|
103
|
+
{
|
|
104
|
+
// Remove elements nodes that match with this style rules.
|
|
105
|
+
if ( tagsRegex.test( currentNode.getName() ) )
|
|
106
|
+
currentNode.remove( 1 );
|
|
107
|
+
else
|
|
108
|
+
{
|
|
109
|
+
currentNode.removeAttributes( removeAttributes );
|
|
110
|
+
editor.fire( 'removeFormatCleanup', currentNode );
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
currentNode = nextNode;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
range.moveToBookmark( bookmark );
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
editor.getSelection().selectRanges( ranges );
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Perform the remove format filters on the passed element.
|
|
128
|
+
* @param {CKEDITOR.editor} editor
|
|
129
|
+
* @param {CKEDITOR.dom.element} element
|
|
130
|
+
*/
|
|
131
|
+
filter : function ( editor, element )
|
|
132
|
+
{
|
|
133
|
+
var filters = editor._.removeFormat.filters;
|
|
134
|
+
for ( var i = 0; i < filters.length; i++ )
|
|
135
|
+
{
|
|
136
|
+
if ( filters[ i ]( element ) === false )
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Add to a collection of functions to decide whether a specific
|
|
145
|
+
* element should be considered as formatting element and thus
|
|
146
|
+
* could be removed during <b>removeFormat</b> command,
|
|
147
|
+
* Note: Only available with the existence of 'removeformat' plugin.
|
|
148
|
+
* @since 3.3
|
|
149
|
+
* @param {Function} func The function to be called, which will be passed a {CKEDITOR.dom.element} element to test.
|
|
150
|
+
* @example
|
|
151
|
+
* // Don't remove empty span
|
|
152
|
+
* editor.addRemoveFormatFilter.push( function( element )
|
|
153
|
+
* {
|
|
154
|
+
* return !( element.is( 'span' ) && CKEDITOR.tools.isEmpty( element.getAttributes() ) );
|
|
155
|
+
* });
|
|
156
|
+
*/
|
|
157
|
+
CKEDITOR.editor.prototype.addRemoveFormatFilter = function( func )
|
|
158
|
+
{
|
|
159
|
+
this._.removeFormat.filters.push( func );
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* A comma separated list of elements to be removed when executing the "remove
|
|
164
|
+
" format" command. Note that only inline elements are allowed.
|
|
165
|
+
* @type String
|
|
166
|
+
* @default 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var'
|
|
167
|
+
* @example
|
|
168
|
+
*/
|
|
169
|
+
CKEDITOR.config.removeFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* A comma separated list of elements attributes to be removed when executing
|
|
173
|
+
* the "remove format" command.
|
|
174
|
+
* @type String
|
|
175
|
+
* @default 'class,style,lang,width,height,align,hspace,valign'
|
|
176
|
+
* @example
|
|
177
|
+
*/
|
|
178
|
+
CKEDITOR.config.removeFormatAttributes = 'class,style,lang,width,height,align,hspace,valign';
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Fired after an element was cleaned by the removeFormat plugin.
|
|
182
|
+
* @name CKEDITOR.editor#removeFormatCleanup
|
|
183
|
+
* @event
|
|
184
|
+
* @param {Object} data.element The element that was cleaned up.
|
|
185
|
+
*/
|