esp-ckeditor 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +32 -0
- data/Rakefile +28 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/_bootstrap.js +87 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor.js +141 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor_base.js +227 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor_basic.js +238 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/command.js +209 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/commanddefinition.js +129 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/config.js +423 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dataprocessor.js +65 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/comment.js +32 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/document.js +251 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/documentfragment.js +49 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/domobject.js +258 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/element.js +1691 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/elementpath.js +119 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/event.js +145 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/node.js +696 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/nodelist.js +26 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/range.js +2054 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/rangelist.js +213 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/text.js +128 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/walker.js +462 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/window.js +96 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom.js +20 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dtd.js +266 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/editor.js +1060 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/editor_basic.js +186 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/env.js +305 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/event.js +342 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/eventInfo.js +120 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/focusmanager.js +152 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/basicwriter.js +145 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/cdata.js +43 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/comment.js +60 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/element.js +308 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/filter.js +288 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/fragment.js +518 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/text.js +53 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser.js +224 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/lang.js +157 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/loader.js +240 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/plugindefinition.js +83 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/plugins.js +103 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/resourcemanager.js +238 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/scriptloader.js +180 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/skins.js +184 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/themes.js +19 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/tools.js +763 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/ui.js +128 -0
- data/app/assets/javascripts/esp-ckeditor/_source/lang/_languages.js +27 -0
- data/app/assets/javascripts/esp-ckeditor/_source/lang/en.js +815 -0
- data/app/assets/javascripts/esp-ckeditor/_source/lang/ru.js +815 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +222 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/lang/en.js +108 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/lang/he.js +216 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/plugin.js +47 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/basicstyles/plugin.js +129 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/button/plugin.js +290 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/clipboard/dialogs/paste.js +223 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/clipboard/plugin.js +453 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/contextmenu/plugin.js +179 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialog/dialogDefinition.js +1166 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialog/plugin.js +3308 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialogadvtab/plugin.js +208 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialogui/plugin.js +1541 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/domiterator/plugin.js +361 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/editingblock/plugin.js +278 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/elementspath/plugin.js +218 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/enterkey/plugin.js +433 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/entities/plugin.js +250 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/dialogs/esp_attachment.js +234 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/images/esp_attachment.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/en.js +22 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/ru.js +22 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/uk.js +22 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/plugin.js +23 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/dialogs/esp_audio.js +207 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/images/esp_audio.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/images/placeholder.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/en.js +18 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/ru.js +18 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/uk.js +18 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/plugin.js +182 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_blockquote/dialogs/esp_blockquote.js +132 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_blockquote/plugin.js +235 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/dialogs/esp_image.js +1414 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/images/esp_image.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/en.js +9 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/ru.js +9 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/uk.js +9 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/plugin.js +80 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/dialogs/esp_anchor.js +145 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/dialogs/esp_link.js +1396 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/anchor.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_anchor.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_link.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_unlink.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/en.js +8 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/ru.js +8 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/uk.js +8 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/plugin.js +379 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_address.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_blockquote.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_div.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h1.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h2.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h3.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h4.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h5.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h6.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_p.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_pre.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/esp_showblocks.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/plugin.js +163 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/dialogs/esp_video.js +277 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/images/esp_video.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/images/placeholder.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/en.js +19 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/ru.js +19 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/uk.js +19 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/plugin.js +182 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/fakeobjects/plugin.js +175 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/filebrowser/plugin.js +534 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/find/dialogs/find.js +915 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/find/plugin.js +47 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/floatpanel/plugin.js +428 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/format/plugin.js +197 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/htmldataprocessor/plugin.js +596 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/htmlwriter/plugin.js +319 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/image/dialogs/image.js +1407 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/image/plugin.js +81 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/indent/plugin.js +461 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/justify/plugin.js +253 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/keystrokes/plugin.js +225 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/list/plugin.js +774 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/listblock/plugin.js +266 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +225 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/plugin.js +66 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/maximize/plugin.js +353 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/menu/plugin.js +541 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/panel/plugin.js +400 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastefromword/filter/default.js +1367 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastefromword/plugin.js +141 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +67 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastetext/plugin.js +98 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/popup/plugin.js +64 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/removeformat/plugin.js +185 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/resize/plugin.js +168 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/richcombo/plugin.js +381 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/selection/plugin.js +1729 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/showborders/plugin.js +207 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/sourcearea/plugin.js +209 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/styles/plugin.js +1700 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/styles/styles/default.js +88 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/stylescombo/plugin.js +218 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/tab/plugin.js +367 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/table/dialogs/table.js +623 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/table/plugin.js +78 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +525 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/tabletools/plugin.js +1194 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/toolbar/plugin.js +545 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/undo/plugin.js +578 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/wysiwygarea/plugin.js +1347 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/dialog.css +988 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/editor.css +25 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/elementspath.css +73 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons.css +367 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons_rtl.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/mini.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/noimage.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/sprites.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/mainui.css +209 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/menu.css +232 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/panel.css +227 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/presets.css +49 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/reset.css +85 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/richcombo.css +287 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/skin.js +236 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/templates.css +88 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/toolbar.css +412 -0
- data/app/assets/javascripts/esp-ckeditor/_source/themes/default/theme.js +407 -0
- data/app/assets/javascripts/esp-ckeditor/application.js +8 -0
- data/app/assets/javascripts/esp-ckeditor/ckeditor.js +137 -0
- data/app/assets/javascripts/esp-ckeditor/ckeditor.pack +194 -0
- data/app/assets/javascripts/esp-ckeditor/ckeditor_source.js +35 -0
- data/app/assets/javascripts/esp-ckeditor/ckpackager.jar +0 -0
- data/app/assets/javascripts/esp-ckeditor/ckpackager.txt +2 -0
- data/app/assets/javascripts/esp-ckeditor/config.js +147 -0
- data/app/assets/javascripts/esp-ckeditor/contents.css +38 -0
- data/app/assets/javascripts/esp-ckeditor/images/spacer.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/init_ckeditor.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/lang/he.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/basicstyles/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/button/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/clipboard/dialogs/paste.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/clipboard/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/contextmenu/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/dialog/dialogDefinition.js +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/dialog/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/dialogadvtab/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/dialogui/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/domiterator/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/editingblock/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/elementspath/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/enterkey/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/entities/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/dialogs/esp_attachment.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/images/esp_attachment.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/dialogs/esp_audio.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/images/esp_audio.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/images/placeholder.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_blockquote/dialogs/esp_blockquote.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_blockquote/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/dialogs/esp_image.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/images/esp_image.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/dialogs/esp_anchor.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/dialogs/esp_link.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/anchor.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_anchor.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_link.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_unlink.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_address.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_blockquote.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_div.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h1.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h2.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h3.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h4.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h5.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h6.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_p.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_pre.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/esp_showblocks.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/dialogs/esp_video.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/images/esp_video.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/images/placeholder.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/fakeobjects/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/filebrowser/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/find/dialogs/find.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/find/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/floatpanel/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/format/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/htmldataprocessor/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/htmlwriter/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/image/dialogs/image.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/image/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/indent/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/justify/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/keystrokes/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/list/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/listblock/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/liststyle/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/maximize/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/menu/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/panel/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/pastefromword/filter/default.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/pastefromword/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/pastetext/dialogs/pastetext.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/pastetext/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/popup/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/removeformat/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/resize/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/richcombo/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/selection/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/showborders/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/sourcearea/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/styles/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/styles/styles/default.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/stylescombo/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/tab/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/table/dialogs/table.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/table/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/tabletools/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/toolbar/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/undo/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/wysiwygarea/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/dialog.css +988 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/editor.css +25 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/elementspath.css +73 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/icons.css +367 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/icons.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/icons_rtl.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/mini.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/noimage.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/sprites.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/sprites_ie6.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/toolbar_start.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/mainui.css +209 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/menu.css +232 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/panel.css +227 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/presets.css +49 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/reset.css +85 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/richcombo.css +287 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/skin.js +236 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/templates.css +88 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/toolbar.css +412 -0
- data/app/inputs/ckeditor_input.rb +42 -0
- data/config/routes.rb +2 -0
- data/lib/esp-ckeditor/engine.rb +9 -0
- data/lib/esp-ckeditor/version.rb +3 -0
- data/lib/esp-ckeditor.rb +17 -0
- data/lib/tasks/esp-ckeditor_tasks.rake +4 -0
- metadata +434 -0
@@ -0,0 +1,83 @@
|
|
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 Defines the "virtual" {@link CKEDITOR.pluginDefinition} class, which
|
8
|
+
* contains the defintion of a plugin. This file is for documentation
|
9
|
+
* purposes only.
|
10
|
+
*/
|
11
|
+
|
12
|
+
/**
|
13
|
+
* (Virtual Class) Do not call this constructor. This class is not really part
|
14
|
+
* of the API. It just illustrates the features of plugin objects to be
|
15
|
+
* passed to the {@link CKEDITOR.plugins.add} function.
|
16
|
+
* @name CKEDITOR.pluginDefinition
|
17
|
+
* @constructor
|
18
|
+
* @example
|
19
|
+
*/
|
20
|
+
|
21
|
+
/**
|
22
|
+
* A list of plugins that are required by this plugin. Note that this property
|
23
|
+
* doesn't guarantee the loading order of the plugins.
|
24
|
+
* @name CKEDITOR.pluginDefinition.prototype.requires
|
25
|
+
* @type Array
|
26
|
+
* @example
|
27
|
+
* CKEDITOR.plugins.add( 'sample',
|
28
|
+
* {
|
29
|
+
* requires : [ 'button', 'selection' ]
|
30
|
+
* });
|
31
|
+
*/
|
32
|
+
|
33
|
+
/**
|
34
|
+
* A list of language files available for this plugin. These files are stored inside
|
35
|
+
* the "lang" directory, which is inside the plugin directory, follow the name
|
36
|
+
* pattern of "langCode.js", and contain a language definition created with {@link CKEDITOR.pluginDefinition#setLang}.
|
37
|
+
* While the plugin is being loaded, the editor checks this list to see if
|
38
|
+
* a language file of the current editor language ({@link CKEDITOR.editor#langCode})
|
39
|
+
* is available, and if so, loads it. Otherwise, the file represented by the first list item
|
40
|
+
* in the list is loaded.
|
41
|
+
* @name CKEDITOR.pluginDefinition.prototype.lang
|
42
|
+
* @type Array
|
43
|
+
* @example
|
44
|
+
* CKEDITOR.plugins.add( 'sample',
|
45
|
+
* {
|
46
|
+
* lang : [ 'en', 'fr' ]
|
47
|
+
* });
|
48
|
+
*/
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Function called on initialization of every editor instance created in the
|
52
|
+
* page before the init() call task. The beforeInit function will be called for
|
53
|
+
* all plugins, after that the init function is called for all of them. This
|
54
|
+
* feature makes it possible to initialize things that could be used in the
|
55
|
+
* init function of other plugins.
|
56
|
+
* @name CKEDITOR.pluginDefinition.prototype.beforeInit
|
57
|
+
* @function
|
58
|
+
* @param {CKEDITOR.editor} editor The editor instance being initialized.
|
59
|
+
* @example
|
60
|
+
* CKEDITOR.plugins.add( 'sample',
|
61
|
+
* {
|
62
|
+
* beforeInit : function( editor )
|
63
|
+
* {
|
64
|
+
* alert( 'Editor "' + editor.name + '" is to be initialized!' );
|
65
|
+
* }
|
66
|
+
* });
|
67
|
+
*/
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Function called on initialization of every editor instance created in the
|
71
|
+
* page.
|
72
|
+
* @name CKEDITOR.pluginDefinition.prototype.init
|
73
|
+
* @function
|
74
|
+
* @param {CKEDITOR.editor} editor The editor instance being initialized.
|
75
|
+
* @example
|
76
|
+
* CKEDITOR.plugins.add( 'sample',
|
77
|
+
* {
|
78
|
+
* init : function( editor )
|
79
|
+
* {
|
80
|
+
* alert( 'Editor "' + editor.name + '" is being initialized!' );
|
81
|
+
* }
|
82
|
+
* });
|
83
|
+
*/
|
@@ -0,0 +1,103 @@
|
|
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 Defines the {@link CKEDITOR.plugins} object, which is used to
|
8
|
+
* manage plugins registration and loading.
|
9
|
+
*/
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Manages plugins registration and loading.
|
13
|
+
* @namespace
|
14
|
+
* @augments CKEDITOR.resourceManager
|
15
|
+
* @example
|
16
|
+
*/
|
17
|
+
CKEDITOR.plugins = new CKEDITOR.resourceManager(
|
18
|
+
'_source/' + // @Packager.RemoveLine
|
19
|
+
'plugins/', 'plugin' );
|
20
|
+
|
21
|
+
// PACKAGER_RENAME( CKEDITOR.plugins )
|
22
|
+
|
23
|
+
CKEDITOR.plugins.load = CKEDITOR.tools.override( CKEDITOR.plugins.load, function( originalLoad )
|
24
|
+
{
|
25
|
+
return function( name, callback, scope )
|
26
|
+
{
|
27
|
+
var allPlugins = {};
|
28
|
+
|
29
|
+
var loadPlugins = function( names )
|
30
|
+
{
|
31
|
+
originalLoad.call( this, names, function( plugins )
|
32
|
+
{
|
33
|
+
CKEDITOR.tools.extend( allPlugins, plugins );
|
34
|
+
|
35
|
+
var requiredPlugins = [];
|
36
|
+
for ( var pluginName in plugins )
|
37
|
+
{
|
38
|
+
var plugin = plugins[ pluginName ],
|
39
|
+
requires = plugin && plugin.requires;
|
40
|
+
|
41
|
+
if ( requires )
|
42
|
+
{
|
43
|
+
for ( var i = 0 ; i < requires.length ; i++ )
|
44
|
+
{
|
45
|
+
if ( !allPlugins[ requires[ i ] ] )
|
46
|
+
requiredPlugins.push( requires[ i ] );
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
if ( requiredPlugins.length )
|
52
|
+
loadPlugins.call( this, requiredPlugins );
|
53
|
+
else
|
54
|
+
{
|
55
|
+
// Call the "onLoad" function for all plugins.
|
56
|
+
for ( pluginName in allPlugins )
|
57
|
+
{
|
58
|
+
plugin = allPlugins[ pluginName ];
|
59
|
+
if ( plugin.onLoad && !plugin.onLoad._called )
|
60
|
+
{
|
61
|
+
plugin.onLoad();
|
62
|
+
plugin.onLoad._called = 1;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
// Call the callback.
|
67
|
+
if ( callback )
|
68
|
+
callback.call( scope || window, allPlugins );
|
69
|
+
}
|
70
|
+
}
|
71
|
+
, this);
|
72
|
+
|
73
|
+
};
|
74
|
+
|
75
|
+
loadPlugins.call( this, name );
|
76
|
+
};
|
77
|
+
});
|
78
|
+
|
79
|
+
/**
|
80
|
+
* Loads a specific language file, or auto detect it. A callback is
|
81
|
+
* then called when the file gets loaded.
|
82
|
+
* @param {String} pluginName The name of the plugin to which the provided translation
|
83
|
+
* should be attached.
|
84
|
+
* @param {String} languageCode The code of the language translation provided.
|
85
|
+
* @param {Object} languageEntries An object that contains pairs of label and
|
86
|
+
* the respective translation.
|
87
|
+
* @example
|
88
|
+
* CKEDITOR.plugins.setLang( 'myPlugin', 'en', {
|
89
|
+
* title : 'My plugin',
|
90
|
+
* selectOption : 'Please select an option'
|
91
|
+
* } );
|
92
|
+
*/
|
93
|
+
CKEDITOR.plugins.setLang = function( pluginName, languageCode, languageEntries )
|
94
|
+
{
|
95
|
+
var plugin = this.get( pluginName ),
|
96
|
+
pluginLangEntries = plugin.langEntries || ( plugin.langEntries = {} ),
|
97
|
+
pluginLang = plugin.lang || ( plugin.lang = [] );
|
98
|
+
|
99
|
+
if ( CKEDITOR.tools.indexOf( pluginLang, languageCode ) == -1 )
|
100
|
+
pluginLang.push( languageCode );
|
101
|
+
|
102
|
+
pluginLangEntries[ languageCode ] = languageEntries;
|
103
|
+
};
|
@@ -0,0 +1,238 @@
|
|
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 Defines the {@link CKEDITOR.resourceManager} class, which is
|
8
|
+
* the base for resource managers, like plugins and themes.
|
9
|
+
*/
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Base class for resource managers, like plugins and themes. This class is not
|
13
|
+
* intended to be used out of the CKEditor core code.
|
14
|
+
* @param {String} basePath The path for the resources folder.
|
15
|
+
* @param {String} fileName The name used for resource files.
|
16
|
+
* @namespace
|
17
|
+
* @example
|
18
|
+
*/
|
19
|
+
CKEDITOR.resourceManager = function( basePath, fileName )
|
20
|
+
{
|
21
|
+
/**
|
22
|
+
* The base directory containing all resources.
|
23
|
+
* @name CKEDITOR.resourceManager.prototype.basePath
|
24
|
+
* @type String
|
25
|
+
* @example
|
26
|
+
*/
|
27
|
+
this.basePath = basePath;
|
28
|
+
|
29
|
+
/**
|
30
|
+
* The name used for resource files.
|
31
|
+
* @name CKEDITOR.resourceManager.prototype.fileName
|
32
|
+
* @type String
|
33
|
+
* @example
|
34
|
+
*/
|
35
|
+
this.fileName = fileName;
|
36
|
+
|
37
|
+
/**
|
38
|
+
* Contains references to all resources that have already been registered
|
39
|
+
* with {@link #add}.
|
40
|
+
* @name CKEDITOR.resourceManager.prototype.registered
|
41
|
+
* @type Object
|
42
|
+
* @example
|
43
|
+
*/
|
44
|
+
this.registered = {};
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Contains references to all resources that have already been loaded
|
48
|
+
* with {@link #load}.
|
49
|
+
* @name CKEDITOR.resourceManager.prototype.loaded
|
50
|
+
* @type Object
|
51
|
+
* @example
|
52
|
+
*/
|
53
|
+
this.loaded = {};
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Contains references to all resources that have already been registered
|
57
|
+
* with {@link #addExternal}.
|
58
|
+
* @name CKEDITOR.resourceManager.prototype.externals
|
59
|
+
* @type Object
|
60
|
+
* @example
|
61
|
+
*/
|
62
|
+
this.externals = {};
|
63
|
+
|
64
|
+
/**
|
65
|
+
* @private
|
66
|
+
*/
|
67
|
+
this._ =
|
68
|
+
{
|
69
|
+
// List of callbacks waiting for plugins to be loaded.
|
70
|
+
waitingList : {}
|
71
|
+
};
|
72
|
+
};
|
73
|
+
|
74
|
+
CKEDITOR.resourceManager.prototype =
|
75
|
+
{
|
76
|
+
/**
|
77
|
+
* Registers a resource.
|
78
|
+
* @param {String} name The resource name.
|
79
|
+
* @param {Object} [definition] The resource definition.
|
80
|
+
* @example
|
81
|
+
* CKEDITOR.plugins.add( 'sample', { ... plugin definition ... } );
|
82
|
+
* @see CKEDITOR.pluginDefinition
|
83
|
+
*/
|
84
|
+
add : function( name, definition )
|
85
|
+
{
|
86
|
+
if ( this.registered[ name ] )
|
87
|
+
throw '[CKEDITOR.resourceManager.add] The resource name "' + name + '" is already registered.';
|
88
|
+
|
89
|
+
CKEDITOR.fire( name + CKEDITOR.tools.capitalize( this.fileName ) + 'Ready',
|
90
|
+
this.registered[ name ] = definition || {} );
|
91
|
+
},
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Gets the definition of a specific resource.
|
95
|
+
* @param {String} name The resource name.
|
96
|
+
* @type Object
|
97
|
+
* @example
|
98
|
+
* var definition = <b>CKEDITOR.plugins.get( 'sample' )</b>;
|
99
|
+
*/
|
100
|
+
get : function( name )
|
101
|
+
{
|
102
|
+
return this.registered[ name ] || null;
|
103
|
+
},
|
104
|
+
|
105
|
+
/**
|
106
|
+
* Get the folder path for a specific loaded resource.
|
107
|
+
* @param {String} name The resource name.
|
108
|
+
* @type String
|
109
|
+
* @example
|
110
|
+
* alert( <b>CKEDITOR.plugins.getPath( 'sample' )</b> ); // "<editor path>/plugins/sample/"
|
111
|
+
*/
|
112
|
+
getPath : function( name )
|
113
|
+
{
|
114
|
+
var external = this.externals[ name ];
|
115
|
+
return CKEDITOR.getUrl( ( external && external.dir ) || this.basePath + name + '/' );
|
116
|
+
},
|
117
|
+
|
118
|
+
/**
|
119
|
+
* Get the file path for a specific loaded resource.
|
120
|
+
* @param {String} name The resource name.
|
121
|
+
* @type String
|
122
|
+
* @example
|
123
|
+
* alert( <b>CKEDITOR.plugins.getFilePath( 'sample' )</b> ); // "<editor path>/plugins/sample/plugin.js"
|
124
|
+
*/
|
125
|
+
getFilePath : function( name )
|
126
|
+
{
|
127
|
+
var external = this.externals[ name ];
|
128
|
+
return CKEDITOR.getUrl(
|
129
|
+
this.getPath( name ) +
|
130
|
+
( ( external && ( typeof external.file == 'string' ) ) ? external.file : this.fileName + '.js' ) );
|
131
|
+
},
|
132
|
+
|
133
|
+
/**
|
134
|
+
* Registers one or more resources to be loaded from an external path
|
135
|
+
* instead of the core base path.
|
136
|
+
* @param {String} names The resource names, separated by commas.
|
137
|
+
* @param {String} path The path of the folder containing the resource.
|
138
|
+
* @param {String} [fileName] The resource file name. If not provided, the
|
139
|
+
* default name is used; If provided with a empty string, will implicitly indicates that {@param path}
|
140
|
+
* is already the full path.
|
141
|
+
* @example
|
142
|
+
* // Loads a plugin from '/myplugin/samples/plugin.js'.
|
143
|
+
* CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/' );
|
144
|
+
* @example
|
145
|
+
* // Loads a plugin from '/myplugin/samples/my_plugin.js'.
|
146
|
+
* CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/', 'my_plugin.js' );
|
147
|
+
* @example
|
148
|
+
* // Loads a plugin from '/myplugin/samples/my_plugin.js'.
|
149
|
+
* CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/my_plugin.js', '' );
|
150
|
+
*/
|
151
|
+
addExternal : function( names, path, fileName )
|
152
|
+
{
|
153
|
+
names = names.split( ',' );
|
154
|
+
for ( var i = 0 ; i < names.length ; i++ )
|
155
|
+
{
|
156
|
+
var name = names[ i ];
|
157
|
+
|
158
|
+
this.externals[ name ] =
|
159
|
+
{
|
160
|
+
dir : path,
|
161
|
+
file : fileName
|
162
|
+
};
|
163
|
+
}
|
164
|
+
},
|
165
|
+
|
166
|
+
/**
|
167
|
+
* Loads one or more resources.
|
168
|
+
* @param {String|Array} name The name of the resource to load. It may be a
|
169
|
+
* string with a single resource name, or an array with several names.
|
170
|
+
* @param {Function} callback A function to be called when all resources
|
171
|
+
* are loaded. The callback will receive an array containing all
|
172
|
+
* loaded names.
|
173
|
+
* @param {Object} [scope] The scope object to be used for the callback
|
174
|
+
* call.
|
175
|
+
* @example
|
176
|
+
* <b>CKEDITOR.plugins.load</b>( 'myplugin', function( plugins )
|
177
|
+
* {
|
178
|
+
* alert( plugins['myplugin'] ); // "object"
|
179
|
+
* });
|
180
|
+
*/
|
181
|
+
load : function( names, callback, scope )
|
182
|
+
{
|
183
|
+
// Ensure that we have an array of names.
|
184
|
+
if ( !CKEDITOR.tools.isArray( names ) )
|
185
|
+
names = names ? [ names ] : [];
|
186
|
+
|
187
|
+
var loaded = this.loaded,
|
188
|
+
registered = this.registered,
|
189
|
+
urls = [],
|
190
|
+
urlsNames = {},
|
191
|
+
resources = {};
|
192
|
+
|
193
|
+
// Loop through all names.
|
194
|
+
for ( var i = 0 ; i < names.length ; i++ )
|
195
|
+
{
|
196
|
+
var name = names[ i ];
|
197
|
+
|
198
|
+
if ( !name )
|
199
|
+
continue;
|
200
|
+
|
201
|
+
// If not available yet.
|
202
|
+
if ( !loaded[ name ] && !registered[ name ] )
|
203
|
+
{
|
204
|
+
var url = this.getFilePath( name );
|
205
|
+
urls.push( url );
|
206
|
+
if ( !( url in urlsNames ) )
|
207
|
+
urlsNames[ url ] = [];
|
208
|
+
urlsNames[ url ].push( name );
|
209
|
+
}
|
210
|
+
else
|
211
|
+
resources[ name ] = this.get( name );
|
212
|
+
}
|
213
|
+
|
214
|
+
CKEDITOR.scriptLoader.load( urls, function( completed, failed )
|
215
|
+
{
|
216
|
+
if ( failed.length )
|
217
|
+
{
|
218
|
+
throw '[CKEDITOR.resourceManager.load] Resource name "' + urlsNames[ failed[ 0 ] ].join( ',' )
|
219
|
+
+ '" was not found at "' + failed[ 0 ] + '".';
|
220
|
+
}
|
221
|
+
|
222
|
+
for ( var i = 0 ; i < completed.length ; i++ )
|
223
|
+
{
|
224
|
+
var nameList = urlsNames[ completed[ i ] ];
|
225
|
+
for ( var j = 0 ; j < nameList.length ; j++ )
|
226
|
+
{
|
227
|
+
var name = nameList[ j ];
|
228
|
+
resources[ name ] = this.get( name );
|
229
|
+
|
230
|
+
loaded[ name ] = 1;
|
231
|
+
}
|
232
|
+
}
|
233
|
+
|
234
|
+
callback.call( scope, resources );
|
235
|
+
}
|
236
|
+
, this);
|
237
|
+
}
|
238
|
+
};
|
@@ -0,0 +1,180 @@
|
|
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 Defines the {@link CKEDITOR.scriptLoader} object, used to load scripts
|
8
|
+
* asynchronously.
|
9
|
+
*/
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Load scripts asynchronously.
|
13
|
+
* @namespace
|
14
|
+
* @example
|
15
|
+
*/
|
16
|
+
CKEDITOR.scriptLoader = (function()
|
17
|
+
{
|
18
|
+
var uniqueScripts = {},
|
19
|
+
waitingList = {};
|
20
|
+
|
21
|
+
return /** @lends CKEDITOR.scriptLoader */ {
|
22
|
+
/**
|
23
|
+
* Loads one or more external script checking if not already loaded
|
24
|
+
* previously by this function.
|
25
|
+
* @param {String|Array} scriptUrl One or more URLs pointing to the
|
26
|
+
* scripts to be loaded.
|
27
|
+
* @param {Function} [callback] A function to be called when the script
|
28
|
+
* is loaded and executed. If a string is passed to "scriptUrl", a
|
29
|
+
* boolean parameter is passed to the callback, indicating the
|
30
|
+
* success of the load. If an array is passed instead, two array
|
31
|
+
* parameters are passed to the callback; the first contains the
|
32
|
+
* URLs that have been properly loaded, and the second the failed
|
33
|
+
* ones.
|
34
|
+
* @param {Object} [scope] The scope ("this" reference) to be used for
|
35
|
+
* the callback call. Default to {@link CKEDITOR}.
|
36
|
+
* @param {Boolean} [showBusy] Changes the cursor of the document while
|
37
|
+
+ * the script is loaded.
|
38
|
+
* @example
|
39
|
+
* CKEDITOR.scriptLoader.load( '/myscript.js' );
|
40
|
+
* @example
|
41
|
+
* CKEDITOR.scriptLoader.load( '/myscript.js', function( success )
|
42
|
+
* {
|
43
|
+
* // Alerts "true" if the script has been properly loaded.
|
44
|
+
* // HTTP error 404 should return "false".
|
45
|
+
* alert( success );
|
46
|
+
* });
|
47
|
+
* @example
|
48
|
+
* CKEDITOR.scriptLoader.load( [ '/myscript1.js', '/myscript2.js' ], function( completed, failed )
|
49
|
+
* {
|
50
|
+
* alert( 'Number of scripts loaded: ' + completed.length );
|
51
|
+
* alert( 'Number of failures: ' + failed.length );
|
52
|
+
* });
|
53
|
+
*/
|
54
|
+
load : function( scriptUrl, callback, scope, showBusy )
|
55
|
+
{
|
56
|
+
var isString = ( typeof scriptUrl == 'string' );
|
57
|
+
|
58
|
+
if ( isString )
|
59
|
+
scriptUrl = [ scriptUrl ];
|
60
|
+
|
61
|
+
if ( !scope )
|
62
|
+
scope = CKEDITOR;
|
63
|
+
|
64
|
+
var scriptCount = scriptUrl.length,
|
65
|
+
completed = [],
|
66
|
+
failed = [];
|
67
|
+
|
68
|
+
var doCallback = function( success )
|
69
|
+
{
|
70
|
+
if ( callback )
|
71
|
+
{
|
72
|
+
if ( isString )
|
73
|
+
callback.call( scope, success );
|
74
|
+
else
|
75
|
+
callback.call( scope, completed, failed );
|
76
|
+
}
|
77
|
+
};
|
78
|
+
|
79
|
+
if ( scriptCount === 0 )
|
80
|
+
{
|
81
|
+
doCallback( true );
|
82
|
+
return;
|
83
|
+
}
|
84
|
+
|
85
|
+
var checkLoaded = function( url, success )
|
86
|
+
{
|
87
|
+
( success ? completed : failed ).push( url );
|
88
|
+
|
89
|
+
if ( --scriptCount <= 0 )
|
90
|
+
{
|
91
|
+
showBusy && CKEDITOR.document.getDocumentElement().removeStyle( 'cursor' );
|
92
|
+
doCallback( success );
|
93
|
+
}
|
94
|
+
};
|
95
|
+
|
96
|
+
var onLoad = function( url, success )
|
97
|
+
{
|
98
|
+
// Mark this script as loaded.
|
99
|
+
uniqueScripts[ url ] = 1;
|
100
|
+
|
101
|
+
// Get the list of callback checks waiting for this file.
|
102
|
+
var waitingInfo = waitingList[ url ];
|
103
|
+
delete waitingList[ url ];
|
104
|
+
|
105
|
+
// Check all callbacks waiting for this file.
|
106
|
+
for ( var i = 0 ; i < waitingInfo.length ; i++ )
|
107
|
+
waitingInfo[ i ]( url, success );
|
108
|
+
};
|
109
|
+
|
110
|
+
var loadScript = function( url )
|
111
|
+
{
|
112
|
+
if ( uniqueScripts[ url ] )
|
113
|
+
{
|
114
|
+
checkLoaded( url, true );
|
115
|
+
return;
|
116
|
+
}
|
117
|
+
|
118
|
+
var waitingInfo = waitingList[ url ] || ( waitingList[ url ] = [] );
|
119
|
+
waitingInfo.push( checkLoaded );
|
120
|
+
|
121
|
+
// Load it only for the first request.
|
122
|
+
if ( waitingInfo.length > 1 )
|
123
|
+
return;
|
124
|
+
|
125
|
+
// Create the <script> element.
|
126
|
+
var script = new CKEDITOR.dom.element( 'script' );
|
127
|
+
script.setAttributes( {
|
128
|
+
type : 'text/javascript',
|
129
|
+
src : url } );
|
130
|
+
|
131
|
+
if ( callback )
|
132
|
+
{
|
133
|
+
if ( CKEDITOR.env.ie )
|
134
|
+
{
|
135
|
+
// FIXME: For IE, we are not able to return false on error (like 404).
|
136
|
+
|
137
|
+
/** @ignore */
|
138
|
+
script.$.onreadystatechange = function ()
|
139
|
+
{
|
140
|
+
if ( script.$.readyState == 'loaded' || script.$.readyState == 'complete' )
|
141
|
+
{
|
142
|
+
script.$.onreadystatechange = null;
|
143
|
+
onLoad( url, true );
|
144
|
+
}
|
145
|
+
};
|
146
|
+
}
|
147
|
+
else
|
148
|
+
{
|
149
|
+
/** @ignore */
|
150
|
+
script.$.onload = function()
|
151
|
+
{
|
152
|
+
// Some browsers, such as Safari, may call the onLoad function
|
153
|
+
// immediately. Which will break the loading sequence. (#3661)
|
154
|
+
setTimeout( function() { onLoad( url, true ); }, 0 );
|
155
|
+
};
|
156
|
+
|
157
|
+
// FIXME: Opera and Safari will not fire onerror.
|
158
|
+
|
159
|
+
/** @ignore */
|
160
|
+
script.$.onerror = function()
|
161
|
+
{
|
162
|
+
onLoad( url, false );
|
163
|
+
};
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
// Append it to <head>.
|
168
|
+
script.appendTo( CKEDITOR.document.getHead() );
|
169
|
+
|
170
|
+
CKEDITOR.fire( 'download', url ); // @Packager.RemoveLine
|
171
|
+
};
|
172
|
+
|
173
|
+
showBusy && CKEDITOR.document.getDocumentElement().setStyle( 'cursor', 'wait' );
|
174
|
+
for ( var i = 0 ; i < scriptCount ; i++ )
|
175
|
+
{
|
176
|
+
loadScript( scriptUrl[ i ] );
|
177
|
+
}
|
178
|
+
}
|
179
|
+
};
|
180
|
+
})();
|