radiant-ck_editor_filter-extension 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (577) hide show
  1. data/lib/radiant-ck_editor_filter-extension.rb +1 -1
  2. data/public/javascripts/extensions/ck_editor_filter/ckeditor/CHANGES.md +354 -12
  3. data/public/javascripts/extensions/ck_editor_filter/ckeditor/INSTALL.html +92 -0
  4. data/public/javascripts/extensions/ck_editor_filter/ckeditor/LICENSE.md +1 -1
  5. data/public/javascripts/extensions/ck_editor_filter/ckeditor/README.md +1 -1
  6. data/public/javascripts/extensions/ck_editor_filter/ckeditor/adapters/jquery.js +1 -1
  7. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.js +857 -904
  8. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic.js +8 -0
  9. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic_source.js +20 -0
  10. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_source.js +25 -0
  11. data/public/javascripts/extensions/ck_editor_filter/ckeditor/config.js +1 -1
  12. data/public/javascripts/extensions/ck_editor_filter/ckeditor/contents.css +17 -6
  13. data/public/javascripts/extensions/ck_editor_filter/ckeditor/images/spacer.gif +0 -0
  14. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_languages.js +6 -0
  15. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_translationstatus.txt +61 -0
  16. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/af.js +5 -0
  17. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ar.js +5 -0
  18. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bg.js +5 -0
  19. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bn.js +5 -0
  20. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bs.js +5 -0
  21. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ca.js +5 -0
  22. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cs.js +5 -0
  23. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cy.js +5 -0
  24. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/da.js +5 -0
  25. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/de.js +5 -0
  26. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/el.js +5 -0
  27. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-au.js +5 -0
  28. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-ca.js +5 -0
  29. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-gb.js +5 -0
  30. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en.js +2 -2
  31. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eo.js +5 -0
  32. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/es.js +5 -0
  33. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/et.js +5 -0
  34. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eu.js +5 -0
  35. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fa.js +5 -0
  36. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fi.js +5 -0
  37. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fo.js +5 -0
  38. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr-ca.js +5 -0
  39. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr.js +5 -0
  40. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gl.js +5 -0
  41. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gu.js +5 -0
  42. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/he.js +5 -0
  43. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hi.js +5 -0
  44. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hr.js +5 -0
  45. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hu.js +5 -0
  46. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/id.js +5 -0
  47. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/is.js +5 -0
  48. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/it.js +5 -0
  49. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ja.js +5 -0
  50. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ka.js +5 -0
  51. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/km.js +5 -0
  52. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ko.js +5 -0
  53. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ku.js +5 -0
  54. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lt.js +5 -0
  55. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lv.js +5 -0
  56. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/mk.js +5 -0
  57. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/mn.js +5 -0
  58. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ms.js +5 -0
  59. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nb.js +5 -0
  60. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nl.js +5 -0
  61. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/no.js +5 -0
  62. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pl.js +5 -0
  63. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt-br.js +5 -0
  64. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt.js +5 -0
  65. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ro.js +5 -0
  66. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ru.js +5 -0
  67. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/si.js +5 -0
  68. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sk.js +5 -0
  69. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sl.js +5 -0
  70. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sq.js +5 -0
  71. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr-latn.js +5 -0
  72. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr.js +5 -0
  73. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sv.js +5 -0
  74. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/th.js +5 -0
  75. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/tr.js +5 -0
  76. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/tt.js +5 -0
  77. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ug.js +5 -0
  78. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/uk.js +5 -0
  79. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/vi.js +5 -0
  80. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh-cn.js +5 -0
  81. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh.js +5 -0
  82. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/dialogs/mediaembed.html +14 -0
  83. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/images/icon.gif +0 -0
  84. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/plugin.js +61 -0
  85. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/plugin.js~ +57 -0
  86. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +6 -6
  87. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +1 -1
  88. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
  89. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +4 -2
  90. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +4 -2
  91. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +5 -2
  92. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +5 -2
  93. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +4 -2
  94. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +6 -4
  95. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +5 -2
  96. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +5 -2
  97. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
  98. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +4 -2
  99. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +6 -3
  100. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +4 -2
  101. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +4 -2
  102. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +4 -2
  103. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +4 -2
  104. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +4 -2
  105. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +4 -2
  106. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +4 -2
  107. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +4 -2
  108. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +4 -2
  109. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +4 -2
  110. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +4 -2
  111. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +5 -2
  112. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +4 -2
  113. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +5 -2
  114. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +3 -2
  115. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +8 -6
  116. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +5 -3
  117. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +4 -2
  118. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +4 -2
  119. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +4 -2
  120. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +4 -2
  121. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +4 -2
  122. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +5 -2
  123. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +5 -3
  124. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +4 -2
  125. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +5 -2
  126. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +5 -2
  127. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +7 -5
  128. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +9 -6
  129. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +4 -2
  130. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +4 -2
  131. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +4 -2
  132. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +4 -2
  133. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +4 -2
  134. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +4 -2
  135. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +4 -2
  136. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +5 -3
  137. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +4 -2
  138. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +4 -2
  139. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
  140. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +4 -2
  141. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +4 -2
  142. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +4 -2
  143. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +4 -2
  144. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +4 -2
  145. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/lang/en.js +6 -0
  146. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/lang/he.js +6 -0
  147. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/about/dialogs/about.js +4 -4
  148. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  149. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/adobeair/plugin.js +6 -0
  150. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/ajax/plugin.js +6 -0
  151. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/autogrow/plugin.js +6 -0
  152. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/bbcode/plugin.js +9 -0
  153. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/clipboard/dialogs/paste.js +1 -1
  154. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/colordialog/dialogs/colordialog.js +13 -0
  155. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/devtools/lang/en.js +6 -0
  156. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/devtools/plugin.js +6 -0
  157. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
  158. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/div/dialogs/div.js +8 -8
  159. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/docprops/dialogs/docprops.js +10 -0
  160. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/docprops/plugin.js +6 -0
  161. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/find/dialogs/find.js +21 -21
  162. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/flash/dialogs/flash.js +8 -8
  163. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/flash/images/placeholder.png +0 -0
  164. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/button.js +1 -1
  165. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
  166. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/form.js +1 -1
  167. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/hiddenfield.js +4 -5
  168. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/radio.js +3 -3
  169. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/select.js +3 -3
  170. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
  171. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
  172. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  173. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/icons.png +0 -0
  174. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/icons_hidpi.png +0 -0
  175. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
  176. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  177. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframedialog/plugin.js +6 -0
  178. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image/dialogs/image.js +25 -25
  179. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
  180. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
  181. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/dev/contents.css +35 -0
  182. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/dev/image2.html +339 -0
  183. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/dialogs/image2.js +550 -0
  184. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
  185. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/icons/image.png +0 -0
  186. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/af.js +20 -0
  187. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/ar.js +20 -0
  188. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/bg.js +20 -0
  189. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/bn.js +20 -0
  190. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/bs.js +20 -0
  191. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/ca.js +20 -0
  192. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/cs.js +20 -0
  193. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/cy.js +20 -0
  194. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/da.js +20 -0
  195. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/de.js +20 -0
  196. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/el.js +20 -0
  197. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/en-au.js +20 -0
  198. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/en-ca.js +20 -0
  199. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/en-gb.js +20 -0
  200. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/en.js +20 -0
  201. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/eo.js +20 -0
  202. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/es.js +20 -0
  203. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/et.js +20 -0
  204. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/eu.js +20 -0
  205. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/fa.js +20 -0
  206. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/fi.js +20 -0
  207. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/fo.js +20 -0
  208. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/fr-ca.js +20 -0
  209. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/fr.js +20 -0
  210. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/gl.js +20 -0
  211. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/gu.js +20 -0
  212. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/he.js +20 -0
  213. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/hi.js +20 -0
  214. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/hr.js +20 -0
  215. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/hu.js +20 -0
  216. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/id.js +20 -0
  217. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/is.js +20 -0
  218. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/it.js +20 -0
  219. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/ja.js +20 -0
  220. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/ka.js +20 -0
  221. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/km.js +20 -0
  222. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/ko.js +20 -0
  223. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/ku.js +20 -0
  224. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/lt.js +20 -0
  225. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/lv.js +20 -0
  226. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/mk.js +20 -0
  227. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/mn.js +20 -0
  228. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/ms.js +20 -0
  229. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/nb.js +20 -0
  230. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/nl.js +20 -0
  231. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/no.js +20 -0
  232. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/pl.js +20 -0
  233. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/pt-br.js +20 -0
  234. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/pt.js +20 -0
  235. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/ro.js +20 -0
  236. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/ru.js +20 -0
  237. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/si.js +20 -0
  238. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/sk.js +20 -0
  239. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/sl.js +20 -0
  240. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/sq.js +20 -0
  241. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/sr-latn.js +20 -0
  242. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/sr.js +20 -0
  243. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/sv.js +20 -0
  244. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/th.js +20 -0
  245. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/tr.js +20 -0
  246. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/tt.js +20 -0
  247. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/ug.js +20 -0
  248. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/uk.js +20 -0
  249. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/vi.js +20 -0
  250. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/zh-cn.js +20 -0
  251. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/lang/zh.js +20 -0
  252. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/plugin.js +1592 -0
  253. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
  254. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
  255. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image2/samples/image2.html +65 -0
  256. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/lineutils/dev/dnd.html +172 -0
  257. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/lineutils/dev/magicfinger.html +285 -0
  258. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/lineutils/plugin.js +935 -0
  259. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/anchor.js +4 -5
  260. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/link.js +23 -34
  261. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/images/anchor.gif +0 -0
  262. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/images/anchor.png +0 -0
  263. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  264. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
  265. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  266. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  267. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
  268. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/magicline/images/icon.png +0 -0
  269. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  270. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/paperclipped/images/icon.png +0 -0
  271. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/paperclipped/plugin.js +15 -0
  272. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastefromword/filter/default.js +8 -8
  273. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastetext/dialogs/pastetext.js +6 -0
  274. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/dialogs/placeholder.js +6 -0
  275. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/lang/en.js +6 -0
  276. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/lang/he.js +6 -0
  277. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/placeholder.gif +0 -0
  278. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/plugin.js +6 -0
  279. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/preview/preview.html +8 -5
  280. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/radiantpreview/images/icon.png +0 -0
  281. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/radiantpreview/images/radiant-preview.png +0 -0
  282. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/README.md +1 -1
  283. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/options.js +17 -20
  284. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
  285. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  286. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  287. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  288. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  289. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  290. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  291. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  292. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  293. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  294. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  295. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  296. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/dialogs/smiley.js +10 -0
  297. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  298. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
  299. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  300. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
  301. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  302. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
  303. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  304. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
  305. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  306. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
  307. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  308. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
  309. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  310. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
  311. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
  312. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  313. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/envelope.png +0 -0
  314. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/heart.gif +0 -0
  315. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/heart.png +0 -0
  316. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  317. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/kiss.png +0 -0
  318. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  319. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
  320. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  321. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
  322. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  323. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
  324. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  325. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
  326. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  327. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
  328. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  329. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
  330. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  331. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
  332. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  333. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
  334. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
  335. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
  336. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  337. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  338. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
  339. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  340. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
  341. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +1 -1
  342. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
  343. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/ar.js +2 -2
  344. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/bg.js +1 -1
  345. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/ca.js +1 -1
  346. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/cs.js +1 -1
  347. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/cy.js +1 -1
  348. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/da.js +13 -0
  349. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/de.js +1 -1
  350. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/el.js +9 -9
  351. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
  352. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/en.js +1 -1
  353. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/eo.js +1 -1
  354. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/es.js +1 -1
  355. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/et.js +1 -1
  356. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/fa.js +1 -1
  357. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/fi.js +1 -1
  358. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +1 -1
  359. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/fr.js +1 -1
  360. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/gl.js +1 -1
  361. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/he.js +1 -1
  362. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/hr.js +2 -2
  363. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/hu.js +1 -1
  364. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/id.js +1 -1
  365. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/it.js +1 -1
  366. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/ja.js +1 -1
  367. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/km.js +1 -1
  368. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/ku.js +1 -1
  369. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
  370. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/lv.js +1 -1
  371. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/nb.js +1 -1
  372. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/nl.js +1 -1
  373. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/no.js +1 -1
  374. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/pl.js +1 -1
  375. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +1 -1
  376. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/pt.js +6 -6
  377. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
  378. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/si.js +1 -1
  379. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/sk.js +1 -1
  380. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/sl.js +1 -1
  381. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/sq.js +1 -1
  382. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/sv.js +1 -1
  383. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/th.js +1 -1
  384. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/tr.js +1 -1
  385. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
  386. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/ug.js +1 -1
  387. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/uk.js +1 -1
  388. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/vi.js +1 -1
  389. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +1 -1
  390. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/lang/zh.js +1 -1
  391. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
  392. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/lang/en.js +6 -0
  393. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/styles/styles/default.js +6 -0
  394. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/stylesheetparser/plugin.js +6 -0
  395. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/table/dialogs/table.js +1 -1
  396. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/tableresize/plugin.js +7 -0
  397. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/tabletools/dialogs/tableCell.js +14 -13
  398. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/dialogs/templates.css +6 -6
  399. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/dialogs/templates.js +1 -1
  400. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/default.js +1 -1
  401. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  402. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  403. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  404. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/dialogs/uicolor.js +7 -0
  405. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/lang/en.js +6 -0
  406. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/lang/he.js +6 -0
  407. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/plugin.js +6 -0
  408. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/uicolor.gif +0 -0
  409. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  410. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  411. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  412. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  413. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/yui.css +6 -0
  414. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/yui.js +76 -0
  415. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/dev/assets/contents.css +23 -0
  416. data/public/javascripts/extensions/ck_editor_filter/ckeditor/{samples → plugins/widget/dev}/assets/sample.jpg +0 -0
  417. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/dev/assets/simplebox/contents.css +36 -0
  418. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/dev/assets/simplebox/dialogs/simplebox.js +51 -0
  419. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/dev/assets/simplebox/icons/simplebox.png +0 -0
  420. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/dev/assets/simplebox/plugin.js +114 -0
  421. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/dev/console.js +131 -0
  422. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/dev/nestedwidgets.html +135 -0
  423. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/dev/widgetstyles.html +145 -0
  424. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/images/handle.png +0 -0
  425. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/af.js +7 -0
  426. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/ar.js +7 -0
  427. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/ca.js +7 -0
  428. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/cs.js +7 -0
  429. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/cy.js +7 -0
  430. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/da.js +7 -0
  431. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/de.js +7 -0
  432. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/el.js +7 -0
  433. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/en-gb.js +7 -0
  434. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/en.js +7 -0
  435. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/eo.js +7 -0
  436. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/es.js +7 -0
  437. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/fa.js +7 -0
  438. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/fi.js +7 -0
  439. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/fr.js +7 -0
  440. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/gl.js +7 -0
  441. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/he.js +7 -0
  442. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/hr.js +7 -0
  443. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/hu.js +7 -0
  444. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/it.js +7 -0
  445. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/ja.js +7 -0
  446. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/km.js +7 -0
  447. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/ko.js +7 -0
  448. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/ku.js +7 -0
  449. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/nb.js +7 -0
  450. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/nl.js +7 -0
  451. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/no.js +7 -0
  452. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/pl.js +7 -0
  453. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/pt-br.js +7 -0
  454. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/pt.js +7 -0
  455. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/ru.js +7 -0
  456. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/sk.js +7 -0
  457. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/sl.js +7 -0
  458. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/sq.js +7 -0
  459. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/sv.js +7 -0
  460. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/tr.js +7 -0
  461. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/tt.js +7 -0
  462. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/uk.js +7 -0
  463. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/vi.js +7 -0
  464. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/zh-cn.js +7 -0
  465. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/lang/zh.js +7 -0
  466. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/widget/plugin.js +3744 -0
  467. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/ciframe.html +1 -1
  468. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
  469. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.css +1 -1
  470. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.js +69 -62
  471. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc_ie.js +1 -1
  472. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/xml/plugin.js +6 -0
  473. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/dialog.css +9 -0
  474. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/editor.css +13 -0
  475. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/icons.png +0 -0
  476. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/icons_rtl.png +0 -0
  477. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
  478. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/dialog_sides.png +0 -0
  479. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
  480. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/mini.gif +0 -0
  481. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/noimage.png +0 -0
  482. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/sprites.png +0 -0
  483. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
  484. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
  485. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/skin.js +7 -0
  486. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/templates.css +6 -0
  487. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/dialog.css +2 -2
  488. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/dialog_ie.css +2 -2
  489. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/dialog_ie7.css +2 -2
  490. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/dialog_ie8.css +2 -2
  491. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/dialog_iequirks.css +2 -2
  492. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/editor.css +2 -2
  493. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/editor_gecko.css +2 -2
  494. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/editor_ie.css +2 -2
  495. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/editor_ie7.css +2 -2
  496. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/editor_ie8.css +2 -2
  497. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/editor_iequirks.css +2 -2
  498. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/icons.png +0 -0
  499. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/icons_hidpi.png +0 -0
  500. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/images/arrow.png +0 -0
  501. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/images/close.png +0 -0
  502. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  503. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  504. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  505. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  506. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/images/lock-open.png +0 -0
  507. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/images/lock.png +0 -0
  508. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/images/refresh.png +0 -0
  509. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/moono/readme.md +1 -1
  510. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/dialog.css +9 -0
  511. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/editor.css +14 -0
  512. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/icons.png +0 -0
  513. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/icons_rtl.png +0 -0
  514. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
  515. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
  516. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
  517. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/mini.gif +0 -0
  518. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/noimage.png +0 -0
  519. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/sprites.png +0 -0
  520. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
  521. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/skin.js +6 -0
  522. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/templates.css +6 -0
  523. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/dialog.css +9 -0
  524. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/editor.css +13 -0
  525. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/icons.png +0 -0
  526. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/icons_rtl.png +0 -0
  527. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
  528. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/dialog_sides.png +0 -0
  529. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
  530. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/mini.gif +0 -0
  531. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/noimage.png +0 -0
  532. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/sprites.png +0 -0
  533. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
  534. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
  535. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/skin.js +6 -0
  536. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/templates.css +6 -0
  537. data/public/javascripts/extensions/ck_editor_filter/ckeditor/styles.js +2 -2
  538. data/public/javascripts/extensions/ck_editor_filter/ckeditor/themes/default/theme.js +8 -0
  539. data/public/javascripts/extensions/ck_editor_filter/radiant.ckeditor.js +1 -1
  540. metadata +345 -40
  541. data/public/javascripts/extensions/ck_editor_filter/ckeditor/build-config.js +0 -96
  542. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/ajax.html +0 -82
  543. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/api.html +0 -207
  544. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/appendto.html +0 -57
  545. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/assets/inlineall/logo.png +0 -0
  546. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/assets/outputxhtml/outputxhtml.css +0 -204
  547. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/assets/posteddata.php +0 -59
  548. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/assets/sample.css +0 -3
  549. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/assets/uilanguages/languages.js +0 -7
  550. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/datafiltering.html +0 -401
  551. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/divreplace.html +0 -141
  552. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/index.html +0 -128
  553. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/inlineall.html +0 -311
  554. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/inlinebycode.html +0 -121
  555. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/inlinetextarea.html +0 -110
  556. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/jquery.html +0 -97
  557. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/plugins/dialog/assets/my_dialog.js +0 -48
  558. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/plugins/dialog/dialog.html +0 -187
  559. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/plugins/enterkey/enterkey.html +0 -103
  560. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
  561. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
  562. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +0 -18
  563. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/plugins/htmlwriter/outputforflash.html +0 -280
  564. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/plugins/htmlwriter/outputhtml.html +0 -221
  565. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/plugins/magicline/magicline.html +0 -206
  566. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/plugins/toolbar/toolbar.html +0 -232
  567. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/plugins/wysiwygarea/fullpage.html +0 -77
  568. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/readonly.html +0 -73
  569. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/replacebyclass.html +0 -57
  570. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/replacebycode.html +0 -56
  571. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/sample.css +0 -356
  572. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/sample.js +0 -50
  573. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/sample_posteddata.php +0 -16
  574. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/tabindex.html +0 -75
  575. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/uicolor.html +0 -69
  576. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/uilanguages.html +0 -119
  577. data/public/javascripts/extensions/ck_editor_filter/ckeditor/samples/xhtmlstyle.html +0 -231
