esp-ckeditor 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +32 -0
  3. data/Rakefile +28 -0
  4. data/app/assets/javascripts/esp-ckeditor/_source/core/_bootstrap.js +87 -0
  5. data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor.js +141 -0
  6. data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor_base.js +227 -0
  7. data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor_basic.js +238 -0
  8. data/app/assets/javascripts/esp-ckeditor/_source/core/command.js +209 -0
  9. data/app/assets/javascripts/esp-ckeditor/_source/core/commanddefinition.js +129 -0
  10. data/app/assets/javascripts/esp-ckeditor/_source/core/config.js +423 -0
  11. data/app/assets/javascripts/esp-ckeditor/_source/core/dataprocessor.js +65 -0
  12. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/comment.js +32 -0
  13. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/document.js +251 -0
  14. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/documentfragment.js +49 -0
  15. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/domobject.js +258 -0
  16. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/element.js +1691 -0
  17. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/elementpath.js +119 -0
  18. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/event.js +145 -0
  19. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/node.js +696 -0
  20. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/nodelist.js +26 -0
  21. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/range.js +2054 -0
  22. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/rangelist.js +213 -0
  23. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/text.js +128 -0
  24. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/walker.js +462 -0
  25. data/app/assets/javascripts/esp-ckeditor/_source/core/dom/window.js +96 -0
  26. data/app/assets/javascripts/esp-ckeditor/_source/core/dom.js +20 -0
  27. data/app/assets/javascripts/esp-ckeditor/_source/core/dtd.js +266 -0
  28. data/app/assets/javascripts/esp-ckeditor/_source/core/editor.js +1060 -0
  29. data/app/assets/javascripts/esp-ckeditor/_source/core/editor_basic.js +186 -0
  30. data/app/assets/javascripts/esp-ckeditor/_source/core/env.js +305 -0
  31. data/app/assets/javascripts/esp-ckeditor/_source/core/event.js +342 -0
  32. data/app/assets/javascripts/esp-ckeditor/_source/core/eventInfo.js +120 -0
  33. data/app/assets/javascripts/esp-ckeditor/_source/core/focusmanager.js +152 -0
  34. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/basicwriter.js +145 -0
  35. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/cdata.js +43 -0
  36. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/comment.js +60 -0
  37. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/element.js +308 -0
  38. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/filter.js +288 -0
  39. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/fragment.js +518 -0
  40. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/text.js +53 -0
  41. data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser.js +224 -0
  42. data/app/assets/javascripts/esp-ckeditor/_source/core/lang.js +157 -0
  43. data/app/assets/javascripts/esp-ckeditor/_source/core/loader.js +240 -0
  44. data/app/assets/javascripts/esp-ckeditor/_source/core/plugindefinition.js +83 -0
  45. data/app/assets/javascripts/esp-ckeditor/_source/core/plugins.js +103 -0
  46. data/app/assets/javascripts/esp-ckeditor/_source/core/resourcemanager.js +238 -0
  47. data/app/assets/javascripts/esp-ckeditor/_source/core/scriptloader.js +180 -0
  48. data/app/assets/javascripts/esp-ckeditor/_source/core/skins.js +184 -0
  49. data/app/assets/javascripts/esp-ckeditor/_source/core/themes.js +19 -0
  50. data/app/assets/javascripts/esp-ckeditor/_source/core/tools.js +763 -0
  51. data/app/assets/javascripts/esp-ckeditor/_source/core/ui.js +128 -0
  52. data/app/assets/javascripts/esp-ckeditor/_source/lang/_languages.js +27 -0
  53. data/app/assets/javascripts/esp-ckeditor/_source/lang/en.js +815 -0
  54. data/app/assets/javascripts/esp-ckeditor/_source/lang/ru.js +815 -0
  55. data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +222 -0
  56. data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/lang/en.js +108 -0
  57. data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/lang/he.js +216 -0
  58. data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/plugin.js +47 -0
  59. data/app/assets/javascripts/esp-ckeditor/_source/plugins/basicstyles/plugin.js +129 -0
  60. data/app/assets/javascripts/esp-ckeditor/_source/plugins/button/plugin.js +290 -0
  61. data/app/assets/javascripts/esp-ckeditor/_source/plugins/clipboard/dialogs/paste.js +223 -0
  62. data/app/assets/javascripts/esp-ckeditor/_source/plugins/clipboard/plugin.js +453 -0
  63. data/app/assets/javascripts/esp-ckeditor/_source/plugins/contextmenu/plugin.js +179 -0
  64. data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialog/dialogDefinition.js +1166 -0
  65. data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialog/plugin.js +3308 -0
  66. data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialogadvtab/plugin.js +208 -0
  67. data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialogui/plugin.js +1541 -0
  68. data/app/assets/javascripts/esp-ckeditor/_source/plugins/domiterator/plugin.js +361 -0
  69. data/app/assets/javascripts/esp-ckeditor/_source/plugins/editingblock/plugin.js +278 -0
  70. data/app/assets/javascripts/esp-ckeditor/_source/plugins/elementspath/plugin.js +218 -0
  71. data/app/assets/javascripts/esp-ckeditor/_source/plugins/enterkey/plugin.js +433 -0
  72. data/app/assets/javascripts/esp-ckeditor/_source/plugins/entities/plugin.js +250 -0
  73. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/dialogs/esp_attachment.js +234 -0
  74. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/images/esp_attachment.png +0 -0
  75. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/en.js +22 -0
  76. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/ru.js +22 -0
  77. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/uk.js +22 -0
  78. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/plugin.js +23 -0
  79. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/dialogs/esp_audio.js +207 -0
  80. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/images/esp_audio.png +0 -0
  81. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/images/placeholder.png +0 -0
  82. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/en.js +18 -0
  83. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/ru.js +18 -0
  84. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/uk.js +18 -0
  85. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/plugin.js +182 -0
  86. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_blockquote/dialogs/esp_blockquote.js +132 -0
  87. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_blockquote/plugin.js +235 -0
  88. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/dialogs/esp_image.js +1414 -0
  89. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/images/esp_image.png +0 -0
  90. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/en.js +9 -0
  91. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/ru.js +9 -0
  92. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/uk.js +9 -0
  93. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/plugin.js +80 -0
  94. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/dialogs/esp_anchor.js +145 -0
  95. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/dialogs/esp_link.js +1396 -0
  96. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/anchor.png +0 -0
  97. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_anchor.png +0 -0
  98. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_link.png +0 -0
  99. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_unlink.png +0 -0
  100. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/en.js +8 -0
  101. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/ru.js +8 -0
  102. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/uk.js +8 -0
  103. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/plugin.js +379 -0
  104. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_address.png +0 -0
  105. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_blockquote.png +0 -0
  106. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_div.png +0 -0
  107. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h1.png +0 -0
  108. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h2.png +0 -0
  109. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h3.png +0 -0
  110. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h4.png +0 -0
  111. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h5.png +0 -0
  112. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h6.png +0 -0
  113. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_p.png +0 -0
  114. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_pre.png +0 -0
  115. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/esp_showblocks.png +0 -0
  116. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/plugin.js +163 -0
  117. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/dialogs/esp_video.js +277 -0
  118. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/images/esp_video.png +0 -0
  119. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/images/placeholder.png +0 -0
  120. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/en.js +19 -0
  121. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/ru.js +19 -0
  122. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/uk.js +19 -0
  123. data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/plugin.js +182 -0
  124. data/app/assets/javascripts/esp-ckeditor/_source/plugins/fakeobjects/plugin.js +175 -0
  125. data/app/assets/javascripts/esp-ckeditor/_source/plugins/filebrowser/plugin.js +534 -0
  126. data/app/assets/javascripts/esp-ckeditor/_source/plugins/find/dialogs/find.js +915 -0
  127. data/app/assets/javascripts/esp-ckeditor/_source/plugins/find/plugin.js +47 -0
  128. data/app/assets/javascripts/esp-ckeditor/_source/plugins/floatpanel/plugin.js +428 -0
  129. data/app/assets/javascripts/esp-ckeditor/_source/plugins/format/plugin.js +197 -0
  130. data/app/assets/javascripts/esp-ckeditor/_source/plugins/htmldataprocessor/plugin.js +596 -0
  131. data/app/assets/javascripts/esp-ckeditor/_source/plugins/htmlwriter/plugin.js +319 -0
  132. data/app/assets/javascripts/esp-ckeditor/_source/plugins/image/dialogs/image.js +1407 -0
  133. data/app/assets/javascripts/esp-ckeditor/_source/plugins/image/plugin.js +81 -0
  134. data/app/assets/javascripts/esp-ckeditor/_source/plugins/indent/plugin.js +461 -0
  135. data/app/assets/javascripts/esp-ckeditor/_source/plugins/justify/plugin.js +253 -0
  136. data/app/assets/javascripts/esp-ckeditor/_source/plugins/keystrokes/plugin.js +225 -0
  137. data/app/assets/javascripts/esp-ckeditor/_source/plugins/list/plugin.js +774 -0
  138. data/app/assets/javascripts/esp-ckeditor/_source/plugins/listblock/plugin.js +266 -0
  139. data/app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +225 -0
  140. data/app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/plugin.js +66 -0
  141. data/app/assets/javascripts/esp-ckeditor/_source/plugins/maximize/plugin.js +353 -0
  142. data/app/assets/javascripts/esp-ckeditor/_source/plugins/menu/plugin.js +541 -0
  143. data/app/assets/javascripts/esp-ckeditor/_source/plugins/panel/plugin.js +400 -0
  144. data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastefromword/filter/default.js +1367 -0
  145. data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastefromword/plugin.js +141 -0
  146. data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +67 -0
  147. data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastetext/plugin.js +98 -0
  148. data/app/assets/javascripts/esp-ckeditor/_source/plugins/popup/plugin.js +64 -0
  149. data/app/assets/javascripts/esp-ckeditor/_source/plugins/removeformat/plugin.js +185 -0
  150. data/app/assets/javascripts/esp-ckeditor/_source/plugins/resize/plugin.js +168 -0
  151. data/app/assets/javascripts/esp-ckeditor/_source/plugins/richcombo/plugin.js +381 -0
  152. data/app/assets/javascripts/esp-ckeditor/_source/plugins/selection/plugin.js +1729 -0
  153. data/app/assets/javascripts/esp-ckeditor/_source/plugins/showborders/plugin.js +207 -0
  154. data/app/assets/javascripts/esp-ckeditor/_source/plugins/sourcearea/plugin.js +209 -0
  155. data/app/assets/javascripts/esp-ckeditor/_source/plugins/styles/plugin.js +1700 -0
  156. data/app/assets/javascripts/esp-ckeditor/_source/plugins/styles/styles/default.js +88 -0
  157. data/app/assets/javascripts/esp-ckeditor/_source/plugins/stylescombo/plugin.js +218 -0
  158. data/app/assets/javascripts/esp-ckeditor/_source/plugins/tab/plugin.js +367 -0
  159. data/app/assets/javascripts/esp-ckeditor/_source/plugins/table/dialogs/table.js +623 -0
  160. data/app/assets/javascripts/esp-ckeditor/_source/plugins/table/plugin.js +78 -0
  161. data/app/assets/javascripts/esp-ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +525 -0
  162. data/app/assets/javascripts/esp-ckeditor/_source/plugins/tabletools/plugin.js +1194 -0
  163. data/app/assets/javascripts/esp-ckeditor/_source/plugins/toolbar/plugin.js +545 -0
  164. data/app/assets/javascripts/esp-ckeditor/_source/plugins/undo/plugin.js +578 -0
  165. data/app/assets/javascripts/esp-ckeditor/_source/plugins/wysiwygarea/plugin.js +1347 -0
  166. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/dialog.css +988 -0
  167. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/editor.css +25 -0
  168. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/elementspath.css +73 -0
  169. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons.css +367 -0
  170. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons.png +0 -0
  171. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons_rtl.png +0 -0
  172. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
  173. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
  174. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
  175. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/mini.gif +0 -0
  176. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/noimage.png +0 -0
  177. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/sprites.png +0 -0
  178. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
  179. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
  180. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/mainui.css +209 -0
  181. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/menu.css +232 -0
  182. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/panel.css +227 -0
  183. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/presets.css +49 -0
  184. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/reset.css +85 -0
  185. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/richcombo.css +287 -0
  186. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/skin.js +236 -0
  187. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/templates.css +88 -0
  188. data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/toolbar.css +412 -0
  189. data/app/assets/javascripts/esp-ckeditor/_source/themes/default/theme.js +407 -0
  190. data/app/assets/javascripts/esp-ckeditor/application.js +8 -0
  191. data/app/assets/javascripts/esp-ckeditor/ckeditor.js +137 -0
  192. data/app/assets/javascripts/esp-ckeditor/ckeditor.pack +194 -0
  193. data/app/assets/javascripts/esp-ckeditor/ckeditor_source.js +35 -0
  194. data/app/assets/javascripts/esp-ckeditor/ckpackager.jar +0 -0
  195. data/app/assets/javascripts/esp-ckeditor/ckpackager.txt +2 -0
  196. data/app/assets/javascripts/esp-ckeditor/config.js +147 -0
  197. data/app/assets/javascripts/esp-ckeditor/contents.css +38 -0
  198. data/app/assets/javascripts/esp-ckeditor/images/spacer.gif +0 -0
  199. data/app/assets/javascripts/esp-ckeditor/init_ckeditor.js +1 -0
  200. data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +1 -0
  201. data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/lang/en.js +1 -0
  202. data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/lang/he.js +1 -0
  203. data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/plugin.js +1 -0
  204. data/app/assets/javascripts/esp-ckeditor/plugins/basicstyles/plugin.js +1 -0
  205. data/app/assets/javascripts/esp-ckeditor/plugins/button/plugin.js +1 -0
  206. data/app/assets/javascripts/esp-ckeditor/plugins/clipboard/dialogs/paste.js +1 -0
  207. data/app/assets/javascripts/esp-ckeditor/plugins/clipboard/plugin.js +1 -0
  208. data/app/assets/javascripts/esp-ckeditor/plugins/contextmenu/plugin.js +1 -0
  209. data/app/assets/javascripts/esp-ckeditor/plugins/dialog/dialogDefinition.js +0 -0
  210. data/app/assets/javascripts/esp-ckeditor/plugins/dialog/plugin.js +1 -0
  211. data/app/assets/javascripts/esp-ckeditor/plugins/dialogadvtab/plugin.js +1 -0
  212. data/app/assets/javascripts/esp-ckeditor/plugins/dialogui/plugin.js +1 -0
  213. data/app/assets/javascripts/esp-ckeditor/plugins/domiterator/plugin.js +1 -0
  214. data/app/assets/javascripts/esp-ckeditor/plugins/editingblock/plugin.js +1 -0
  215. data/app/assets/javascripts/esp-ckeditor/plugins/elementspath/plugin.js +1 -0
  216. data/app/assets/javascripts/esp-ckeditor/plugins/enterkey/plugin.js +1 -0
  217. data/app/assets/javascripts/esp-ckeditor/plugins/entities/plugin.js +1 -0
  218. data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/dialogs/esp_attachment.js +1 -0
  219. data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/images/esp_attachment.png +0 -0
  220. data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/en.js +1 -0
  221. data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/ru.js +1 -0
  222. data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/uk.js +1 -0
  223. data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/plugin.js +1 -0
  224. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/dialogs/esp_audio.js +1 -0
  225. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/images/esp_audio.png +0 -0
  226. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/images/placeholder.png +0 -0
  227. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/en.js +1 -0
  228. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/ru.js +1 -0
  229. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/uk.js +1 -0
  230. data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/plugin.js +1 -0
  231. data/app/assets/javascripts/esp-ckeditor/plugins/esp_blockquote/dialogs/esp_blockquote.js +1 -0
  232. data/app/assets/javascripts/esp-ckeditor/plugins/esp_blockquote/plugin.js +1 -0
  233. data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/dialogs/esp_image.js +1 -0
  234. data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/images/esp_image.png +0 -0
  235. data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/en.js +1 -0
  236. data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/ru.js +1 -0
  237. data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/uk.js +1 -0
  238. data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/plugin.js +1 -0
  239. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/dialogs/esp_anchor.js +1 -0
  240. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/dialogs/esp_link.js +1 -0
  241. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/anchor.png +0 -0
  242. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_anchor.png +0 -0
  243. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_link.png +0 -0
  244. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_unlink.png +0 -0
  245. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/en.js +1 -0
  246. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/ru.js +1 -0
  247. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/uk.js +1 -0
  248. data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/plugin.js +1 -0
  249. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_address.png +0 -0
  250. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_blockquote.png +0 -0
  251. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_div.png +0 -0
  252. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h1.png +0 -0
  253. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h2.png +0 -0
  254. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h3.png +0 -0
  255. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h4.png +0 -0
  256. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h5.png +0 -0
  257. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h6.png +0 -0
  258. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_p.png +0 -0
  259. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_pre.png +0 -0
  260. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/esp_showblocks.png +0 -0
  261. data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/plugin.js +1 -0
  262. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/dialogs/esp_video.js +1 -0
  263. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/images/esp_video.png +0 -0
  264. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/images/placeholder.png +0 -0
  265. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/en.js +1 -0
  266. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/ru.js +1 -0
  267. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/uk.js +1 -0
  268. data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/plugin.js +1 -0
  269. data/app/assets/javascripts/esp-ckeditor/plugins/fakeobjects/plugin.js +1 -0
  270. data/app/assets/javascripts/esp-ckeditor/plugins/filebrowser/plugin.js +1 -0
  271. data/app/assets/javascripts/esp-ckeditor/plugins/find/dialogs/find.js +1 -0
  272. data/app/assets/javascripts/esp-ckeditor/plugins/find/plugin.js +1 -0
  273. data/app/assets/javascripts/esp-ckeditor/plugins/floatpanel/plugin.js +1 -0
  274. data/app/assets/javascripts/esp-ckeditor/plugins/format/plugin.js +1 -0
  275. data/app/assets/javascripts/esp-ckeditor/plugins/htmldataprocessor/plugin.js +1 -0
  276. data/app/assets/javascripts/esp-ckeditor/plugins/htmlwriter/plugin.js +1 -0
  277. data/app/assets/javascripts/esp-ckeditor/plugins/image/dialogs/image.js +1 -0
  278. data/app/assets/javascripts/esp-ckeditor/plugins/image/plugin.js +1 -0
  279. data/app/assets/javascripts/esp-ckeditor/plugins/indent/plugin.js +1 -0
  280. data/app/assets/javascripts/esp-ckeditor/plugins/justify/plugin.js +1 -0
  281. data/app/assets/javascripts/esp-ckeditor/plugins/keystrokes/plugin.js +1 -0
  282. data/app/assets/javascripts/esp-ckeditor/plugins/list/plugin.js +1 -0
  283. data/app/assets/javascripts/esp-ckeditor/plugins/listblock/plugin.js +1 -0
  284. data/app/assets/javascripts/esp-ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -0
  285. data/app/assets/javascripts/esp-ckeditor/plugins/liststyle/plugin.js +1 -0
  286. data/app/assets/javascripts/esp-ckeditor/plugins/maximize/plugin.js +1 -0
  287. data/app/assets/javascripts/esp-ckeditor/plugins/menu/plugin.js +1 -0
  288. data/app/assets/javascripts/esp-ckeditor/plugins/panel/plugin.js +1 -0
  289. data/app/assets/javascripts/esp-ckeditor/plugins/pastefromword/filter/default.js +1 -0
  290. data/app/assets/javascripts/esp-ckeditor/plugins/pastefromword/plugin.js +1 -0
  291. data/app/assets/javascripts/esp-ckeditor/plugins/pastetext/dialogs/pastetext.js +1 -0
  292. data/app/assets/javascripts/esp-ckeditor/plugins/pastetext/plugin.js +1 -0
  293. data/app/assets/javascripts/esp-ckeditor/plugins/popup/plugin.js +1 -0
  294. data/app/assets/javascripts/esp-ckeditor/plugins/removeformat/plugin.js +1 -0
  295. data/app/assets/javascripts/esp-ckeditor/plugins/resize/plugin.js +1 -0
  296. data/app/assets/javascripts/esp-ckeditor/plugins/richcombo/plugin.js +1 -0
  297. data/app/assets/javascripts/esp-ckeditor/plugins/selection/plugin.js +1 -0
  298. data/app/assets/javascripts/esp-ckeditor/plugins/showborders/plugin.js +1 -0
  299. data/app/assets/javascripts/esp-ckeditor/plugins/sourcearea/plugin.js +1 -0
  300. data/app/assets/javascripts/esp-ckeditor/plugins/styles/plugin.js +1 -0
  301. data/app/assets/javascripts/esp-ckeditor/plugins/styles/styles/default.js +1 -0
  302. data/app/assets/javascripts/esp-ckeditor/plugins/stylescombo/plugin.js +1 -0
  303. data/app/assets/javascripts/esp-ckeditor/plugins/tab/plugin.js +1 -0
  304. data/app/assets/javascripts/esp-ckeditor/plugins/table/dialogs/table.js +1 -0
  305. data/app/assets/javascripts/esp-ckeditor/plugins/table/plugin.js +1 -0
  306. data/app/assets/javascripts/esp-ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -0
  307. data/app/assets/javascripts/esp-ckeditor/plugins/tabletools/plugin.js +1 -0
  308. data/app/assets/javascripts/esp-ckeditor/plugins/toolbar/plugin.js +1 -0
  309. data/app/assets/javascripts/esp-ckeditor/plugins/undo/plugin.js +1 -0
  310. data/app/assets/javascripts/esp-ckeditor/plugins/wysiwygarea/plugin.js +1 -0
  311. data/app/assets/javascripts/esp-ckeditor/skins/kama/dialog.css +988 -0
  312. data/app/assets/javascripts/esp-ckeditor/skins/kama/editor.css +25 -0
  313. data/app/assets/javascripts/esp-ckeditor/skins/kama/elementspath.css +73 -0
  314. data/app/assets/javascripts/esp-ckeditor/skins/kama/icons.css +367 -0
  315. data/app/assets/javascripts/esp-ckeditor/skins/kama/icons.png +0 -0
  316. data/app/assets/javascripts/esp-ckeditor/skins/kama/icons_rtl.png +0 -0
  317. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides.gif +0 -0
  318. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides.png +0 -0
  319. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
  320. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/mini.gif +0 -0
  321. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/noimage.png +0 -0
  322. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/sprites.png +0 -0
  323. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/sprites_ie6.png +0 -0
  324. data/app/assets/javascripts/esp-ckeditor/skins/kama/images/toolbar_start.gif +0 -0
  325. data/app/assets/javascripts/esp-ckeditor/skins/kama/mainui.css +209 -0
  326. data/app/assets/javascripts/esp-ckeditor/skins/kama/menu.css +232 -0
  327. data/app/assets/javascripts/esp-ckeditor/skins/kama/panel.css +227 -0
  328. data/app/assets/javascripts/esp-ckeditor/skins/kama/presets.css +49 -0
  329. data/app/assets/javascripts/esp-ckeditor/skins/kama/reset.css +85 -0
  330. data/app/assets/javascripts/esp-ckeditor/skins/kama/richcombo.css +287 -0
  331. data/app/assets/javascripts/esp-ckeditor/skins/kama/skin.js +236 -0
  332. data/app/assets/javascripts/esp-ckeditor/skins/kama/templates.css +88 -0
  333. data/app/assets/javascripts/esp-ckeditor/skins/kama/toolbar.css +412 -0
  334. data/app/inputs/ckeditor_input.rb +42 -0
  335. data/config/routes.rb +2 -0
  336. data/lib/esp-ckeditor/engine.rb +9 -0
  337. data/lib/esp-ckeditor/version.rb +3 -0
  338. data/lib/esp-ckeditor.rb +17 -0
  339. data/lib/tasks/esp-ckeditor_tasks.rake +4 -0
  340. metadata +434 -0
