esp-ckeditor 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,66 @@
1
+ /*
2
+ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+
6
+ (function()
7
+ {
8
+ CKEDITOR.plugins.liststyle =
9
+ {
10
+ requires : [ 'dialog' ],
11
+ init : function( editor )
12
+ {
13
+ editor.addCommand( 'numberedListStyle', new CKEDITOR.dialogCommand( 'numberedListStyle' ) );
14
+ CKEDITOR.dialog.add( 'numberedListStyle', this.path + 'dialogs/liststyle.js' );
15
+ editor.addCommand( 'bulletedListStyle', new CKEDITOR.dialogCommand( 'bulletedListStyle' ) );
16
+ CKEDITOR.dialog.add( 'bulletedListStyle', this.path + 'dialogs/liststyle.js' );
17
+
18
+ // If the "menu" plugin is loaded, register the menu items.
19
+ if ( editor.addMenuItems )
20
+ {
21
+ //Register map group;
22
+ editor.addMenuGroup("list", 108);
23
+
24
+ editor.addMenuItems(
25
+ {
26
+ numberedlist :
27
+ {
28
+ label : editor.lang.list.numberedTitle,
29
+ group : 'list',
30
+ command: 'numberedListStyle'
31
+ },
32
+ bulletedlist :
33
+ {
34
+ label : editor.lang.list.bulletedTitle,
35
+ group : 'list',
36
+ command: 'bulletedListStyle'
37
+ }
38
+ });
39
+ }
40
+
41
+ // If the "contextmenu" plugin is loaded, register the listeners.
42
+ if ( editor.contextMenu )
43
+ {
44
+ editor.contextMenu.addListener( function( element, selection )
45
+ {
46
+ if ( !element || element.isReadOnly() )
47
+ return null;
48
+
49
+ while ( element )
50
+ {
51
+ var name = element.getName();
52
+ if ( name == 'ol' )
53
+ return { numberedlist: CKEDITOR.TRISTATE_OFF };
54
+ else if ( name == 'ul' )
55
+ return { bulletedlist: CKEDITOR.TRISTATE_OFF };
56
+
57
+ element = element.getParent();
58
+ }
59
+ return null;
60
+ });
61
+ }
62
+ }
63
+ };
64
+
65
+ CKEDITOR.plugins.add( 'liststyle', CKEDITOR.plugins.liststyle );
66
+ })();
@@ -0,0 +1,353 @@
1
+ /*
2
+ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+
6
+ (function()
7
+ {
8
+ function protectFormStyles( formElement )
9
+ {
10
+ if ( !formElement || formElement.type != CKEDITOR.NODE_ELEMENT || formElement.getName() != 'form' )
11
+ return [];
12
+
13
+ var hijackRecord = [],
14
+ hijackNames = [ 'style', 'className' ];
15
+ for ( var i = 0 ; i < hijackNames.length ; i++ )
16
+ {
17
+ var name = hijackNames[i];
18
+ var $node = formElement.$.elements.namedItem( name );
19
+ if ( $node )
20
+ {
21
+ var hijackNode = new CKEDITOR.dom.element( $node );
22
+ hijackRecord.push( [ hijackNode, hijackNode.nextSibling ] );
23
+ hijackNode.remove();
24
+ }
25
+ }
26
+
27
+ return hijackRecord;
28
+ }
29
+
30
+ function restoreFormStyles( formElement, hijackRecord )
31
+ {
32
+ if ( !formElement || formElement.type != CKEDITOR.NODE_ELEMENT || formElement.getName() != 'form' )
33
+ return;
34
+
35
+ if ( hijackRecord.length > 0 )
36
+ {
37
+ for ( var i = hijackRecord.length - 1 ; i >= 0 ; i-- )
38
+ {
39
+ var node = hijackRecord[i][0];
40
+ var sibling = hijackRecord[i][1];
41
+ if ( sibling )
42
+ node.insertBefore( sibling );
43
+ else
44
+ node.appendTo( formElement );
45
+ }
46
+ }
47
+ }
48
+
49
+ function saveStyles( element, isInsideEditor )
50
+ {
51
+ var data = protectFormStyles( element );
52
+ var retval = {};
53
+
54
+ var $element = element.$;
55
+
56
+ if ( !isInsideEditor )
57
+ {
58
+ retval[ 'class' ] = $element.className || '';
59
+ $element.className = '';
60
+ }
61
+
62
+ retval.inline = $element.style.cssText || '';
63
+ if ( !isInsideEditor ) // Reset any external styles that might interfere. (#2474)
64
+ $element.style.cssText = 'position: static; overflow: visible';
65
+
66
+ restoreFormStyles( data );
67
+ return retval;
68
+ }
69
+
70
+ function restoreStyles( element, savedStyles )
71
+ {
72
+ var data = protectFormStyles( element );
73
+ var $element = element.$;
74
+ if ( 'class' in savedStyles )
75
+ $element.className = savedStyles[ 'class' ];
76
+ if ( 'inline' in savedStyles )
77
+ $element.style.cssText = savedStyles.inline;
78
+ restoreFormStyles( data );
79
+ }
80
+
81
+ function refreshCursor( editor )
82
+ {
83
+ // Refresh all editor instances on the page (#5724).
84
+ var all = CKEDITOR.instances;
85
+ for ( var i in all )
86
+ {
87
+ var one = all[ i ];
88
+ if ( one.mode == 'wysiwyg' && !one.readOnly )
89
+ {
90
+ var body = one.document.getBody();
91
+ // Refresh 'contentEditable' otherwise
92
+ // DOM lifting breaks design mode. (#5560)
93
+ body.setAttribute( 'contentEditable', false );
94
+ body.setAttribute( 'contentEditable', true );
95
+ }
96
+ }
97
+
98
+ if ( editor.focusManager.hasFocus )
99
+ {
100
+ editor.toolbox.focus();
101
+ editor.focus();
102
+ }
103
+ }
104
+
105
+ /**
106
+ * Adding an iframe shim to this element, OR removing the existing one if already applied.
107
+ * Note: This will only affect IE version below 7.
108
+ */
109
+ function createIframeShim( element )
110
+ {
111
+ if ( !CKEDITOR.env.ie || CKEDITOR.env.version > 6 )
112
+ return null;
113
+
114
+ var shim = CKEDITOR.dom.element.createFromHtml( '<iframe frameborder="0" tabindex="-1"' +
115
+ ' src="javascript:' +
116
+ 'void((function(){' +
117
+ 'document.open();' +
118
+ ( CKEDITOR.env.isCustomDomain() ? 'document.domain=\'' + this.getDocument().$.domain + '\';' : '' ) +
119
+ 'document.close();' +
120
+ '})())"' +
121
+ ' style="display:block;position:absolute;z-index:-1;' +
122
+ 'progid:DXImageTransform.Microsoft.Alpha(opacity=0);' +
123
+ '"></iframe>' );
124
+ return element.append( shim, true );
125
+ }
126
+
127
+ CKEDITOR.plugins.add( 'maximize',
128
+ {
129
+ init : function( editor )
130
+ {
131
+ var lang = editor.lang;
132
+ var mainDocument = CKEDITOR.document,
133
+ mainWindow = mainDocument.getWindow();
134
+
135
+ // Saved selection and scroll position for the editing area.
136
+ var savedSelection,
137
+ savedScroll;
138
+
139
+ // Saved scroll position for the outer window.
140
+ var outerScroll;
141
+
142
+ var shim;
143
+
144
+ // Saved resize handler function.
145
+ function resizeHandler()
146
+ {
147
+ var viewPaneSize = mainWindow.getViewPaneSize();
148
+ shim && shim.setStyles( { width : viewPaneSize.width + 'px', height : viewPaneSize.height + 'px' } );
149
+ editor.resize( viewPaneSize.width, viewPaneSize.height, null, true );
150
+ }
151
+
152
+ // Retain state after mode switches.
153
+ var savedState = CKEDITOR.TRISTATE_OFF;
154
+
155
+ editor.addCommand( 'maximize',
156
+ {
157
+ // Disabled on iOS (#8307).
158
+ modes : { wysiwyg : !CKEDITOR.env.iOS, source : !CKEDITOR.env.iOS },
159
+ readOnly : 1,
160
+ editorFocus : false,
161
+ exec : function()
162
+ {
163
+ var container = editor.container.getChild( 1 );
164
+ var contents = editor.getThemeSpace( 'contents' );
165
+
166
+ // Save current selection and scroll position in editing area.
167
+ if ( editor.mode == 'wysiwyg' )
168
+ {
169
+ var selection = editor.getSelection();
170
+ savedSelection = selection && selection.getRanges();
171
+ savedScroll = mainWindow.getScrollPosition();
172
+ }
173
+ else
174
+ {
175
+ var $textarea = editor.textarea.$;
176
+ savedSelection = !CKEDITOR.env.ie && [ $textarea.selectionStart, $textarea.selectionEnd ];
177
+ savedScroll = [ $textarea.scrollLeft, $textarea.scrollTop ];
178
+ }
179
+
180
+ if ( this.state == CKEDITOR.TRISTATE_OFF ) // Go fullscreen if the state is off.
181
+ {
182
+ // Add event handler for resizing.
183
+ mainWindow.on( 'resize', resizeHandler );
184
+
185
+ // Save the scroll bar position.
186
+ outerScroll = mainWindow.getScrollPosition();
187
+
188
+ // Save and reset the styles for the entire node tree.
189
+ var currentNode = editor.container;
190
+ while ( ( currentNode = currentNode.getParent() ) )
191
+ {
192
+ currentNode.setCustomData( 'maximize_saved_styles', saveStyles( currentNode ) );
193
+ currentNode.setStyle( 'z-index', editor.config.baseFloatZIndex - 1 );
194
+ }
195
+ contents.setCustomData( 'maximize_saved_styles', saveStyles( contents, true ) );
196
+ container.setCustomData( 'maximize_saved_styles', saveStyles( container, true ) );
197
+
198
+ // Hide scroll bars.
199
+ var styles =
200
+ {
201
+ overflow : CKEDITOR.env.webkit ? '' : 'hidden', // #6896
202
+ width : 0,
203
+ height : 0
204
+ };
205
+
206
+ mainDocument.getDocumentElement().setStyles( styles );
207
+ !CKEDITOR.env.gecko && mainDocument.getDocumentElement().setStyle( 'position', 'fixed' );
208
+ !( CKEDITOR.env.gecko && CKEDITOR.env.quirks ) && mainDocument.getBody().setStyles( styles );
209
+
210
+ // Scroll to the top left (IE needs some time for it - #4923).
211
+ CKEDITOR.env.ie ?
212
+ setTimeout( function() { mainWindow.$.scrollTo( 0, 0 ); }, 0 ) :
213
+ mainWindow.$.scrollTo( 0, 0 );
214
+
215
+ // Resize and move to top left.
216
+ // Special treatment for FF Quirks (#7284)
217
+ container.setStyle( 'position', CKEDITOR.env.gecko && CKEDITOR.env.quirks ? 'fixed' : 'absolute' );
218
+ container.$.offsetLeft; // SAFARI BUG: See #2066.
219
+ container.setStyles(
220
+ {
221
+ 'z-index' : editor.config.baseFloatZIndex - 1,
222
+ left : '0px',
223
+ top : '0px'
224
+ } );
225
+
226
+ shim = createIframeShim( container ); // IE6 select element penetration when maximized. (#4459)
227
+
228
+ // Add cke_maximized class before resize handle since that will change things sizes (#5580)
229
+ container.addClass( 'cke_maximized' );
230
+
231
+ resizeHandler();
232
+
233
+ // Still not top left? Fix it. (Bug #174)
234
+ var offset = container.getDocumentPosition();
235
+ container.setStyles(
236
+ {
237
+ left : ( -1 * offset.x ) + 'px',
238
+ top : ( -1 * offset.y ) + 'px'
239
+ } );
240
+
241
+ // Fixing positioning editor chrome in Firefox break design mode. (#5149)
242
+ CKEDITOR.env.gecko && refreshCursor( editor );
243
+
244
+ }
245
+ else if ( this.state == CKEDITOR.TRISTATE_ON ) // Restore from fullscreen if the state is on.
246
+ {
247
+ // Remove event handler for resizing.
248
+ mainWindow.removeListener( 'resize', resizeHandler );
249
+
250
+ // Restore CSS styles for the entire node tree.
251
+ var editorElements = [ contents, container ];
252
+ for ( var i = 0 ; i < editorElements.length ; i++ )
253
+ {
254
+ restoreStyles( editorElements[i], editorElements[i].getCustomData( 'maximize_saved_styles' ) );
255
+ editorElements[i].removeCustomData( 'maximize_saved_styles' );
256
+ }
257
+
258
+ currentNode = editor.container;
259
+ while ( ( currentNode = currentNode.getParent() ) )
260
+ {
261
+ restoreStyles( currentNode, currentNode.getCustomData( 'maximize_saved_styles' ) );
262
+ currentNode.removeCustomData( 'maximize_saved_styles' );
263
+ }
264
+
265
+ // Restore the window scroll position.
266
+ CKEDITOR.env.ie ?
267
+ setTimeout( function() { mainWindow.$.scrollTo( outerScroll.x, outerScroll.y ); }, 0 ) :
268
+ mainWindow.$.scrollTo( outerScroll.x, outerScroll.y );
269
+
270
+ // Remove cke_maximized class.
271
+ container.removeClass( 'cke_maximized' );
272
+
273
+ // Webkit requires a re-layout on editor chrome. (#6695)
274
+ if ( CKEDITOR.env.webkit )
275
+ {
276
+ container.setStyle( 'display', 'inline' );
277
+ setTimeout( function(){ container.setStyle( 'display', 'block' ); }, 0 );
278
+ }
279
+
280
+ if ( shim )
281
+ {
282
+ shim.remove();
283
+ shim = null;
284
+ }
285
+
286
+ // Emit a resize event, because this time the size is modified in
287
+ // restoreStyles.
288
+ editor.fire( 'resize' );
289
+ }
290
+
291
+ this.toggleState();
292
+
293
+ // Toggle button label.
294
+ var button = this.uiItems[ 0 ];
295
+ // Only try to change the button if it exists (#6166)
296
+ if( button )
297
+ {
298
+ var label = ( this.state == CKEDITOR.TRISTATE_OFF )
299
+ ? lang.maximize : lang.minimize;
300
+ var buttonNode = editor.element.getDocument().getById( button._.id );
301
+ buttonNode.getChild( 1 ).setHtml( label );
302
+ buttonNode.setAttribute( 'title', label );
303
+ buttonNode.setAttribute( 'href', 'javascript:void("' + label + '");' );
304
+ }
305
+
306
+ // Restore selection and scroll position in editing area.
307
+ if ( editor.mode == 'wysiwyg' )
308
+ {
309
+ if ( savedSelection )
310
+ {
311
+ // Fixing positioning editor chrome in Firefox break design mode. (#5149)
312
+ CKEDITOR.env.gecko && refreshCursor( editor );
313
+
314
+ editor.getSelection().selectRanges(savedSelection);
315
+ var element = editor.getSelection().getStartElement();
316
+ element && element.scrollIntoView( true );
317
+ }
318
+
319
+ else
320
+ mainWindow.$.scrollTo( savedScroll.x, savedScroll.y );
321
+ }
322
+ else
323
+ {
324
+ if ( savedSelection )
325
+ {
326
+ $textarea.selectionStart = savedSelection[0];
327
+ $textarea.selectionEnd = savedSelection[1];
328
+ }
329
+ $textarea.scrollLeft = savedScroll[0];
330
+ $textarea.scrollTop = savedScroll[1];
331
+ }
332
+
333
+ savedSelection = savedScroll = null;
334
+ savedState = this.state;
335
+ },
336
+ canUndo : false
337
+ } );
338
+
339
+ editor.ui.addButton( 'Maximize',
340
+ {
341
+ label : lang.maximize,
342
+ command : 'maximize'
343
+ } );
344
+
345
+ // Restore the command state after mode change, unless it has been changed to disabled (#6467)
346
+ editor.on( 'mode', function()
347
+ {
348
+ var command = editor.getCommand( 'maximize' );
349
+ command.setState( command.state == CKEDITOR.TRISTATE_DISABLED ? CKEDITOR.TRISTATE_DISABLED : savedState );
350
+ }, null, null, 100 );
351
+ }
352
+ } );
353
+ })();
@@ -0,0 +1,541 @@
1
+ /*
2
+ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+
6
+ CKEDITOR.plugins.add( 'menu',
7
+ {
8
+ beforeInit : function( editor )
9
+ {
10
+ var groups = editor.config.menu_groups.split( ',' ),
11
+ groupsOrder = editor._.menuGroups = {},
12
+ menuItems = editor._.menuItems = {};
13
+
14
+ for ( var i = 0 ; i < groups.length ; i++ )
15
+ groupsOrder[ groups[ i ] ] = i + 1;
16
+
17
+ /**
18
+ * Registers an item group to the editor context menu in order to make it
19
+ * possible to associate it with menu items later.
20
+ * @name CKEDITOR.editor.prototype.addMenuGroup
21
+ * @param {String} name Specify a group name.
22
+ * @param {Number} [order=100] Define the display sequence of this group
23
+ * inside the menu. A smaller value gets displayed first.
24
+ */
25
+ editor.addMenuGroup = function( name, order )
26
+ {
27
+ groupsOrder[ name ] = order || 100;
28
+ };
29
+
30
+ /**
31
+ * Adds an item from the specified definition to the editor context menu.
32
+ * @name CKEDITOR.editor.prototype.addMenuItem
33
+ * @param {String} name The menu item name.
34
+ * @param {CKEDITOR.menu.definition} definition The menu item definition.
35
+ */
36
+ editor.addMenuItem = function( name, definition )
37
+ {
38
+ if ( groupsOrder[ definition.group ] )
39
+ menuItems[ name ] = new CKEDITOR.menuItem( this, name, definition );
40
+ };
41
+
42
+ /**
43
+ * Adds one or more items from the specified definition array to the editor context menu.
44
+ * @name CKEDITOR.editor.prototype.addMenuItems
45
+ * @param {Array} definitions List of definitions for each menu item as if {@link CKEDITOR.editor.addMenuItem} is called.
46
+ */
47
+ editor.addMenuItems = function( definitions )
48
+ {
49
+ for ( var itemName in definitions )
50
+ {
51
+ this.addMenuItem( itemName, definitions[ itemName ] );
52
+ }
53
+ };
54
+
55
+ /**
56
+ * Retrieves a particular menu item definition from the editor context menu.
57
+ * @name CKEDITOR.editor.prototype.getMenuItem
58
+ * @param {String} name The name of the desired menu item.
59
+ * @return {CKEDITOR.menu.definition}
60
+ */
61
+ editor.getMenuItem = function( name )
62
+ {
63
+ return menuItems[ name ];
64
+ };
65
+
66
+ /**
67
+ * Removes a particular menu item added before from the editor context menu.
68
+ * @name CKEDITOR.editor.prototype.removeMenuItem
69
+ * @param {String} name The name of the desired menu item.
70
+ * @since 3.6.1
71
+ */
72
+ editor.removeMenuItem = function( name )
73
+ {
74
+ delete menuItems[ name ];
75
+ };
76
+ },
77
+
78
+ requires : [ 'floatpanel' ]
79
+ });
80
+
81
+ (function()
82
+ {
83
+ CKEDITOR.menu = CKEDITOR.tools.createClass(
84
+ {
85
+ $ : function( editor, definition )
86
+ {
87
+ definition = this._.definition = definition || {};
88
+ this.id = CKEDITOR.tools.getNextId();
89
+
90
+ this.editor = editor;
91
+ this.items = [];
92
+ this._.listeners = [];
93
+
94
+ this._.level = definition.level || 1;
95
+
96
+ var panelDefinition = CKEDITOR.tools.extend( {}, definition.panel,
97
+ {
98
+ css : editor.skin.editor.css,
99
+ level : this._.level - 1,
100
+ block : {}
101
+ } );
102
+
103
+ var attrs = panelDefinition.block.attributes = ( panelDefinition.attributes || {} );
104
+ // Provide default role of 'menu'.
105
+ !attrs.role && ( attrs.role = 'menu' );
106
+ this._.panelDefinition = panelDefinition;
107
+ },
108
+
109
+ _ :
110
+ {
111
+ onShow : function()
112
+ {
113
+ var selection = this.editor.getSelection();
114
+
115
+ // Selection will be unavailable after menu shows up
116
+ // in IE, lock it now.
117
+ if ( CKEDITOR.env.ie )
118
+ selection && selection.lock();
119
+
120
+ var element = selection && selection.getStartElement(),
121
+ listeners = this._.listeners,
122
+ includedItems = [];
123
+
124
+ this.removeAll();
125
+ // Call all listeners, filling the list of items to be displayed.
126
+ for ( var i = 0 ; i < listeners.length ; i++ )
127
+ {
128
+ var listenerItems = listeners[ i ]( element, selection );
129
+
130
+ if ( listenerItems )
131
+ {
132
+ for ( var itemName in listenerItems )
133
+ {
134
+ var item = this.editor.getMenuItem( itemName );
135
+
136
+ if ( item && ( !item.command || this.editor.getCommand( item.command ).state ) )
137
+ {
138
+ item.state = listenerItems[ itemName ];
139
+ this.add( item );
140
+ }
141
+ }
142
+ }
143
+ }
144
+ },
145
+
146
+ onClick : function( item )
147
+ {
148
+ this.hide( false );
149
+
150
+ if ( item.onClick )
151
+ item.onClick();
152
+ else if ( item.command )
153
+ this.editor.execCommand( item.command );
154
+ },
155
+
156
+ onEscape : function( keystroke )
157
+ {
158
+ var parent = this.parent;
159
+ // 1. If it's sub-menu, restore the last focused item
160
+ // of upper level menu.
161
+ // 2. In case of a top-menu, close it.
162
+ if ( parent )
163
+ {
164
+ parent._.panel.hideChild();
165
+ // Restore parent block item focus.
166
+ var parentBlock = parent._.panel._.panel._.currentBlock,
167
+ parentFocusIndex = parentBlock._.focusIndex;
168
+ parentBlock._.markItem( parentFocusIndex );
169
+ }
170
+ else if ( keystroke == 27 )
171
+ this.hide();
172
+
173
+ return false;
174
+ },
175
+
176
+ onHide : function()
177
+ {
178
+ if ( CKEDITOR.env.ie )
179
+ {
180
+ var selection = this.editor.getSelection();
181
+ selection && selection.unlock();
182
+ }
183
+
184
+ this.onHide && this.onHide();
185
+ },
186
+
187
+ showSubMenu : function( index )
188
+ {
189
+ var menu = this._.subMenu,
190
+ item = this.items[ index ],
191
+ subItemDefs = item.getItems && item.getItems();
192
+
193
+ // If this item has no subitems, we just hide the submenu, if
194
+ // available, and return back.
195
+ if ( !subItemDefs )
196
+ {
197
+ this._.panel.hideChild();
198
+ return;
199
+ }
200
+
201
+ // Record parent menu focused item first (#3389).
202
+ var block = this._.panel.getBlock( this.id );
203
+ block._.focusIndex = index;
204
+
205
+ // Create the submenu, if not available, or clean the existing
206
+ // one.
207
+ if ( menu )
208
+ menu.removeAll();
209
+ else
210
+ {
211
+ menu = this._.subMenu = new CKEDITOR.menu( this.editor,
212
+ CKEDITOR.tools.extend( {}, this._.definition, { level : this._.level + 1 }, true ) );
213
+ menu.parent = this;
214
+ menu._.onClick = CKEDITOR.tools.bind( this._.onClick, this );
215
+ }
216
+
217
+ // Add all submenu items to the menu.
218
+ for ( var subItemName in subItemDefs )
219
+ {
220
+ var subItem = this.editor.getMenuItem( subItemName );
221
+ if ( subItem )
222
+ {
223
+ subItem.state = subItemDefs[ subItemName ];
224
+ menu.add( subItem );
225
+ }
226
+ }
227
+
228
+ // Get the element representing the current item.
229
+ var element = this._.panel.getBlock( this.id ).element.getDocument().getById( this.id + String( index ) );
230
+
231
+ // Show the submenu.
232
+ menu.show( element, 2 );
233
+ }
234
+ },
235
+
236
+ proto :
237
+ {
238
+ add : function( item )
239
+ {
240
+ // Later we may sort the items, but Array#sort is not stable in
241
+ // some browsers, here we're forcing the original sequence with
242
+ // 'order' attribute if it hasn't been assigned. (#3868)
243
+ if ( !item.order )
244
+ item.order = this.items.length;
245
+
246
+ this.items.push( item );
247
+ },
248
+
249
+ removeAll : function()
250
+ {
251
+ this.items = [];
252
+ },
253
+
254
+ show : function( offsetParent, corner, offsetX, offsetY )
255
+ {
256
+ // Not for sub menu.
257
+ if ( !this.parent )
258
+ {
259
+ this._.onShow();
260
+ // Don't menu with zero items.
261
+ if ( ! this.items.length )
262
+ return;
263
+ }
264
+
265
+ corner = corner || ( this.editor.lang.dir == 'rtl' ? 2 : 1 );
266
+
267
+ var items = this.items,
268
+ editor = this.editor,
269
+ panel = this._.panel,
270
+ element = this._.element;
271
+
272
+ // Create the floating panel for this menu.
273
+ if ( !panel )
274
+ {
275
+ panel = this._.panel = new CKEDITOR.ui.floatPanel( this.editor,
276
+ CKEDITOR.document.getBody(),
277
+ this._.panelDefinition,
278
+ this._.level );
279
+
280
+ panel.onEscape = CKEDITOR.tools.bind( function( keystroke )
281
+ {
282
+ if ( this._.onEscape( keystroke ) === false )
283
+ return false;
284
+ },
285
+ this );
286
+
287
+ panel.onHide = CKEDITOR.tools.bind( function()
288
+ {
289
+ this._.onHide && this._.onHide();
290
+ },
291
+ this );
292
+
293
+ // Create an autosize block inside the panel.
294
+ var block = panel.addBlock( this.id, this._.panelDefinition.block );
295
+ block.autoSize = true;
296
+
297
+ var keys = block.keys;
298
+ keys[ 40 ] = 'next'; // ARROW-DOWN
299
+ keys[ 9 ] = 'next'; // TAB
300
+ keys[ 38 ] = 'prev'; // ARROW-UP
301
+ keys[ CKEDITOR.SHIFT + 9 ] = 'prev'; // SHIFT + TAB
302
+ keys[ ( editor.lang.dir == 'rtl' ? 37 : 39 ) ]= CKEDITOR.env.ie ? 'mouseup' : 'click'; // ARROW-RIGHT/ARROW-LEFT(rtl)
303
+ keys[ 32 ] = CKEDITOR.env.ie ? 'mouseup' : 'click'; // SPACE
304
+ CKEDITOR.env.ie && ( keys[ 13 ] = 'mouseup' ); // Manage ENTER, since onclick is blocked in IE (#8041).
305
+
306
+ element = this._.element = block.element;
307
+ element.addClass( editor.skinClass );
308
+
309
+ var elementDoc = element.getDocument();
310
+ elementDoc.getBody().setStyle( 'overflow', 'hidden' );
311
+ elementDoc.getElementsByTag( 'html' ).getItem( 0 ).setStyle( 'overflow', 'hidden' );
312
+
313
+ this._.itemOverFn = CKEDITOR.tools.addFunction( function( index )
314
+ {
315
+ clearTimeout( this._.showSubTimeout );
316
+ this._.showSubTimeout = CKEDITOR.tools.setTimeout( this._.showSubMenu, editor.config.menu_subMenuDelay || 400, this, [ index ] );
317
+ },
318
+ this );
319
+
320
+ this._.itemOutFn = CKEDITOR.tools.addFunction( function( index )
321
+ {
322
+ clearTimeout( this._.showSubTimeout );
323
+ },
324
+ this );
325
+
326
+ this._.itemClickFn = CKEDITOR.tools.addFunction( function( index )
327
+ {
328
+ var item = this.items[ index ];
329
+
330
+ if ( item.state == CKEDITOR.TRISTATE_DISABLED )
331
+ {
332
+ this.hide();
333
+ return;
334
+ }
335
+
336
+ if ( item.getItems )
337
+ this._.showSubMenu( index );
338
+ else
339
+ this._.onClick( item );
340
+ },
341
+ this );
342
+ }
343
+
344
+ // Put the items in the right order.
345
+ sortItems( items );
346
+
347
+ var chromeRoot = editor.container.getChild( 1 ),
348
+ mixedContentClass = chromeRoot.hasClass( 'cke_mixed_dir_content' ) ? ' cke_mixed_dir_content' : '';
349
+
350
+ // Build the HTML that composes the menu and its items.
351
+ var output = [ '<div class="cke_menu' + mixedContentClass + '" role="presentation">' ];
352
+
353
+ var length = items.length,
354
+ lastGroup = length && items[ 0 ].group;
355
+
356
+ for ( var i = 0 ; i < length ; i++ )
357
+ {
358
+ var item = items[ i ];
359
+ if ( lastGroup != item.group )
360
+ {
361
+ output.push( '<div class="cke_menuseparator" role="separator"></div>' );
362
+ lastGroup = item.group;
363
+ }
364
+
365
+ item.render( this, i, output );
366
+ }
367
+
368
+ output.push( '</div>' );
369
+
370
+ // Inject the HTML inside the panel.
371
+ element.setHtml( output.join( '' ) );
372
+
373
+ CKEDITOR.ui.fire( 'ready', this );
374
+
375
+ // Show the panel.
376
+ if ( this.parent )
377
+ this.parent._.panel.showAsChild( panel, this.id, offsetParent, corner, offsetX, offsetY );
378
+ else
379
+ panel.showBlock( this.id, offsetParent, corner, offsetX, offsetY );
380
+
381
+ editor.fire( 'menuShow', [ panel ] );
382
+ },
383
+
384
+ addListener : function( listenerFn )
385
+ {
386
+ this._.listeners.push( listenerFn );
387
+ },
388
+
389
+ hide : function( returnFocus )
390
+ {
391
+ this._.onHide && this._.onHide();
392
+ this._.panel && this._.panel.hide( returnFocus );
393
+ }
394
+ }
395
+ });
396
+
397
+ function sortItems( items )
398
+ {
399
+ items.sort( function( itemA, itemB )
400
+ {
401
+ if ( itemA.group < itemB.group )
402
+ return -1;
403
+ else if ( itemA.group > itemB.group )
404
+ return 1;
405
+
406
+ return itemA.order < itemB.order ? -1 :
407
+ itemA.order > itemB.order ? 1 :
408
+ 0;
409
+ });
410
+ }
411
+ CKEDITOR.menuItem = CKEDITOR.tools.createClass(
412
+ {
413
+ $ : function( editor, name, definition )
414
+ {
415
+ CKEDITOR.tools.extend( this, definition,
416
+ // Defaults
417
+ {
418
+ order : 0,
419
+ className : 'cke_button_' + name
420
+ });
421
+
422
+ // Transform the group name into its order number.
423
+ this.group = editor._.menuGroups[ this.group ];
424
+
425
+ this.editor = editor;
426
+ this.name = name;
427
+ },
428
+
429
+ proto :
430
+ {
431
+ render : function( menu, index, output )
432
+ {
433
+ var id = menu.id + String( index ),
434
+ state = ( typeof this.state == 'undefined' ) ? CKEDITOR.TRISTATE_OFF : this.state;
435
+
436
+ var classes = ' cke_' + (
437
+ state == CKEDITOR.TRISTATE_ON ? 'on' :
438
+ state == CKEDITOR.TRISTATE_DISABLED ? 'disabled' :
439
+ 'off' );
440
+
441
+ var htmlLabel = this.label;
442
+
443
+ if ( this.className )
444
+ classes += ' ' + this.className;
445
+
446
+ var hasSubMenu = this.getItems;
447
+
448
+ output.push(
449
+ '<span class="cke_menuitem' + ( this.icon && this.icon.indexOf( '.png' ) == -1 ? ' cke_noalphafix' : '' ) + '">' +
450
+ '<a id="', id, '"' +
451
+ ' class="', classes, '" href="javascript:void(\'', ( this.label || '' ).replace( "'", '' ), '\')"' +
452
+ ' title="', this.label, '"' +
453
+ ' tabindex="-1"' +
454
+ '_cke_focus=1' +
455
+ ' hidefocus="true"' +
456
+ ' role="menuitem"' +
457
+ ( hasSubMenu ? 'aria-haspopup="true"' : '' ) +
458
+ ( state == CKEDITOR.TRISTATE_DISABLED ? 'aria-disabled="true"' : '' ) +
459
+ ( state == CKEDITOR.TRISTATE_ON ? 'aria-pressed="true"' : '' ) );
460
+
461
+ // Some browsers don't cancel key events in the keydown but in the
462
+ // keypress.
463
+ // TODO: Check if really needed for Gecko+Mac.
464
+ if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) )
465
+ {
466
+ output.push(
467
+ ' onkeypress="return false;"' );
468
+ }
469
+
470
+ // With Firefox, we need to force the button to redraw, otherwise it
471
+ // will remain in the focus state.
472
+ if ( CKEDITOR.env.gecko )
473
+ {
474
+ output.push(
475
+ ' onblur="this.style.cssText = this.style.cssText;"' );
476
+ }
477
+
478
+ var offset = ( this.iconOffset || 0 ) * -16;
479
+ output.push(
480
+ // ' onkeydown="return CKEDITOR.ui.button._.keydown(', index, ', event);"' +
481
+ ' onmouseover="CKEDITOR.tools.callFunction(', menu._.itemOverFn, ',', index, ');"' +
482
+ ' onmouseout="CKEDITOR.tools.callFunction(', menu._.itemOutFn, ',', index, ');" ' +
483
+ ( CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : 'onclick' ) + // #188
484
+ '="CKEDITOR.tools.callFunction(', menu._.itemClickFn, ',', index, '); return false;"' +
485
+ '>' +
486
+ '<span class="cke_icon_wrapper"><span class="cke_icon"' +
487
+ ( this.icon ? ' style="background-image:url(' + CKEDITOR.getUrl( this.icon ) + ');background-position:0 ' + offset + 'px;"'
488
+ : '' ) +
489
+ '></span></span>' +
490
+ '<span class="cke_label">' );
491
+
492
+ if ( hasSubMenu )
493
+ {
494
+ output.push(
495
+ '<span class="cke_menuarrow">',
496
+ '<span>&#',
497
+ ( this.editor.lang.dir == 'rtl' ?
498
+ '9668' : // BLACK LEFT-POINTING POINTER
499
+ '9658' ), // BLACK RIGHT-POINTING POINTER
500
+ ';</span>',
501
+ '</span>' );
502
+ }
503
+
504
+ output.push(
505
+ htmlLabel,
506
+ '</span>' +
507
+ '</a>' +
508
+ '</span>' );
509
+ }
510
+ }
511
+ });
512
+
513
+ })();
514
+
515
+
516
+ /**
517
+ * The amount of time, in milliseconds, the editor waits before displaying submenu
518
+ * options when moving the mouse over options that contain submenus, like the
519
+ * "Cell Properties" entry for tables.
520
+ * @type Number
521
+ * @default 400
522
+ * @example
523
+ * // Remove the submenu delay.
524
+ * config.menu_subMenuDelay = 0;
525
+ */
526
+
527
+ /**
528
+ * A comma separated list of items group names to be displayed in the context
529
+ * menu. The order of items will reflect the order specified in this list if
530
+ * no priority was defined in the groups.
531
+ * @type String
532
+ * @default 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
533
+ * @example
534
+ * config.menu_groups = 'clipboard,table,anchor,link,image';
535
+ */
536
+ CKEDITOR.config.menu_groups =
537
+ 'clipboard,' +
538
+ 'form,' +
539
+ 'tablecell,tablecellproperties,tablerow,tablecolumn,table,'+
540
+ 'anchor,link,image,flash,' +
541
+ 'checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';