@@ -0,0 +1,20 @@
1
+ /*
2
+ Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'image2', 'vi', {
6
+ alt: 'Chú thích ảnh',
7
+ btnUpload: 'Tải lên máy chủ',
8
+ captioned: 'Ảnh có chú thích',
9
+ captionPlaceholder: 'Nhãn',
10
+ infoTab: 'Thông tin của ảnh',
11
+ lockRatio: 'Giữ nguyên tỷ lệ',
12
+ menu: 'Thuộc tính của ảnh',
13
+ pathName: 'ảnh',
14
+ pathNameCaption: 'chú thích',
15
+ resetSize: 'Kích thước gốc',
16
+ resizer: 'Kéo rê để thay đổi kích cỡ',
17
+ title: 'Thuộc tính của ảnh',
18
+ uploadTab: 'Tải lên',
19
+ urlMissing: 'Thiếu đường dẫn hình ảnh'
20
+ } );
@@ -0,0 +1,20 @@
1
+ /*
2
+ Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'image2', 'zh-cn', {
6
+ alt: '替换文本',
7
+ btnUpload: '上传到服务器',
8
+ captioned: '带标题图像',
9
+ captionPlaceholder: '标题',
10
+ infoTab: '图像信息',
11
+ lockRatio: '锁定比例',
12
+ menu: '图像属性',
13
+ pathName: '图像',
14
+ pathNameCaption: '标题',
15
+ resetSize: '原始尺寸',
16
+ resizer: '点击并拖拽以改变尺寸',
17
+ title: '图像属性',
18
+ uploadTab: '上传',
19
+ urlMissing: '缺少图像源文件地址'
20
+ } );
@@ -0,0 +1,20 @@
1
+ /*
2
+ Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'image2', 'zh', {
6
+ alt: '替代文字',
7
+ btnUpload: '傳送至伺服器',
8
+ captioned: '已加標題之圖片',
9
+ captionPlaceholder: 'Caption', // MISSING
10
+ infoTab: '影像資訊',
11
+ lockRatio: '固定比例',
12
+ menu: '影像屬性',
13
+ pathName: '圖片',
14
+ pathNameCaption: '標題',
15
+ resetSize: '重設大小',
16
+ resizer: '拖曳以改變大小',
17
+ title: '影像屬性',
18
+ uploadTab: '上傳',
19
+ urlMissing: '遺失圖片來源之 URL '
20
+ } );
@@ -0,0 +1,1592 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
3
+ * For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ ( function() {
9
+
10
+ var template = '<img alt="" src="" />',
11
+ templateBlock = new CKEDITOR.template(
12
+ '<figure class="{captionedClass}">' +
13
+ template +
14
+ '<figcaption>{captionPlaceholder}</figcaption>' +
15
+ '</figure>' ),
16
+ alignmentsObj = { left: 0, center: 1, right: 2 },
17
+ regexPercent = /^\s*(\d+\%)\s*$/i;
18
+
19
+ CKEDITOR.plugins.add( 'image2', {
20
+ // jscs:disable maximumLineLength
21
+ lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
22
+ // jscs:enable maximumLineLength
23
+ requires: 'widget,dialog',
24
+ icons: 'image',
25
+ hidpi: true,
26
+
27
+ onLoad: function() {
28
+ CKEDITOR.addCss(
29
+ '.cke_image_nocaption{' +
30
+ // This is to remove unwanted space so resize
31
+ // wrapper is displayed property.
32
+ 'line-height:0' +
33
+ '}' +
34
+ '.cke_editable.cke_image_sw, .cke_editable.cke_image_sw *{cursor:sw-resize !important}' +
35
+ '.cke_editable.cke_image_se, .cke_editable.cke_image_se *{cursor:se-resize !important}' +
36
+ '.cke_image_resizer{' +
37
+ 'display:none;' +
38
+ 'position:absolute;' +
39
+ 'width:10px;' +
40
+ 'height:10px;' +
41
+ 'bottom:-5px;' +
42
+ 'right:-5px;' +
43
+ 'background:#000;' +
44
+ 'outline:1px solid #fff;' +
45
+ // Prevent drag handler from being misplaced (#11207).
46
+ 'line-height:0;' +
47
+ 'cursor:se-resize;' +
48
+ '}' +
49
+ '.cke_image_resizer_wrapper{' +
50
+ 'position:relative;' +
51
+ 'display:inline-block;' +
52
+ 'line-height:0;' +
53
+ '}' +
54
+ // Bottom-left corner style of the resizer.
55
+ '.cke_image_resizer.cke_image_resizer_left{' +
56
+ 'right:auto;' +
57
+ 'left:-5px;' +
58
+ 'cursor:sw-resize;' +
59
+ '}' +
60
+ '.cke_widget_wrapper:hover .cke_image_resizer,' +
61
+ '.cke_image_resizer.cke_image_resizing{' +
62
+ 'display:block' +
63
+ '}' +
64
+ // Expand widget wrapper when linked inline image.
65
+ '.cke_widget_wrapper>a{' +
66
+ 'display:inline-block' +
67
+ '}' );
68
+ },
69
+
70
+ init: function( editor ) {
71
+ // Adapts configuration from original image plugin. Should be removed
72
+ // when we'll rename image2 to image.
73
+ var config = editor.config,
74
+ lang = editor.lang.image2,
75
+ image = widgetDef( editor );
76
+
77
+ // Since filebrowser plugin discovers config properties by dialog (plugin?)
78
+ // names (sic!), this hack will be necessary as long as Image2 is not named
79
+ // Image. And since Image2 will never be Image, for sure some filebrowser logic
80
+ // got to be refined.
81
+ config.filebrowserImage2BrowseUrl = config.filebrowserImageBrowseUrl;
82
+ config.filebrowserImage2UploadUrl = config.filebrowserImageUploadUrl;
83
+
84
+ // Add custom elementspath names to widget definition.
85
+ image.pathName = lang.pathName;
86
+ image.editables.caption.pathName = lang.pathNameCaption;
87
+
88
+ // Register the widget.
89
+ editor.widgets.add( 'image', image );
90
+
91
+ // Add toolbar button for this plugin.
92
+ editor.ui.addButton && editor.ui.addButton( 'Image', {
93
+ label: editor.lang.common.image,
94
+ command: 'image',
95
+ toolbar: 'insert,10'
96
+ } );
97
+
98
+ // Register context menu option for editing widget.
99
+ if ( editor.contextMenu ) {
100
+ editor.addMenuGroup( 'image', 10 );
101
+
102
+ editor.addMenuItem( 'image', {
103
+ label: lang.menu,
104
+ command: 'image',
105
+ group: 'image'
106
+ } );
107
+ }
108
+
109
+ CKEDITOR.dialog.add( 'image2', this.path + 'dialogs/image2.js' );
110
+ },
111
+
112
+ afterInit: function( editor ) {
113
+ // Integrate with align commands (justify plugin).
114
+ var align = { left: 1, right: 1, center: 1, block: 1 },
115
+ integrate = alignCommandIntegrator( editor );
116
+
117
+ for ( var value in align )
118
+ integrate( value );
119
+
120
+ // Integrate with link commands (link plugin).
121
+ linkCommandIntegrator( editor );
122
+ }
123
+ } );
124
+
125
+ // Wiget states (forms) depending on alignment and configuration.
126
+ //
127
+ // Non-captioned widget (inline styles)
128
+ // ┌──────┬───────────────────────────────┬─────────────────────────────┐
129
+ // │Align │Internal form │Data │
130
+ // ├──────┼───────────────────────────────┼─────────────────────────────┤
131
+ // │none │<wrapper> │<img /> │
132
+ // │ │ <img /> │ │
133
+ // │ │</wrapper> │ │
134
+ // ├──────┼───────────────────────────────┼─────────────────────────────┤
135
+ // │left │<wrapper style=”float:left”> │<img style=”float:left” /> │
136
+ // │ │ <img /> │ │
137
+ // │ │</wrapper> │ │
138
+ // ├──────┼───────────────────────────────┼─────────────────────────────┤
139
+ // │center│<wrapper> │<p style=”text-align:center”>│
140
+ // │ │ <p style=”text-align:center”> │ <img /> │
141
+ // │ │ <img /> │</p> │
142
+ // │ │ </p> │ │
143
+ // │ │</wrapper> │ │
144
+ // ├──────┼───────────────────────────────┼─────────────────────────────┤
145
+ // │right │<wrapper style=”float:right”> │<img style=”float:right” /> │
146
+ // │ │ <img /> │ │
147
+ // │ │</wrapper> │ │
148
+ // └──────┴───────────────────────────────┴─────────────────────────────┘
149
+ //
150
+ // Non-captioned widget (config.image2_alignClasses defined)
151
+ // ┌──────┬───────────────────────────────┬─────────────────────────────┐
152
+ // │Align │Internal form │Data │
153
+ // ├──────┼───────────────────────────────┼─────────────────────────────┤
154
+ // │none │<wrapper> │<img /> │
155
+ // │ │ <img /> │ │
156
+ // │ │</wrapper> │ │
157
+ // ├──────┼───────────────────────────────┼─────────────────────────────┤
158
+ // │left │<wrapper class=”left”> │<img class=”left” /> │
159
+ // │ │ <img /> │ │
160
+ // │ │</wrapper> │ │
161
+ // ├──────┼───────────────────────────────┼─────────────────────────────┤
162
+ // │center│<wrapper> │<p class=”center”> │
163
+ // │ │ <p class=”center”> │ <img /> │
164
+ // │ │ <img /> │</p> │
165
+ // │ │ </p> │ │
166
+ // │ │</wrapper> │ │
167
+ // ├──────┼───────────────────────────────┼─────────────────────────────┤
168
+ // │right │<wrapper class=”right”> │<img class=”right” /> │
169
+ // │ │ <img /> │ │
170
+ // │ │</wrapper> │ │
171
+ // └──────┴───────────────────────────────┴─────────────────────────────┘
172
+ //
173
+ // Captioned widget (inline styles)
174
+ // ┌──────┬────────────────────────────────────────┬────────────────────────────────────────┐
175
+ // │Align │Internal form │Data │
176
+ // ├──────┼────────────────────────────────────────┼────────────────────────────────────────┤
177
+ // │none │<wrapper> │<figure /> │
178
+ // │ │ <figure /> │ │
179
+ // │ │</wrapper> │ │
180
+ // ├──────┼────────────────────────────────────────┼────────────────────────────────────────┤
181
+ // │left │<wrapper style=”float:left”> │<figure style=”float:left” /> │
182
+ // │ │ <figure /> │ │
183
+ // │ │</wrapper> │ │
184
+ // ├──────┼────────────────────────────────────────┼────────────────────────────────────────┤
185
+ // │center│<wrapper style=”text-align:center”> │<div style=”text-align:center”> │
186
+ // │ │ <figure style=”display:inline-block” />│ <figure style=”display:inline-block” />│
187
+ // │ │</wrapper> │</p> │
188
+ // ├──────┼────────────────────────────────────────┼────────────────────────────────────────┤
189
+ // │right │<wrapper style=”float:right”> │<figure style=”float:right” /> │
190
+ // │ │ <figure /> │ │
191
+ // │ │</wrapper> │ │
192
+ // └──────┴────────────────────────────────────────┴────────────────────────────────────────┘
193
+ //
194
+ // Captioned widget (config.image2_alignClasses defined)
195
+ // ┌──────┬────────────────────────────────────────┬────────────────────────────────────────┐
196
+ // │Align │Internal form │Data │
197
+ // ├──────┼────────────────────────────────────────┼────────────────────────────────────────┤
198
+ // │none │<wrapper> │<figure /> │
199
+ // │ │ <figure /> │ │
200
+ // │ │</wrapper> │ │
201
+ // ├──────┼────────────────────────────────────────┼────────────────────────────────────────┤
202
+ // │left │<wrapper class=”left”> │<figure class=”left” /> │
203
+ // │ │ <figure /> │ │
204
+ // │ │</wrapper> │ │
205
+ // ├──────┼────────────────────────────────────────┼────────────────────────────────────────┤
206
+ // │center│<wrapper class=”center”> │<div class=”center”> │
207
+ // │ │ <figure /> │ <figure /> │
208
+ // │ │</wrapper> │</p> │
209
+ // ├──────┼────────────────────────────────────────┼────────────────────────────────────────┤
210
+ // │right │<wrapper class=”right”> │<figure class=”right” /> │
211
+ // │ │ <figure /> │ │
212
+ // │ │</wrapper> │ │
213
+ // └──────┴────────────────────────────────────────┴────────────────────────────────────────┘
214
+ //
215
+ // @param {CKEDITOR.editor}
216
+ // @returns {Object}
217
+ function widgetDef( editor ) {
218
+ var alignClasses = editor.config.image2_alignClasses,
219
+ captionedClass = editor.config.image2_captionedClass;
220
+
221
+ function deflate() {
222
+ if ( this.deflated )
223
+ return;
224
+
225
+ // Remember whether widget was focused before destroyed.
226
+ if ( editor.widgets.focused == this.widget )
227
+ this.focused = true;
228
+
229
+ editor.widgets.destroy( this.widget );
230
+
231
+ // Mark widget was destroyed.
232
+ this.deflated = true;
233
+ }
234
+
235
+ function inflate() {
236
+ var editable = editor.editable(),
237
+ doc = editor.document;
238
+
239
+ // Create a new widget. This widget will be either captioned
240
+ // non-captioned, block or inline according to what is the
241
+ // new state of the widget.
242
+ if ( this.deflated ) {
243
+ this.widget = editor.widgets.initOn( this.element, 'image', this.widget.data );
244
+
245
+ // Once widget was re-created, it may become an inline element without
246
+ // block wrapper (i.e. when unaligned, end not captioned). Let's do some
247
+ // sort of autoparagraphing here (#10853).
248
+ if ( this.widget.inline && !( new CKEDITOR.dom.elementPath( this.widget.wrapper, editable ).block ) ) {
249
+ var block = doc.createElement( editor.activeEnterMode == CKEDITOR.ENTER_P ? 'p' : 'div' );
250
+ block.replace( this.widget.wrapper );
251
+ this.widget.wrapper.move( block );
252
+ }
253
+
254
+ // The focus must be transferred from the old one (destroyed)
255
+ // to the new one (just created).
256
+ if ( this.focused ) {
257
+ this.widget.focus();
258
+ delete this.focused;
259
+ }
260
+
261
+ delete this.deflated;
262
+ }
263
+
264
+ // If now widget was destroyed just update wrapper's alignment.
265
+ // According to the new state.
266
+ else {
267
+ setWrapperAlign( this.widget, alignClasses );
268
+ }
269
+ }
270
+
271
+ return {
272
+ allowedContent: getWidgetAllowedContent( editor ),
273
+
274
+ requiredContent: 'img[src,alt]',
275
+
276
+ features: getWidgetFeatures( editor ),
277
+
278
+ styleableElements: 'img figure',
279
+
280
+ // This widget converts style-driven dimensions to attributes.
281
+ contentTransformations: [
282
+ [ 'img[width]: sizeToAttribute' ]
283
+ ],
284
+
285
+ // This widget has an editable caption.
286
+ editables: {
287
+ caption: {
288
+ selector: 'figcaption',
289
+ allowedContent: 'br em strong sub sup u s; a[!href]'
290
+ }
291
+ },
292
+
293
+ parts: {
294
+ image: 'img',
295
+ caption: 'figcaption'
296
+ // parts#link defined in widget#init
297
+ },
298
+
299
+ // The name of this widget's dialog.
300
+ dialog: 'image2',
301
+
302
+ // Template of the widget: plain image.
303
+ template: template,
304
+
305
+ data: function() {
306
+ var features = this.features;
307
+
308
+ // Image can't be captioned when figcaption is disallowed (#11004).
309
+ if ( this.data.hasCaption && !editor.filter.checkFeature( features.caption ) )
310
+ this.data.hasCaption = false;
311
+
312
+ // Image can't be aligned when floating is disallowed (#11004).
313
+ if ( this.data.align != 'none' && !editor.filter.checkFeature( features.align ) )
314
+ this.data.align = 'none';
315
+
316
+ // Convert the internal form of the widget from the old state to the new one.
317
+ this.shiftState( {
318
+ widget: this,
319
+ element: this.element,
320
+ oldData: this.oldData,
321
+ newData: this.data,
322
+ deflate: deflate,
323
+ inflate: inflate
324
+ } );
325
+
326
+ // Update widget.parts.link since it will not auto-update unless widget
327
+ // is destroyed and re-inited.
328
+ if ( !this.data.link ) {
329
+ if ( this.parts.link )
330
+ delete this.parts.link;
331
+ } else {
332
+ if ( !this.parts.link )
333
+ this.parts.link = this.parts.image.getParent();
334
+ }
335
+
336
+ this.parts.image.setAttributes( {
337
+ src: this.data.src,
338
+
339
+ // This internal is required by the editor.
340
+ 'data-cke-saved-src': this.data.src,
341
+
342
+ alt: this.data.alt
343
+ } );
344
+
345
+ // If shifting non-captioned -> captioned, remove classes
346
+ // related to styles from <img/>.
347
+ if ( this.oldData && !this.oldData.hasCaption && this.data.hasCaption ) {
348
+ for ( var c in this.data.classes )
349
+ this.parts.image.removeClass( c );
350
+ }
351
+
352
+ // Set dimensions of the image according to gathered data.
353
+ // Do it only when the attributes are allowed (#11004).
354
+ if ( editor.filter.checkFeature( features.dimension ) )
355
+ setDimensions( this );
356
+
357
+ // Cache current data.
358
+ this.oldData = CKEDITOR.tools.extend( {}, this.data );
359
+ },
360
+
361
+ init: function() {
362
+ var helpers = CKEDITOR.plugins.image2,
363
+ image = this.parts.image,
364
+ data = {
365
+ hasCaption: !!this.parts.caption,
366
+ src: image.getAttribute( 'src' ),
367
+ alt: image.getAttribute( 'alt' ) || '',
368
+ width: image.getAttribute( 'width' ) || '',
369
+ height: image.getAttribute( 'height' ) || '',
370
+
371
+ // Lock ratio is on by default (#10833).
372
+ lock: this.ready ? helpers.checkHasNaturalRatio( image ) : true
373
+ };
374
+
375
+ // If we used 'a' in widget#parts definition, it could happen that
376
+ // selected element is a child of widget.parts#caption. Since there's no clever
377
+ // way to solve it with CSS selectors, it's done like that. (#11783).
378
+ var link = image.getAscendant( 'a' );
379
+
380
+ if ( link && this.wrapper.contains( link ) )
381
+ this.parts.link = link;
382
+
383
+ // Depending on configuration, read style/class from element and
384
+ // then remove it. Removed style/class will be set on wrapper in #data listener.
385
+ // Note: Center alignment is detected during upcast, so only left/right cases
386
+ // are checked below.
387
+ if ( !data.align ) {
388
+ // Read the initial left/right alignment from the class set on element.
389
+ if ( alignClasses ) {
390
+ if ( this.element.hasClass( alignClasses[ 0 ] ) )
391
+ data.align = 'left';
392
+ else if ( this.element.hasClass( alignClasses[ 2 ] ) )
393
+ data.align = 'right';
394
+
395
+ if ( data.align )
396
+ this.element.removeClass( alignClasses[ alignmentsObj[ data.align ] ] );
397
+ else
398
+ data.align = 'none';
399
+ }
400
+ // Read initial float style from figure/image and then remove it.
401
+ else {
402
+ data.align = this.element.getStyle( 'float' ) || image.getStyle( 'float' ) || 'none';
403
+ this.element.removeStyle( 'float' );
404
+ image.removeStyle( 'float' );
405
+ }
406
+ }
407
+
408
+ // Update data.link object with attributes if the link has been discovered.
409
+ if ( editor.plugins.link && this.parts.link ) {
410
+ data.link = CKEDITOR.plugins.link.parseLinkAttributes( editor, this.parts.link );
411
+
412
+ // Get rid of cke_widget_* classes in data. Otherwise
413
+ // they might appear in link dialog.
414
+ var advanced = data.link.advanced;
415
+ if ( advanced && advanced.advCSSClasses )
416
+ advanced.advCSSClasses = CKEDITOR.tools.trim( advanced.advCSSClasses.replace( /cke_\S+/, '' ) );
417
+ }
418
+
419
+ // Get rid of extra vertical space when there's no caption.
420
+ // It will improve the look of the resizer.
421
+ this.wrapper[ ( data.hasCaption ? 'remove' : 'add' ) + 'Class' ]( 'cke_image_nocaption' );
422
+
423
+ this.setData( data );
424
+
425
+ // Setup dynamic image resizing with mouse.
426
+ // Don't initialize resizer when dimensions are disallowed (#11004).
427
+ if ( editor.filter.checkFeature( this.features.dimension ) )
428
+ setupResizer( this );
429
+
430
+ this.shiftState = helpers.stateShifter( this.editor );
431
+
432
+ // Add widget editing option to its context menu.
433
+ this.on( 'contextMenu', function( evt ) {
434
+ evt.data.image = CKEDITOR.TRISTATE_OFF;
435
+
436
+ // Integrate context menu items for link.
437
+ // Note that widget may be wrapped in a link, which
438
+ // does not belong to that widget (#11814).
439
+ if ( this.parts.link || this.wrapper.getAscendant( 'a' ) )
440
+ evt.data.link = evt.data.unlink = CKEDITOR.TRISTATE_OFF;
441
+ } );
442
+
443
+ // Pass the reference to this widget to the dialog.
444
+ this.on( 'dialog', function( evt ) {
445
+ evt.data.widget = this;
446
+ }, this );
447
+ },
448
+
449
+ // Overrides default method to handle internal mutability of Image2.
450
+ // @see CKEDITOR.plugins.widget#addClass
451
+ addClass: function( className ) {
452
+ getStyleableElement( this ).addClass( className );
453
+ },
454
+
455
+ // Overrides default method to handle internal mutability of Image2.
456
+ // @see CKEDITOR.plugins.widget#hasClass
457
+ hasClass: function( className ) {
458
+ return getStyleableElement( this ).hasClass( className );
459
+ },
460
+
461
+ // Overrides default method to handle internal mutability of Image2.
462
+ // @see CKEDITOR.plugins.widget#removeClass
463
+ removeClass: function( className ) {
464
+ getStyleableElement( this ).removeClass( className );
465
+ },
466
+
467
+ // Overrides default method to handle internal mutability of Image2.
468
+ // @see CKEDITOR.plugins.widget#getClasses
469
+ getClasses: ( function() {
470
+ var classRegex = new RegExp( '^(' + [].concat( captionedClass, alignClasses ).join( '|' ) + ')$' );
471
+
472
+ return function() {
473
+ var classes = this.repository.parseElementClasses( getStyleableElement( this ).getAttribute( 'class' ) );
474
+
475
+ // Neither config.image2_captionedClass nor config.image2_alignClasses
476
+ // do not belong to style classes.
477
+ for ( var c in classes ) {
478
+ if ( classRegex.test( c ) )
479
+ delete classes[ c ];
480
+ }
481
+
482
+ return classes;
483
+ };
484
+ } )(),
485
+
486
+ upcast: upcastWidgetElement( editor ),
487
+ downcast: downcastWidgetElement( editor )
488
+ };
489
+ }
490
+
491
+ CKEDITOR.plugins.image2 = {
492
+ stateShifter: function( editor ) {
493
+ // Tag name used for centering non-captioned widgets.
494
+ var doc = editor.document,
495
+ alignClasses = editor.config.image2_alignClasses,
496
+ captionedClass = editor.config.image2_captionedClass,
497
+ editable = editor.editable(),
498
+
499
+ // The order that stateActions get executed. It matters!
500
+ shiftables = [ 'hasCaption', 'align', 'link' ];
501
+
502
+ // Atomic procedures, one per state variable.
503
+ var stateActions = {
504
+ align: function( shift, oldValue, newValue ) {
505
+ var el = shift.element;
506
+
507
+ // Alignment changed.
508
+ if ( shift.changed.align ) {
509
+ // No caption in the new state.
510
+ if ( !shift.newData.hasCaption ) {
511
+ // Changed to "center" (non-captioned).
512
+ if ( newValue == 'center' ) {
513
+ shift.deflate();
514
+ shift.element = wrapInCentering( editor, el );
515
+ }
516
+
517
+ // Changed to "non-center" from "center" while caption removed.
518
+ if ( !shift.changed.hasCaption && oldValue == 'center' && newValue != 'center' ) {
519
+ shift.deflate();
520
+ shift.element = unwrapFromCentering( el );
521
+ }
522
+ }
523
+ }
524
+
525
+ // Alignment remains and "center" removed caption.
526
+ else if ( newValue == 'center' && shift.changed.hasCaption && !shift.newData.hasCaption ) {
527
+ shift.deflate();
528
+ shift.element = wrapInCentering( editor, el );
529
+ }
530
+
531
+ // Finally set display for figure.
532
+ if ( !alignClasses && el.is( 'figure' ) ) {
533
+ if ( newValue == 'center' )
534
+ el.setStyle( 'display', 'inline-block' );
535
+ else
536
+ el.removeStyle( 'display' );
537
+ }
538
+ },
539
+
540
+ hasCaption: function( shift, oldValue, newValue ) {
541
+ // This action is for real state change only.
542
+ if ( !shift.changed.hasCaption )
543
+ return;
544
+
545
+ // Get <img/> or <a><img/></a> from widget. Note that widget element might itself
546
+ // be what we're looking for. Also element can be <p style="text-align:center"><a>...</a></p>.
547
+ var imageOrLink;
548
+ if ( shift.element.is( { img: 1, a: 1 } ) )
549
+ imageOrLink = shift.element;
550
+ else
551
+ imageOrLink = shift.element.findOne( 'a,img' );
552
+
553
+ // Switching hasCaption always destroys the widget.
554
+ shift.deflate();
555
+
556
+ // There was no caption, but the caption is to be added.
557
+ if ( newValue ) {
558
+ // Create new <figure> from widget template.
559
+ var figure = CKEDITOR.dom.element.createFromHtml( templateBlock.output( {
560
+ captionedClass: captionedClass,
561
+ captionPlaceholder: editor.lang.image2.captionPlaceholder
562
+ } ), doc );
563
+
564
+ // Replace element with <figure>.
565
+ replaceSafely( figure, shift.element );
566
+
567
+ // Use old <img/> or <a><img/></a> instead of the one from the template,
568
+ // so we won't lose additional attributes.
569
+ imageOrLink.replace( figure.findOne( 'img' ) );
570
+
571
+ // Update widget's element.
572
+ shift.element = figure;
573
+ }
574
+
575
+ // The caption was present, but now it's to be removed.
576
+ else {
577
+ // Unwrap <img/> or <a><img/></a> from figure.
578
+ imageOrLink.replace( shift.element );
579
+
580
+ // Update widget's element.
581
+ shift.element = imageOrLink;
582
+ }
583
+ },
584
+
585
+ link: function( shift, oldValue, newValue ) {
586
+ if ( shift.changed.link ) {
587
+ var img = shift.element.is( 'img' ) ?
588
+ shift.element : shift.element.findOne( 'img' ),
589
+ link = shift.element.is( 'a' ) ?
590
+ shift.element : shift.element.findOne( 'a' ),
591
+ // Why deflate:
592
+ // If element is <img/>, it will be wrapped into <a>,
593
+ // which becomes a new widget.element.
594
+ // If element is <a><img/></a>, it will be unlinked
595
+ // so <img/> becomes a new widget.element.
596
+ needsDeflate = ( shift.element.is( 'a' ) && !newValue ) || ( shift.element.is( 'img' ) && newValue ),
597
+ newEl;
598
+
599
+ if ( needsDeflate )
600
+ shift.deflate();
601
+
602
+ // If unlinked the image, returned element is <img>.
603
+ if ( !newValue )
604
+ newEl = unwrapFromLink( link );
605
+ else {
606
+ // If linked the image, returned element is <a>.
607
+ if ( !oldValue )
608
+ newEl = wrapInLink( img, shift.newData.link );
609
+
610
+ // Set and remove all attributes associated with this state.
611
+ var attributes = CKEDITOR.plugins.link.getLinkAttributes( editor, newValue );
612
+
613
+ if ( !CKEDITOR.tools.isEmpty( attributes.set ) )
614
+ ( newEl || link ).setAttributes( attributes.set );
615
+
616
+ if ( attributes.removed.length )
617
+ ( newEl || link ).removeAttributes( attributes.removed );
618
+ }
619
+
620
+ if ( needsDeflate )
621
+ shift.element = newEl;
622
+ }
623
+ }
624
+ };
625
+
626
+ function wrapInCentering( editor, element ) {
627
+ var attribsAndStyles = {};
628
+
629
+ if ( alignClasses )
630
+ attribsAndStyles.attributes = { 'class': alignClasses[ 1 ] };
631
+ else
632
+ attribsAndStyles.styles = { 'text-align': 'center' };
633
+
634
+ // There's no gentle way to center inline element with CSS, so create p/div
635
+ // that wraps widget contents and does the trick either with style or class.
636
+ var center = doc.createElement(
637
+ editor.activeEnterMode == CKEDITOR.ENTER_P ? 'p' : 'div', attribsAndStyles );
638
+
639
+ // Replace element with centering wrapper.
640
+ replaceSafely( center, element );
641
+ element.move( center );
642
+
643
+ return center;
644
+ }
645
+
646
+ function unwrapFromCentering( element ) {
647
+ var imageOrLink = element.findOne( 'a,img' );
648
+
649
+ imageOrLink.replace( element );
650
+
651
+ return imageOrLink;
652
+ }
653
+
654
+ // Wraps <img/> -> <a><img/></a>.
655
+ // Returns reference to <a>.
656
+ //
657
+ // @param {CKEDITOR.dom.element} img
658
+ // @param {Object} linkData
659
+ // @returns {CKEDITOR.dom.element}
660
+ function wrapInLink( img, linkData ) {
661
+ var link = doc.createElement( 'a', {
662
+ attributes: {
663
+ href: linkData.url
664
+ }
665
+ } );
666
+
667
+ link.replace( img );
668
+ img.move( link );
669
+
670
+ return link;
671
+ }
672
+
673
+ // De-wraps <a><img/></a> -> <img/>.
674
+ // Returns the reference to <img/>
675
+ //
676
+ // @param {CKEDITOR.dom.element} link
677
+ // @returns {CKEDITOR.dom.element}
678
+ function unwrapFromLink( link ) {
679
+ var img = link.findOne( 'img' );
680
+
681
+ img.replace( link );
682
+
683
+ return img;
684
+ }
685
+
686
+ function replaceSafely( replacing, replaced ) {
687
+ if ( replaced.getParent() ) {
688
+ var range = editor.createRange();
689
+
690
+ range.moveToPosition( replaced, CKEDITOR.POSITION_BEFORE_START );
691
+
692
+ // Remove old element. Do it before insertion to avoid a case when
693
+ // element is moved from 'replaced' element before it, what creates
694
+ // a tricky case which insertElementIntorRange does not handle.
695
+ replaced.remove();
696
+
697
+ editable.insertElementIntoRange( replacing, range );
698
+ }
699
+ else {
700
+ replacing.replace( replaced );
701
+ }
702
+ }
703
+
704
+ return function( shift ) {
705
+ var name, i;
706
+
707
+ shift.changed = {};
708
+
709
+ for ( i = 0; i < shiftables.length; i++ ) {
710
+ name = shiftables[ i ];
711
+
712
+ shift.changed[ name ] = shift.oldData ?
713
+ shift.oldData[ name ] !== shift.newData[ name ] : false;
714
+ }
715
+
716
+ // Iterate over possible state variables.
717
+ for ( i = 0; i < shiftables.length; i++ ) {
718
+ name = shiftables[ i ];
719
+
720
+ stateActions[ name ]( shift,
721
+ shift.oldData ? shift.oldData[ name ] : null,
722
+ shift.newData[ name ] );
723
+ }
724
+
725
+ shift.inflate();
726
+ };
727
+ },
728
+
729
+ // Checks whether current ratio of the image match the natural one.
730
+ // by comparing dimensions.
731
+ // @param {CKEDITOR.dom.element} image
732
+ // @returns {Boolean}
733
+ checkHasNaturalRatio: function( image ) {
734
+ var $ = image.$,
735
+ natural = this.getNatural( image );
736
+
737
+ // The reason for two alternative comparisons is that the rounding can come from
738
+ // both dimensions, e.g. there are two cases:
739
+ // 1. height is computed as a rounded relation of the real height and the value of width,
740
+ // 2. width is computed as a rounded relation of the real width and the value of heigh.
741
+ return Math.round( $.clientWidth / natural.width * natural.height ) == $.clientHeight ||
742
+ Math.round( $.clientHeight / natural.height * natural.width ) == $.clientWidth;
743
+ },
744
+
745
+ // Returns natural dimensions of the image. For modern browsers
746
+ // it uses natural(Width|Height) for old ones (IE8), creates
747
+ // a new image and reads dimensions.
748
+ // @param {CKEDITOR.dom.element} image
749
+ // @returns {Object}
750
+ getNatural: function( image ) {
751
+ var dimensions;
752
+
753
+ if ( image.$.naturalWidth ) {
754
+ dimensions = {
755
+ width: image.$.naturalWidth,
756
+ height: image.$.naturalHeight
757
+ };
758
+ } else {
759
+ var img = new Image();
760
+ img.src = image.getAttribute( 'src' );
761
+
762
+ dimensions = {
763
+ width: img.width,
764
+ height: img.height
765
+ };
766
+ }
767
+
768
+ return dimensions;
769
+ }
770
+ };
771
+
772
+ function setWrapperAlign( widget, alignClasses ) {
773
+ var wrapper = widget.wrapper,
774
+ align = widget.data.align,
775
+ hasCaption = widget.data.hasCaption;
776
+
777
+ if ( alignClasses ) {
778
+ // Remove all align classes first.
779
+ for ( var i = 3; i--; )
780
+ wrapper.removeClass( alignClasses[ i ] );
781
+
782
+ if ( align == 'center' ) {
783
+ // Avoid touching non-captioned, centered widgets because
784
+ // they have the class set on the element instead of wrapper:
785
+ //
786
+ // <div class="cke_widget_wrapper">
787
+ // <p class="center-class">
788
+ // <img />
789
+ // </p>
790
+ // </div>
791
+ if ( hasCaption ) {
792
+ wrapper.addClass( alignClasses[1] );
793
+ }
794
+ } else if ( align != 'none' ) {
795
+ wrapper.addClass( alignClasses[ alignmentsObj[ align ] ] );
796
+ }
797
+ } else {
798
+ if ( align == 'center' ) {
799
+ if ( hasCaption )
800
+ wrapper.setStyle( 'text-align', 'center' );
801
+ else
802
+ wrapper.removeStyle( 'text-align' );
803
+
804
+ wrapper.removeStyle( 'float' );
805
+ }
806
+ else {
807
+ if ( align == 'none' )
808
+ wrapper.removeStyle( 'float' );
809
+ else
810
+ wrapper.setStyle( 'float', align );
811
+
812
+ wrapper.removeStyle( 'text-align' );
813
+ }
814
+ }
815
+ }
816
+
817
+ // Returns a function that creates widgets from all <img> and
818
+ // <figure class="{config.image2_captionedClass}"> elements.
819
+ //
820
+ // @param {CKEDITOR.editor} editor
821
+ // @returns {Function}
822
+ function upcastWidgetElement( editor ) {
823
+ var isCenterWrapper = centerWrapperChecker( editor ),
824
+ captionedClass = editor.config.image2_captionedClass;
825
+
826
+ // @param {CKEDITOR.htmlParser.element} el
827
+ // @param {Object} data
828
+ return function( el, data ) {
829
+ var dimensions = { width: 1, height: 1 },
830
+ name = el.name,
831
+ image;
832
+
833
+ // #11110 Don't initialize on pasted fake objects.
834
+ if ( el.attributes[ 'data-cke-realelement' ] )
835
+ return;
836
+
837
+ // If a center wrapper is found, there are 3 possible cases:
838
+ //
839
+ // 1. <div style="text-align:center"><figure>...</figure></div>.
840
+ // In this case centering is done with a class set on widget.wrapper.
841
+ // Simply replace centering wrapper with figure (it's no longer necessary).
842
+ //
843
+ // 2. <p style="text-align:center"><img/></p>.
844
+ // Nothing to do here: <p> remains for styling purposes.
845
+ //
846
+ // 3. <div style="text-align:center"><img/></div>.
847
+ // Nothing to do here (2.) but that case is only possible in enterMode different
848
+ // than ENTER_P.
849
+ if ( isCenterWrapper( el ) ) {
850
+ if ( name == 'div' ) {
851
+ var figure = el.getFirst( 'figure' );
852
+
853
+ // Case #1.
854
+ if ( figure ) {
855
+ el.replaceWith( figure );
856
+ el = figure;
857
+ }
858
+ }
859
+ // Cases #2 and #3 (handled transparently)
860
+
861
+ // If there's a centering wrapper, save it in data.
862
+ data.align = 'center';
863
+
864
+ // Image can be wrapped in link <a><img/></a>.
865
+ image = el.getFirst( 'img' ) || el.getFirst( 'a' ).getFirst( 'img' );
866
+ }
867
+
868
+ // No center wrapper has been found.
869
+ else if ( name == 'figure' && el.hasClass( captionedClass ) ) {
870
+ image = el.getFirst( 'img' ) || el.getFirst( 'a' ).getFirst( 'img' );
871
+
872
+ // Upcast linked image like <a><img/></a>.
873
+ } else if ( isLinkedOrStandaloneImage( el ) ) {
874
+ image = el.name == 'a' ? el.children[0] : el;
875
+ }
876
+
877
+ if ( !image )
878
+ return;
879
+
880
+ // If there's an image, then cool, we got a widget.
881
+ // Now just remove dimension attributes expressed with %.
882
+ for ( var d in dimensions ) {
883
+ var dimension = image.attributes[ d ];
884
+
885
+ if ( dimension && dimension.match( regexPercent ) )
886
+ delete image.attributes[ d ];
887
+ }
888
+
889
+ return el;
890
+ };
891
+ }
892
+
893
+ // Returns a function which transforms the widget to the external format
894
+ // according to the current configuration.
895
+ //
896
+ // @param {CKEDITOR.editor}
897
+ function downcastWidgetElement( editor ) {
898
+ var alignClasses = editor.config.image2_alignClasses;
899
+
900
+ // @param {CKEDITOR.htmlParser.element} el
901
+ return function( el ) {
902
+ // In case of <a><img/></a>, <img/> is the element to hold
903
+ // inline styles or classes (image2_alignClasses).
904
+ var attrsHolder = el.name == 'a' ? el.getFirst() : el,
905
+ attrs = attrsHolder.attributes,
906
+ align = this.data.align;
907
+
908
+ // De-wrap the image from resize handle wrapper.
909
+ // Only block widgets have one.
910
+ if ( !this.inline ) {
911
+ var resizeWrapper = el.getFirst( 'span' );
912
+
913
+ if ( resizeWrapper )
914
+ resizeWrapper.replaceWith( resizeWrapper.getFirst( { img: 1, a: 1 } ) );
915
+ }
916
+
917
+ if ( align && align != 'none' ) {
918
+ var styles = CKEDITOR.tools.parseCssText( attrs.style || '' );
919
+
920
+ // When the widget is captioned (<figure>) and internally centering is done
921
+ // with widget's wrapper style/class, in the external data representation,
922
+ // <figure> must be wrapped with an element holding an style/class:
923
+ //
924
+ // <div style="text-align:center">
925
+ // <figure class="image" style="display:inline-block">...</figure>
926
+ // </div>
927
+ // or
928
+ // <div class="some-center-class">
929
+ // <figure class="image">...</figure>
930
+ // </div>
931
+ //
932
+ if ( align == 'center' && el.name == 'figure' ) {
933
+ el = el.wrapWith( new CKEDITOR.htmlParser.element( 'div',
934
+ alignClasses ? { 'class': alignClasses[ 1 ] } : { style: 'text-align:center' } ) );
935
+ }
936
+
937
+ // If left/right, add float style to the downcasted element.
938
+ else if ( align in { left: 1, right: 1 } ) {
939
+ if ( alignClasses )
940
+ attrsHolder.addClass( alignClasses[ alignmentsObj[ align ] ] );
941
+ else
942
+ styles[ 'float' ] = align;
943
+ }
944
+
945
+ // Update element styles.
946
+ if ( !alignClasses && !CKEDITOR.tools.isEmpty( styles ) )
947
+ attrs.style = CKEDITOR.tools.writeCssText( styles );
948
+ }
949
+
950
+ return el;
951
+ };
952
+ }
953
+
954
+ // Returns a function that checks if an element is a centering wrapper.
955
+ //
956
+ // @param {CKEDITOR.editor} editor
957
+ // @returns {Function}
958
+ function centerWrapperChecker( editor ) {
959
+ var captionedClass = editor.config.image2_captionedClass,
960
+ alignClasses = editor.config.image2_alignClasses,
961
+ validChildren = { figure: 1, a: 1, img: 1 };
962
+
963
+ return function( el ) {
964
+ // Wrapper must be either <div> or <p>.
965
+ if ( !( el.name in { div: 1, p: 1 } ) )
966
+ return false;
967
+
968
+ var children = el.children;
969
+
970
+ // Centering wrapper can have only one child.
971
+ if ( children.length !== 1 )
972
+ return false;
973
+
974
+ var child = children[ 0 ];
975
+
976
+ // Only <figure> or <img /> can be first (only) child of centering wrapper,
977
+ // regardless of its type.
978
+ if ( !( child.name in validChildren ) )
979
+ return false;
980
+
981
+ // If centering wrapper is <p>, only <img /> can be the child.
982
+ // <p style="text-align:center"><img /></p>
983
+ if ( el.name == 'p' ) {
984
+ if ( !isLinkedOrStandaloneImage( child ) )
985
+ return false;
986
+ }
987
+ // Centering <div> can hold <img/> or <figure>, depending on enterMode.
988
+ else {
989
+ // If a <figure> is the first (only) child, it must have a class.
990
+ // <div style="text-align:center"><figure>...</figure><div>
991
+ if ( child.name == 'figure' ) {
992
+ if ( !child.hasClass( captionedClass ) )
993
+ return false;
994
+ } else {
995
+ // Centering <div> can hold <img/> or <a><img/></a> only when enterMode
996
+ // is ENTER_(BR|DIV).
997
+ // <div style="text-align:center"><img /></div>
998
+ // <div style="text-align:center"><a><img /></a></div>
999
+ if ( editor.enterMode == CKEDITOR.ENTER_P )
1000
+ return false;
1001
+
1002
+ // Regardless of enterMode, a child which is not <figure> must be
1003
+ // either <img/> or <a><img/></a>.
1004
+ if ( !isLinkedOrStandaloneImage( child ) )
1005
+ return false;
1006
+ }
1007
+ }
1008
+
1009
+ // Centering wrapper got to be... centering. If image2_alignClasses are defined,
1010
+ // check for centering class. Otherwise, check the style.
1011
+ if ( alignClasses ? el.hasClass( alignClasses[ 1 ] ) :
1012
+ CKEDITOR.tools.parseCssText( el.attributes.style || '', true )[ 'text-align' ] == 'center' )
1013
+ return true;
1014
+
1015
+ return false;
1016
+ };
1017
+ }
1018
+
1019
+ // Checks whether element is <img/> or <a><img/></a>.
1020
+ //
1021
+ // @param {CKEDITOR.htmlParser.element}
1022
+ function isLinkedOrStandaloneImage( el ) {
1023
+ if ( el.name == 'img' )
1024
+ return true;
1025
+ else if ( el.name == 'a' )
1026
+ return el.children.length == 1 && el.getFirst( 'img' );
1027
+
1028
+ return false;
1029
+ }
1030
+
1031
+ // Sets width and height of the widget image according to current widget data.
1032
+ //
1033
+ // @param {CKEDITOR.plugins.widget} widget
1034
+ function setDimensions( widget ) {
1035
+ var data = widget.data,
1036
+ dimensions = { width: data.width, height: data.height },
1037
+ image = widget.parts.image;
1038
+
1039
+ for ( var d in dimensions ) {
1040
+ if ( dimensions[ d ] )
1041
+ image.setAttribute( d, dimensions[ d ] );
1042
+ else
1043
+ image.removeAttribute( d );
1044
+ }
1045
+ }
1046
+
1047
+ // Defines all features related to drag-driven image resizing.
1048
+ //
1049
+ // @param {CKEDITOR.plugins.widget} widget
1050
+ function setupResizer( widget ) {
1051
+ var editor = widget.editor,
1052
+ editable = editor.editable(),
1053
+ doc = editor.document,
1054
+
1055
+ // Store the resizer in a widget for testing (#11004).
1056
+ resizer = widget.resizer = doc.createElement( 'span' );
1057
+
1058
+ resizer.addClass( 'cke_image_resizer' );
1059
+ resizer.setAttribute( 'title', editor.lang.image2.resizer );
1060
+ resizer.append( new CKEDITOR.dom.text( '\u200b', doc ) );
1061
+
1062
+ // Inline widgets don't need a resizer wrapper as an image spans the entire widget.
1063
+ if ( !widget.inline ) {
1064
+ var imageOrLink = widget.parts.link || widget.parts.image,
1065
+ oldResizeWrapper = imageOrLink.getParent(),
1066
+ resizeWrapper = doc.createElement( 'span' );
1067
+
1068
+ resizeWrapper.addClass( 'cke_image_resizer_wrapper' );
1069
+ resizeWrapper.append( imageOrLink );
1070
+ resizeWrapper.append( resizer );
1071
+ widget.element.append( resizeWrapper, true );
1072
+
1073
+ // Remove the old wrapper which could came from e.g. pasted HTML
1074
+ // and which could be corrupted (e.g. resizer span has been lost).
1075
+ if ( oldResizeWrapper.is( 'span' ) )
1076
+ oldResizeWrapper.remove();
1077
+ } else {
1078
+ widget.wrapper.append( resizer );
1079
+ }
1080
+
1081
+ // Calculate values of size variables and mouse offsets.
1082
+ resizer.on( 'mousedown', function( evt ) {
1083
+ var image = widget.parts.image,
1084
+
1085
+ // "factor" can be either 1 or -1. I.e.: For right-aligned images, we need to
1086
+ // subtract the difference to get proper width, etc. Without "factor",
1087
+ // resizer starts working the opposite way.
1088
+ factor = widget.data.align == 'right' ? -1 : 1,
1089
+
1090
+ // The x-coordinate of the mouse relative to the screen
1091
+ // when button gets pressed.
1092
+ startX = evt.data.$.screenX,
1093
+ startY = evt.data.$.screenY,
1094
+
1095
+ // The initial dimensions and aspect ratio of the image.
1096
+ startWidth = image.$.clientWidth,
1097
+ startHeight = image.$.clientHeight,
1098
+ ratio = startWidth / startHeight,
1099
+
1100
+ listeners = [],
1101
+
1102
+ // A class applied to editable during resizing.
1103
+ cursorClass = 'cke_image_s' + ( !~factor ? 'w' : 'e' ),
1104
+
1105
+ nativeEvt, newWidth, newHeight, updateData,
1106
+ moveDiffX, moveDiffY, moveRatio;
1107
+
1108
+ // Save the undo snapshot first: before resizing.
1109
+ editor.fire( 'saveSnapshot' );
1110
+
1111
+ // Mousemove listeners are removed on mouseup.
1112
+ attachToDocuments( 'mousemove', onMouseMove, listeners );
1113
+
1114
+ // Clean up the mousemove listener. Update widget data if valid.
1115
+ attachToDocuments( 'mouseup', onMouseUp, listeners );
1116
+
1117
+ // The entire editable will have the special cursor while resizing goes on.
1118
+ editable.addClass( cursorClass );
1119
+
1120
+ // This is to always keep the resizer element visible while resizing.
1121
+ resizer.addClass( 'cke_image_resizing' );
1122
+
1123
+ // Attaches an event to a global document if inline editor.
1124
+ // Additionally, if classic (`iframe`-based) editor, also attaches the same event to `iframe`'s document.
1125
+ function attachToDocuments( name, callback, collection ) {
1126
+ var globalDoc = CKEDITOR.document,
1127
+ listeners = [];
1128
+
1129
+ if ( !doc.equals( globalDoc ) )
1130
+ listeners.push( globalDoc.on( name, callback ) );
1131
+
1132
+ listeners.push( doc.on( name, callback ) );
1133
+
1134
+ if ( collection ) {
1135
+ for ( var i = listeners.length; i--; )
1136
+ collection.push( listeners.pop() );
1137
+ }
1138
+ }
1139
+
1140
+ // Calculate with first, and then adjust height, preserving ratio.
1141
+ function adjustToX() {
1142
+ newWidth = startWidth + factor * moveDiffX;
1143
+ newHeight = Math.round( newWidth / ratio );
1144
+ }
1145
+
1146
+ // Calculate height first, and then adjust width, preserving ratio.
1147
+ function adjustToY() {
1148
+ newHeight = startHeight - moveDiffY;
1149
+ newWidth = Math.round( newHeight * ratio );
1150
+ }
1151
+
1152
+ // This is how variables refer to the geometry.
1153
+ // Note: x corresponds to moveOffset, this is the position of mouse
1154
+ // Note: o corresponds to [startX, startY].
1155
+ //
1156
+ // +--------------+--------------+
1157
+ // | | |
1158
+ // | I | II |
1159
+ // | | |
1160
+ // +------------- o -------------+ _ _ _
1161
+ // | | | ^
1162
+ // | VI | III | | moveDiffY
1163
+ // | | x _ _ _ _ _ v
1164
+ // +--------------+---------|----+
1165
+ // | |
1166
+ // <------->
1167
+ // moveDiffX
1168
+ function onMouseMove( evt ) {
1169
+ nativeEvt = evt.data.$;
1170
+
1171
+ // This is how far the mouse is from the point the button was pressed.
1172
+ moveDiffX = nativeEvt.screenX - startX;
1173
+ moveDiffY = startY - nativeEvt.screenY;
1174
+
1175
+ // This is the aspect ratio of the move difference.
1176
+ moveRatio = Math.abs( moveDiffX / moveDiffY );
1177
+
1178
+ // Left, center or none-aligned widget.
1179
+ if ( factor == 1 ) {
1180
+ if ( moveDiffX <= 0 ) {
1181
+ // Case: IV.
1182
+ if ( moveDiffY <= 0 )
1183
+ adjustToX();
1184
+
1185
+ // Case: I.
1186
+ else {
1187
+ if ( moveRatio >= ratio )
1188
+ adjustToX();
1189
+ else
1190
+ adjustToY();
1191
+ }
1192
+ } else {
1193
+ // Case: III.
1194
+ if ( moveDiffY <= 0 ) {
1195
+ if ( moveRatio >= ratio )
1196
+ adjustToY();
1197
+ else
1198
+ adjustToX();
1199
+ }
1200
+
1201
+ // Case: II.
1202
+ else {
1203
+ adjustToY();
1204
+ }
1205
+ }
1206
+ }
1207
+
1208
+ // Right-aligned widget. It mirrors behaviours, so I becomes II,
1209
+ // IV becomes III and vice-versa.
1210
+ else {
1211
+ if ( moveDiffX <= 0 ) {
1212
+ // Case: IV.
1213
+ if ( moveDiffY <= 0 ) {
1214
+ if ( moveRatio >= ratio )
1215
+ adjustToY();
1216
+ else
1217
+ adjustToX();
1218
+ }
1219
+
1220
+ // Case: I.
1221
+ else {
1222
+ adjustToY();
1223
+ }
1224
+ } else {
1225
+ // Case: III.
1226
+ if ( moveDiffY <= 0 )
1227
+ adjustToX();
1228
+
1229
+ // Case: II.
1230
+ else {
1231
+ if ( moveRatio >= ratio ) {
1232
+ adjustToX();
1233
+ } else {
1234
+ adjustToY();
1235
+ }
1236
+ }
1237
+ }
1238
+ }
1239
+
1240
+ // Don't update attributes if less than 10.
1241
+ // This is to prevent images to visually disappear.
1242
+ if ( newWidth >= 15 && newHeight >= 15 ) {
1243
+ image.setAttributes( { width: newWidth, height: newHeight } );
1244
+ updateData = true;
1245
+ } else {
1246
+ updateData = false;
1247
+ }
1248
+ }
1249
+
1250
+ function onMouseUp() {
1251
+ var l;
1252
+
1253
+ while ( ( l = listeners.pop() ) )
1254
+ l.removeListener();
1255
+
1256
+ // Restore default cursor by removing special class.
1257
+ editable.removeClass( cursorClass );
1258
+
1259
+ // This is to bring back the regular behaviour of the resizer.
1260
+ resizer.removeClass( 'cke_image_resizing' );
1261
+
1262
+ if ( updateData ) {
1263
+ widget.setData( { width: newWidth, height: newHeight } );
1264
+
1265
+ // Save another undo snapshot: after resizing.
1266
+ editor.fire( 'saveSnapshot' );
1267
+ }
1268
+
1269
+ // Don't update data twice or more.
1270
+ updateData = false;
1271
+ }
1272
+ } );
1273
+
1274
+ // Change the position of the widget resizer when data changes.
1275
+ widget.on( 'data', function() {
1276
+ resizer[ widget.data.align == 'right' ? 'addClass' : 'removeClass' ]( 'cke_image_resizer_left' );
1277
+ } );
1278
+ }
1279
+
1280
+ // Integrates widget alignment setting with justify
1281
+ // plugin's commands (execution and refreshment).
1282
+ // @param {CKEDITOR.editor} editor
1283
+ // @param {String} value 'left', 'right', 'center' or 'block'
1284
+ function alignCommandIntegrator( editor ) {
1285
+ var execCallbacks = [],
1286
+ enabled;
1287
+
1288
+ return function( value ) {
1289
+ var command = editor.getCommand( 'justify' + value );
1290
+
1291
+ // Most likely, the justify plugin isn't loaded.
1292
+ if ( !command )
1293
+ return;
1294
+
1295
+ // This command will be manually refreshed along with
1296
+ // other commands after exec.
1297
+ execCallbacks.push( function() {
1298
+ command.refresh( editor, editor.elementPath() );
1299
+ } );
1300
+
1301
+ if ( value in { right: 1, left: 1, center: 1 } ) {
1302
+ command.on( 'exec', function( evt ) {
1303
+ var widget = getFocusedWidget( editor );
1304
+
1305
+ if ( widget ) {
1306
+ widget.setData( 'align', value );
1307
+
1308
+ // Once the widget changed its align, all the align commands
1309
+ // must be refreshed: the event is to be cancelled.
1310
+ for ( var i = execCallbacks.length; i--; )
1311
+ execCallbacks[ i ]();
1312
+
1313
+ evt.cancel();
1314
+ }
1315
+ } );
1316
+ }
1317
+
1318
+ command.on( 'refresh', function( evt ) {
1319
+ var widget = getFocusedWidget( editor ),
1320
+ allowed = { right: 1, left: 1, center: 1 };
1321
+
1322
+ if ( !widget )
1323
+ return;
1324
+
1325
+ // Cache "enabled" on first use. This is because filter#checkFeature may
1326
+ // not be available during plugin's afterInit in the future — a moment when
1327
+ // alignCommandIntegrator is called.
1328
+ if ( enabled === undefined )
1329
+ enabled = editor.filter.checkFeature( editor.widgets.registered.image.features.align );
1330
+
1331
+ // Don't allow justify commands when widget alignment is disabled (#11004).
1332
+ if ( !enabled )
1333
+ this.setState( CKEDITOR.TRISTATE_DISABLED );
1334
+ else {
1335
+ this.setState(
1336
+ ( widget.data.align == value ) ?
1337
+ CKEDITOR.TRISTATE_ON
1338
+ :
1339
+ ( value in allowed ) ?
1340
+ CKEDITOR.TRISTATE_OFF
1341
+ :
1342
+ CKEDITOR.TRISTATE_DISABLED );
1343
+ }
1344
+
1345
+ evt.cancel();
1346
+ } );
1347
+ };
1348
+ }
1349
+
1350
+ function linkCommandIntegrator( editor ) {
1351
+ // Nothing to integrate with if link is not loaded.
1352
+ if ( !editor.plugins.link )
1353
+ return;
1354
+
1355
+ CKEDITOR.on( 'dialogDefinition', function( evt ) {
1356
+ var dialog = evt.data;
1357
+
1358
+ if ( dialog.name == 'link' ) {
1359
+ var def = dialog.definition;
1360
+
1361
+ var onShow = def.onShow,
1362
+ onOk = def.onOk;
1363
+
1364
+ def.onShow = function() {
1365
+ var widget = getFocusedWidget( editor );
1366
+
1367
+ // Widget cannot be enclosed in a link, i.e.
1368
+ // <a>foo<inline widget/>bar</a>
1369
+ if ( widget && ( widget.inline ? !widget.wrapper.getAscendant( 'a' ) : 1 ) )
1370
+ this.setupContent( widget.data.link || {} );
1371
+ else
1372
+ onShow.apply( this, arguments );
1373
+ };
1374
+
1375
+ // Set widget data if linking the widget using
1376
+ // link dialog (instead of default action).
1377
+ // State shifter handles data change and takes
1378
+ // care of internal DOM structure of linked widget.
1379
+ def.onOk = function() {
1380
+ var widget = getFocusedWidget( editor );
1381
+
1382
+ // Widget cannot be enclosed in a link, i.e.
1383
+ // <a>foo<inline widget/>bar</a>
1384
+ if ( widget && ( widget.inline ? !widget.wrapper.getAscendant( 'a' ) : 1 ) ) {
1385
+ var data = {};
1386
+
1387
+ // Collect data from fields.
1388
+ this.commitContent( data );
1389
+
1390
+ // Set collected data to widget.
1391
+ widget.setData( 'link', data );
1392
+ } else {
1393
+ onOk.apply( this, arguments );
1394
+ }
1395
+ };
1396
+ }
1397
+ } );
1398
+
1399
+ // Overwrite default behaviour of unlink command.
1400
+ editor.getCommand( 'unlink' ).on( 'exec', function( evt ) {
1401
+ var widget = getFocusedWidget( editor );
1402
+
1403
+ // Override unlink only when link truly belongs to the widget.
1404
+ // If wrapped inline widget in a link, let default unlink work (#11814).
1405
+ if ( !widget || !widget.parts.link )
1406
+ return;
1407
+
1408
+ widget.setData( 'link', null );
1409
+
1410
+ // Selection (which is fake) may not change if unlinked image in focused widget,
1411
+ // i.e. if captioned image. Let's refresh command state manually here.
1412
+ this.refresh( editor, editor.elementPath() );
1413
+
1414
+ evt.cancel();
1415
+ } );
1416
+
1417
+ // Overwrite default refresh of unlink command.
1418
+ editor.getCommand( 'unlink' ).on( 'refresh', function( evt ) {
1419
+ var widget = getFocusedWidget( editor );
1420
+
1421
+ if ( !widget )
1422
+ return;
1423
+
1424
+ // Note that widget may be wrapped in a link, which
1425
+ // does not belong to that widget (#11814).
1426
+ this.setState( widget.data.link || widget.wrapper.getAscendant( 'a' ) ?
1427
+ CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED );
1428
+
1429
+ evt.cancel();
1430
+ } );
1431
+ }
1432
+
1433
+ // Returns the focused widget, if of the type specific for this plugin.
1434
+ // If no widget is focused, `null` is returned.
1435
+ //
1436
+ // @param {CKEDITOR.editor}
1437
+ // @returns {CKEDITOR.plugins.widget}
1438
+ function getFocusedWidget( editor ) {
1439
+ var widget = editor.widgets.focused;
1440
+
1441
+ if ( widget && widget.name == 'image' )
1442
+ return widget;
1443
+
1444
+ return null;
1445
+ }
1446
+
1447
+ // Returns a set of widget allowedContent rules, depending
1448
+ // on configurations like config#image2_alignClasses or
1449
+ // config#image2_captionedClass.
1450
+ //
1451
+ // @param {CKEDITOR.editor}
1452
+ // @returns {Object}
1453
+ function getWidgetAllowedContent( editor ) {
1454
+ var alignClasses = editor.config.image2_alignClasses,
1455
+ rules = {
1456
+ // Widget may need <div> or <p> centering wrapper.
1457
+ div: {
1458
+ match: centerWrapperChecker( editor )
1459
+ },
1460
+ p: {
1461
+ match: centerWrapperChecker( editor )
1462
+ },
1463
+ img: {
1464
+ attributes: '!src,alt,width,height'
1465
+ },
1466
+ figure: {
1467
+ classes: '!' + editor.config.image2_captionedClass
1468
+ },
1469
+ figcaption: true
1470
+ };
1471
+
1472
+ if ( alignClasses ) {
1473
+ // Centering class from the config.
1474
+ rules.div.classes = alignClasses[ 1 ];
1475
+ rules.p.classes = rules.div.classes;
1476
+
1477
+ // Left/right classes from the config.
1478
+ rules.img.classes = alignClasses[ 0 ] + ',' + alignClasses[ 2 ];
1479
+ rules.figure.classes += ',' + rules.img.classes;
1480
+ } else {
1481
+ // Centering with text-align.
1482
+ rules.div.styles = 'text-align';
1483
+ rules.p.styles = 'text-align';
1484
+
1485
+ rules.img.styles = 'float';
1486
+ rules.figure.styles = 'float,display';
1487
+ }
1488
+
1489
+ return rules;
1490
+ }
1491
+
1492
+ // Returns a set of widget feature rules, depending
1493
+ // on editor configuration. Note that the following may not cover
1494
+ // all the possible cases since requiredContent supports a single
1495
+ // tag only.
1496
+ //
1497
+ // @param {CKEDITOR.editor}
1498
+ // @returns {Object}
1499
+ function getWidgetFeatures( editor ) {
1500
+ var alignClasses = editor.config.image2_alignClasses,
1501
+ features = {
1502
+ dimension: {
1503
+ requiredContent: 'img[width,height]'
1504
+ },
1505
+ align: {
1506
+ requiredContent: 'img' +
1507
+ ( alignClasses ? '(' + alignClasses[ 0 ] + ')' : '{float}' )
1508
+ },
1509
+ caption: {
1510
+ requiredContent: 'figcaption'
1511
+ }
1512
+ };
1513
+
1514
+ return features;
1515
+ }
1516
+
1517
+ // Returns element which is styled, considering current
1518
+ // state of the widget.
1519
+ //
1520
+ // @see CKEDITOR.plugins.widget#applyStyle
1521
+ // @param {CKEDITOR.plugins.widget} widget
1522
+ // @returns {CKEDITOR.dom.element}
1523
+ function getStyleableElement( widget ) {
1524
+ return widget.data.hasCaption ? widget.element : widget.parts.image;
1525
+ }
1526
+ } )();
1527
+
1528
+ /**
1529
+ * A CSS class applied to the `<figure>` element of a captioned image.
1530
+ *
1531
+ * // Changes the class to "captionedImage".
1532
+ * CKEDITOR.config.image2_captionedClass = 'captionedImage';
1533
+ *
1534
+ * @cfg {String} [image2_captionedClass='image']
1535
+ * @member CKEDITOR.config
1536
+ */
1537
+ CKEDITOR.config.image2_captionedClass = 'image';
1538
+
1539
+ /**
1540
+ * CSS classes applied to aligned images. Useful to take control over the way
1541
+ * the images are aligned, i.e. to customize output HTML and integrate external stylesheets.
1542
+ *
1543
+ * Classes should be defined in an array of three elements, containing left, center, and right
1544
+ * alignment classes, respectively. For example:
1545
+ *
1546
+ * config.image2_alignClasses = [ 'align-left', 'align-center', 'align-right' ];
1547
+ *
1548
+ * **Note**: Once this configuration option is set, the plugin will no longer produce inline
1549
+ * styles for alignment. It means that e.g. the following HTML will be produced:
1550
+ *
1551
+ * <img alt="My image" class="custom-center-class" src="foo.png" />
1552
+ *
1553
+ * instead of:
1554
+ *
1555
+ * <img alt="My image" style="float:left" src="foo.png" />
1556
+ *
1557
+ * **Note**: Once this configuration option is set, corresponding style definitions
1558
+ * must be supplied to the editor:
1559
+ *
1560
+ * * For [classic editor](#!/guide/dev_framed) it can be done by defining additional
1561
+ * styles in the {@link CKEDITOR.config#contentsCss stylesheets loaded by the editor}. The same
1562
+ * styles must be provided on the target page where the content will be loaded.
1563
+ * * For [inline editor](#!/guide/dev_inline) the styles can be defined directly
1564
+ * with `<style> ... <style>` or `<link href="..." rel="stylesheet">`, i.e. within the `<head>`
1565
+ * of the page.
1566
+ *
1567
+ * For example, considering the following configuration:
1568
+ *
1569
+ * config.image2_alignClasses = [ 'align-left', 'align-center', 'align-right' ];
1570
+ *
1571
+ * CSS rules can be defined as follows:
1572
+ *
1573
+ * .align-left {
1574
+ * float: left;
1575
+ * }
1576
+ *
1577
+ * .align-right {
1578
+ * float: right;
1579
+ * }
1580
+ *
1581
+ * .align-center {
1582
+ * text-align: center;
1583
+ * }
1584
+ *
1585
+ * .align-center > figure {
1586
+ * display: inline-block;
1587
+ * }
1588
+ *
1589
+ * @since 4.4
1590
+ * @cfg {String[]} [image2_alignClasses=null]
1591
+ * @member CKEDITOR.config
1592
+ */