@@ -0,0 +1,22 @@
1
+ CKEDITOR.plugins.setLang('esp_attachment', 'en',
2
+ {
3
+ esp_attachment:
4
+ {
5
+ title: "Insert attachment",
6
+ button: "Attachment",
7
+ url: "URL",
8
+ name: "Title",
9
+ browseServer : 'Browse',
10
+
11
+ link:
12
+ {
13
+ targetNotSet: '<undefined>',
14
+ targetFrame: '<frame>',
15
+ targetNew: 'New window (_blank)',
16
+ targetTop: 'Topmost window (_top)',
17
+ targetSelf: 'Same window (_self)',
18
+ targetParent: 'Parent window (_parent)'
19
+ }
20
+ }
21
+ });
22
+
@@ -0,0 +1,22 @@
1
+ CKEDITOR.plugins.setLang('esp_attachment', 'ru',
2
+ {
3
+ esp_attachment:
4
+ {
5
+ title: "Вставить файл",
6
+ button: "Файл",
7
+ url: "Ссылка на файл",
8
+ name: "Название файла",
9
+ browseServer : 'Вставить',
10
+
11
+ link:
12
+ {
13
+ targetNotSet: '<не определено>',
14
+ targetFrame: '<фрейм>',
15
+ targetNew: 'Новое окно (_blank)',
16
+ targetTop: 'Самое верхнее окно (_top)',
17
+ targetSelf: 'Тоже окно (_self)',
18
+ targetParent: 'Родительское окно (_parent)'
19
+ }
20
+ }
21
+ });
22
+
@@ -0,0 +1,22 @@
1
+ CKEDITOR.plugins.setLang('esp_attachment', 'uk',
2
+ {
3
+ esp_attachment:
4
+ {
5
+ title: "Вставити файл",
6
+ button: "Файл",
7
+ url: "Посилання на файл",
8
+ name: "Назва файлу",
9
+ browseServer : 'Вставити',
10
+
11
+ link:
12
+ {
13
+ targetNotSet: '<не визначено>',
14
+ targetFrame: '<фрейм>',
15
+ targetNew: 'Нове вікно (_blank)',
16
+ targetTop: 'Саме верхнє вікно (_top)',
17
+ targetSelf: 'Теж вікно (_self)',
18
+ targetParent: 'Батьківське вікно (_parent)'
19
+ }
20
+ }
21
+ });
22
+
@@ -0,0 +1,23 @@
1
+ (function () {
2
+ var esp_attachmentCmd = {
3
+ exec: function (editor) {
4
+ editor.openDialog('esp_attachment');
5
+ return
6
+ }
7
+ };
8
+ CKEDITOR.plugins.add('esp_attachment', {
9
+ lang: ['en', 'ru', 'uk'],
10
+ requires: ['dialog'],
11
+ init: function (editor) {
12
+ var commandName = 'esp_attachment';
13
+ editor.addCommand(commandName, esp_attachmentCmd);
14
+ editor.ui.addButton('Esp_attachment', {
15
+ label: editor.lang.esp_attachment.button,
16
+ command: commandName,
17
+ icon: this.path + "images/esp_attachment.png"
18
+ });
19
+ CKEDITOR.dialog.add(commandName, CKEDITOR.getUrl(this.path + 'dialogs/esp_attachment.js'))
20
+ }
21
+ })
22
+ })();
23
+
@@ -0,0 +1,207 @@
1
+ CKEDITOR.dialog.add( 'esp_audio', function ( editor )
2
+ {
3
+ var lang = editor.lang.esp_audio;
4
+
5
+ function commitValue( audioNode, extraStyles )
6
+ {
7
+ var value=this.getValue();
8
+
9
+ if ( !value && this.id=='id' )
10
+ value = generateId();
11
+
12
+ audioNode.setAttribute( this.id, value);
13
+
14
+ if ( !value )
15
+ return;
16
+ switch( this.id )
17
+ {
18
+ case 'width':
19
+ extraStyles.width = value + 'px';
20
+ break;
21
+ case 'height':
22
+ extraStyles.height = value + 'px';
23
+ break;
24
+ }
25
+ }
26
+
27
+ function commitSrc( audioNode, extraStyles, audios )
28
+ {
29
+ var match = this.id.match(/(\w+)(\d)/),
30
+ id = match[1],
31
+ number = parseInt(match[2], 10);
32
+
33
+ var audio = audios[number] || (audios[number]={});
34
+ audio[id] = this.getValue();
35
+ }
36
+
37
+ function loadValue( audioNode )
38
+ {
39
+ if ( audioNode )
40
+ this.setValue( audioNode.getAttribute( this.id ) );
41
+ else
42
+ {
43
+ if ( this.id == 'id')
44
+ this.setValue( generateId() );
45
+ }
46
+ }
47
+
48
+ function loadSrc( audioNode, audios )
49
+ {
50
+ var match = this.id.match(/(\w+)(\d)/),
51
+ id = match[1],
52
+ number = parseInt(match[2], 10);
53
+
54
+ var audio = audios[number];
55
+ if (!audio)
56
+ return;
57
+ this.setValue( audio[ id ] );
58
+ }
59
+
60
+ function generateId()
61
+ {
62
+ var now = new Date();
63
+ return 'audio' + now.getFullYear() + now.getMonth() + now.getDate() + now.getHours() + now.getMinutes() + now.getSeconds();
64
+ }
65
+
66
+ // To automatically get the dimensions of the poster image
67
+ var onImgLoadEvent = function()
68
+ {
69
+ // Image is ready.
70
+ var preview = this.previewImage;
71
+ preview.removeListener( 'load', onImgLoadEvent );
72
+ preview.removeListener( 'error', onImgLoadErrorEvent );
73
+ preview.removeListener( 'abort', onImgLoadErrorEvent );
74
+
75
+ this.setValueOf( 'info', 'width', preview.$.width );
76
+ this.setValueOf( 'info', 'height', preview.$.height );
77
+ };
78
+
79
+ var onImgLoadErrorEvent = function()
80
+ {
81
+ // Error. Image is not loaded.
82
+ var preview = this.previewImage;
83
+ preview.removeListener( 'load', onImgLoadEvent );
84
+ preview.removeListener( 'error', onImgLoadErrorEvent );
85
+ preview.removeListener( 'abort', onImgLoadErrorEvent );
86
+ };
87
+
88
+ return {
89
+ title : lang.dialogTitle,
90
+ minWidth : 400,
91
+ minHeight : 50,
92
+
93
+ onShow : function()
94
+ {
95
+ // Clear previously saved elements.
96
+ this.fakeImage = this.audioNode = null;
97
+ // To get dimensions of poster image
98
+ this.previewImage = editor.document.createElement( 'img' );
99
+
100
+ var fakeImage = this.getSelectedElement();
101
+ if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'audio' )
102
+ {
103
+ this.fakeImage = fakeImage;
104
+
105
+ var audioNode = editor.restoreRealElement( fakeImage ),
106
+ audios = [];
107
+
108
+ audios.push( {src : audioNode.getAttribute( 'src' )} );
109
+
110
+ this.audioNode = audioNode;
111
+
112
+ this.setupContent( audioNode, audios );
113
+ }
114
+ else
115
+ this.setupContent( null, [] );
116
+ },
117
+
118
+ onOk : function()
119
+ {
120
+ // If there's no selected element create one. Otherwise, reuse it
121
+ var audioNode = null;
122
+ if ( !this.fakeImage )
123
+ {
124
+ audioNode = CKEDITOR.dom.element.createFromHtml( '<cke:audio></cke:audio>', editor.document );
125
+ audioNode.setAttributes(
126
+ {
127
+ controls: 'controls',
128
+ src: this.getValueOf( 'info', 'src0')
129
+ } );
130
+ }
131
+ else
132
+ {
133
+ audioNode = this.audioNode;
134
+ }
135
+
136
+ var extraStyles = {}, audios = [];
137
+ this.commitContent( audioNode, extraStyles, audios );
138
+
139
+ var innerHtml = '', links = '',
140
+ link = lang.linkTemplate || '',
141
+ fallbackTemplate = lang.fallbackTemplate || '';
142
+
143
+ links = link.replace('%src%', this.getValueOf('info', 'src0')).replace('%type%', this.getValueOf('info', 'src0').split('/').pop());
144
+ audioNode.setHtml( innerHtml + fallbackTemplate.replace( '%links%', links ) );
145
+
146
+ // Refresh the fake image.
147
+ var newFakeImage = editor.createFakeElement( audioNode, 'cke_audio', 'audio', false );
148
+ newFakeImage.setStyles( extraStyles );
149
+ if ( this.fakeImage )
150
+ {
151
+ newFakeImage.replace( this.fakeImage );
152
+ editor.getSelection().selectElement( newFakeImage );
153
+ }
154
+ else
155
+ editor.insertElement( newFakeImage );
156
+ },
157
+ onHide : function()
158
+ {
159
+ if ( this.previewImage )
160
+ {
161
+ this.previewImage.removeListener( 'load', onImgLoadEvent );
162
+ this.previewImage.removeListener( 'error', onImgLoadErrorEvent );
163
+ this.previewImage.removeListener( 'abort', onImgLoadErrorEvent );
164
+ this.previewImage.remove();
165
+ this.previewImage = null; // Dialog is closed.
166
+ }
167
+ },
168
+
169
+ contents :
170
+ [
171
+ {
172
+ id : 'info',
173
+ elements :
174
+ [
175
+ {
176
+ type : 'hbox',
177
+ widths: [ '320px', '80px'],
178
+ children : [
179
+ {
180
+ type : 'text',
181
+ id : 'src0',
182
+ label : lang.sourceAudio,
183
+ commit : commitSrc,
184
+ setup : loadSrc
185
+ },
186
+ {
187
+ type : 'button',
188
+ id : 'browse',
189
+ hidden : 'true',
190
+ style : 'display:inline-block;margin-top:10px;',
191
+ filebrowser :
192
+ {
193
+ action : 'Browse',
194
+ target: 'info:src0',
195
+ url: editor.config.filebrowserAudioBrowseUrl || editor.config.filebrowserBrowseUrl
196
+ },
197
+ label : editor.lang.esp_audio.browseServer
198
+ }
199
+ ]
200
+ }
201
+ ]
202
+ }
203
+
204
+ ]
205
+ };
206
+ } );
207
+
@@ -0,0 +1,18 @@
1
+ CKEDITOR.plugins.setLang( 'esp_audio', 'en',
2
+ {
3
+ esp_audio:
4
+ {
5
+ toolbar: 'Audio',
6
+ dialogTitle: 'Audio properties',
7
+ browseServer: 'Browse',
8
+ fakeObject: 'Audio',
9
+ properties: 'Edit Audio',
10
+ widthRequired: 'Width field cannot be empty',
11
+ heightRequired: 'Height field cannot be empty',
12
+ sourceAudio: 'Source audio',
13
+ sourceType: 'Audio type',
14
+ linkTemplate: '<a href="%src%">%type%</a> ',
15
+ fallbackTemplate: 'Your browser doesn\'t support audio. Please download the file: %links%'
16
+ }
17
+ });
18
+
@@ -0,0 +1,18 @@
1
+ CKEDITOR.plugins.setLang( 'esp_audio', 'ru',
2
+ {
3
+ esp_audio:
4
+ {
5
+ toolbar: 'Аудио',
6
+ dialogTitle: 'Параметры аудио',
7
+ browseServer: 'Выбор',
8
+ fakeObject: 'Аудио',
9
+ properties: 'Редактировать аудио',
10
+ widthRequired: 'Поле "ширина" не может быть пустым',
11
+ heightRequired: 'Поле "высота" не может быть пустым',
12
+ sourceAudio: 'Источник',
13
+ sourceType: 'Тип источника',
14
+ linkTemplate: '<a href="%src%">%type%</a> ',
15
+ fallbackTemplate: 'Ваш браузер не поддерживает тэг audio. Вы можете скачать файл: %links%'
16
+ }
17
+ });
18
+
@@ -0,0 +1,18 @@
1
+ CKEDITOR.plugins.setLang( 'esp_audio', 'uk',
2
+ {
3
+ esp_audio:
4
+ {
5
+ toolbar: 'Аудіо',
6
+ dialogTitle: 'Параметри аудіо',
7
+ browseServer: 'Вибір',
8
+ fakeObject: 'Аудіо',
9
+ properties: 'Редагувати аудіо',
10
+ widthRequired: 'Поле "ширина" не може бути порожнім',
11
+ heightRequired: 'Поле "висота" не може бути порожнім',
12
+ sourceAudio: 'Джерело',
13
+ sourceType: 'Тип джерела',
14
+ linkTemplate: '<a href="%src%">%type%</a> ',
15
+ fallbackTemplate: 'Ваш браузер не підтримує тег audio. Ви можете завантажити файл: %links%'
16
+ }
17
+ });
18
+
@@ -0,0 +1,182 @@
1
+ /*
2
+ * @file Esp_audio plugin for CKEditor
3
+ * Copyright (C) 2011 Alfonso Martínez de Lizarrondo
4
+ *
5
+ * == BEGIN LICENSE ==
6
+ *
7
+ * Licensed under the terms of any of the following licenses at your
8
+ * choice:
9
+ *
10
+ * - GNU General Public License Version 2 or later (the "GPL")
11
+ * http://www.gnu.org/licenses/gpl.html
12
+ *
13
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
14
+ * http://www.gnu.org/licenses/lgpl.html
15
+ *
16
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
17
+ * http://www.mozilla.org/MPL/MPL-1.1.html
18
+ *
19
+ * == END LICENSE ==
20
+ *
21
+ */
22
+
23
+ CKEDITOR.plugins.add( 'esp_audio',
24
+ {
25
+ // Translations, available at the end of this file, without extra requests
26
+ lang: ['en', 'ru', 'uk'],
27
+ init : function( editor )
28
+ {
29
+ var lang = editor.lang.esp_audio;
30
+
31
+ // Check for CKEditor 3.5
32
+ if (typeof editor.element.data == 'undefined')
33
+ {
34
+ alert('The "audio" plugin requires CKEditor 3.5 or newer');
35
+ return;
36
+ }
37
+
38
+ CKEDITOR.dialog.add( 'esp_audio', this.path + 'dialogs/esp_audio.js' );
39
+
40
+ editor.addCommand( 'esp_audio', new CKEDITOR.dialogCommand( 'esp_audio' ) );
41
+ editor.ui.addButton( 'Esp_audio',
42
+ {
43
+ label : lang.toolbar,
44
+ command : 'esp_audio',
45
+ icon : this.path + 'images/esp_audio.png'
46
+ } );
47
+
48
+ editor.addCss(
49
+ 'img.cke_audio' +
50
+ '{' +
51
+ 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/placeholder.png' ) + ');' +
52
+ 'background-position: center center;' +
53
+ 'background-repeat: no-repeat;' +
54
+ 'background-color: gray;'+
55
+ 'border: 1px solid #a9a9a9;' +
56
+ 'width: 300px;' +
57
+ 'height: 64px;' +
58
+ '}');
59
+
60
+
61
+ // If the "menu" plugin is loaded, register the menu items.
62
+ if ( editor.addMenuItems )
63
+ {
64
+ editor.addMenuItems(
65
+ {
66
+ audio :
67
+ {
68
+ label : lang.properties,
69
+ command : 'audio',
70
+ group : 'flash'
71
+ }
72
+ });
73
+ }
74
+
75
+ editor.on( 'doubleclick', function( evt )
76
+ {
77
+ var element = evt.data.element;
78
+
79
+ if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'audio' )
80
+ evt.data.dialog = 'audio';
81
+ });
82
+
83
+ // If the "contextmenu" plugin is loaded, register the listeners.
84
+ if ( editor.contextMenu )
85
+ {
86
+ editor.contextMenu.addListener( function( element, selection )
87
+ {
88
+ if ( element && element.is( 'img' ) && !element.isReadOnly()
89
+ && element.data( 'cke-real-element-type' ) == 'audio' )
90
+ return { audio : CKEDITOR.TRISTATE_OFF };
91
+ });
92
+ }
93
+
94
+ // Add special handling for these items
95
+ CKEDITOR.dtd.$empty['cke:source']=1;
96
+ CKEDITOR.dtd.$empty['source']=1;
97
+
98
+ editor.lang.fakeobjects.audio = lang.fakeObject;
99
+
100
+
101
+ }, //Init
102
+
103
+ afterInit: function( editor )
104
+ {
105
+
106
+ var dataProcessor = editor.dataProcessor,
107
+ htmlFilter = dataProcessor && dataProcessor.htmlFilter,
108
+ dataFilter = dataProcessor && dataProcessor.dataFilter;
109
+ var handler = editor.plugins.googleMapsHandler;
110
+
111
+ // dataFilter : conversion from html input to internal data
112
+ dataFilter.addRules(
113
+ {
114
+
115
+ elements : {
116
+ $ : function( realElement )
117
+ {
118
+ if ( realElement.name == 'audio' )
119
+ {
120
+ realElement.name = 'cke:audio';
121
+ var fakeElement = editor.createFakeParserElement( realElement, 'cke_audio', 'audio', false ),
122
+ fakeStyle = fakeElement.attributes.style || '';
123
+
124
+ var width = realElement.attributes.width,
125
+ height = realElement.attributes.height,
126
+ poster = realElement.attributes.poster;
127
+
128
+ if ( typeof width != 'undefined' )
129
+ fakeStyle = fakeElement.attributes.style = fakeStyle + 'width:' + CKEDITOR.tools.cssLength( width ) + ';';
130
+
131
+ if ( typeof height != 'undefined' )
132
+ fakeStyle = fakeElement.attributes.style = fakeStyle + 'height:' + CKEDITOR.tools.cssLength( height ) + ';';
133
+
134
+ if ( poster )
135
+ fakeStyle = fakeElement.attributes.style = fakeStyle + 'background-image:url(' + poster + ');';
136
+
137
+ return fakeElement;
138
+ }
139
+ }
140
+ }
141
+
142
+ }
143
+ );
144
+
145
+ // htmlFilter : conversion from internal data to html output.
146
+ htmlFilter.addRules(
147
+ {
148
+ elements :
149
+ {
150
+ $ : function( element )
151
+ {
152
+ if ( element.name == 'img' )
153
+ {
154
+
155
+ var number = element.attributes.mapnumber;
156
+ if (number)
157
+ {
158
+ var scriptNode,
159
+ handler = editor.plugins.googleMapsHandler,
160
+ oMap = handler.getMap( number ) ;
161
+
162
+ if (oMap && oMap.generatedType>1)
163
+ {
164
+ handler.CreatedMapsNames.push( oMap.number ) ;
165
+ // Inject the <script> for this map
166
+ scriptNode = new CKEDITOR.htmlParser.cdata( oMap.BuildScript() );
167
+ element.parent.children.push( scriptNode );
168
+ }
169
+ delete element.attributes.mapnumber;
170
+ }
171
+ }
172
+
173
+ return element;
174
+ }
175
+ }
176
+ });
177
+
178
+
179
+
180
+ }
181
+ } );
182
+