activeadmin_trumbowyg 0.1.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE.txt +1 -1
  3. data/README.md +9 -3
  4. data/Rakefile +2 -2
  5. data/app/assets/fonts/trumbowyg/icons.svg +1 -0
  6. data/app/assets/javascripts/activeadmin/trumbowyg/langs/ar.js +67 -0
  7. data/app/assets/javascripts/activeadmin/trumbowyg/langs/bg.js +54 -0
  8. data/app/assets/javascripts/activeadmin/trumbowyg/langs/by.js +61 -0
  9. data/app/assets/javascripts/activeadmin/trumbowyg/langs/ca.js +57 -0
  10. data/app/assets/javascripts/activeadmin/trumbowyg/langs/cs.js +54 -0
  11. data/app/assets/javascripts/activeadmin/trumbowyg/langs/da.js +64 -0
  12. data/app/assets/javascripts/activeadmin/trumbowyg/langs/da.min.js +1 -1
  13. data/app/assets/javascripts/activeadmin/trumbowyg/langs/de.js +57 -0
  14. data/app/assets/javascripts/activeadmin/trumbowyg/langs/de.min.js +1 -1
  15. data/app/assets/javascripts/activeadmin/trumbowyg/langs/el.js +59 -0
  16. data/app/assets/javascripts/activeadmin/trumbowyg/langs/es.js +63 -0
  17. data/app/assets/javascripts/activeadmin/trumbowyg/langs/es_ar.js +56 -0
  18. data/app/assets/javascripts/activeadmin/trumbowyg/langs/fa.js +58 -0
  19. data/app/assets/javascripts/activeadmin/trumbowyg/langs/fa.min.js +1 -1
  20. data/app/assets/javascripts/activeadmin/trumbowyg/langs/fi.js +58 -0
  21. data/app/assets/javascripts/activeadmin/trumbowyg/langs/fr.js +66 -0
  22. data/app/assets/javascripts/activeadmin/trumbowyg/langs/fr.min.js +3 -1
  23. data/app/assets/javascripts/activeadmin/trumbowyg/langs/he.js +57 -0
  24. data/app/assets/javascripts/activeadmin/trumbowyg/langs/hr.js +54 -0
  25. data/app/assets/javascripts/activeadmin/trumbowyg/langs/hu.js +58 -0
  26. data/app/assets/javascripts/activeadmin/trumbowyg/langs/id.js +57 -0
  27. data/app/assets/javascripts/activeadmin/trumbowyg/langs/it.js +59 -0
  28. data/app/assets/javascripts/activeadmin/trumbowyg/langs/ja.js +63 -0
  29. data/app/assets/javascripts/activeadmin/trumbowyg/langs/ko.js +63 -0
  30. data/app/assets/javascripts/activeadmin/trumbowyg/langs/ko.min.js +3 -4
  31. data/app/assets/javascripts/activeadmin/trumbowyg/langs/lt.js +59 -0
  32. data/app/assets/javascripts/activeadmin/trumbowyg/langs/lt.min.js +8 -0
  33. data/app/assets/javascripts/activeadmin/trumbowyg/langs/mn.js +49 -0
  34. data/app/assets/javascripts/activeadmin/trumbowyg/langs/my.js +54 -0
  35. data/app/assets/javascripts/activeadmin/trumbowyg/langs/nl.js +61 -0
  36. data/app/assets/javascripts/activeadmin/trumbowyg/langs/nl.min.js +1 -1
  37. data/app/assets/javascripts/activeadmin/trumbowyg/langs/no_nb.js +56 -0
  38. data/app/assets/javascripts/activeadmin/trumbowyg/langs/ph.js +54 -0
  39. data/app/assets/javascripts/activeadmin/trumbowyg/langs/pl.js +55 -0
  40. data/app/assets/javascripts/activeadmin/trumbowyg/langs/pt.js +65 -0
  41. data/app/assets/javascripts/activeadmin/trumbowyg/langs/pt_br.js +65 -0
  42. data/app/assets/javascripts/activeadmin/trumbowyg/langs/pt_br.min.js +1 -1
  43. data/app/assets/javascripts/activeadmin/trumbowyg/langs/ro.js +58 -0
  44. data/app/assets/javascripts/activeadmin/trumbowyg/langs/rs.js +53 -0
  45. data/app/assets/javascripts/activeadmin/trumbowyg/langs/rs_latin.js +54 -0
  46. data/app/assets/javascripts/activeadmin/trumbowyg/langs/ru.js +61 -0
  47. data/app/assets/javascripts/activeadmin/trumbowyg/langs/ru.min.js +1 -1
  48. data/app/assets/javascripts/activeadmin/trumbowyg/langs/sk.js +54 -0
  49. data/app/assets/javascripts/activeadmin/trumbowyg/langs/sl.js +48 -0
  50. data/app/assets/javascripts/activeadmin/trumbowyg/langs/sl.min.js +1 -0
  51. data/app/assets/javascripts/activeadmin/trumbowyg/langs/sq.js +65 -0
  52. data/app/assets/javascripts/activeadmin/trumbowyg/langs/sq.min.js +8 -0
  53. data/app/assets/javascripts/activeadmin/trumbowyg/langs/sv.js +58 -0
  54. data/app/assets/javascripts/activeadmin/trumbowyg/langs/th.js +55 -0
  55. data/app/assets/javascripts/activeadmin/trumbowyg/langs/th.min.js +9 -0
  56. data/app/assets/javascripts/activeadmin/trumbowyg/langs/tr.js +55 -0
  57. data/app/assets/javascripts/activeadmin/trumbowyg/langs/ua.js +54 -0
  58. data/app/assets/javascripts/activeadmin/trumbowyg/langs/vi.js +56 -0
  59. data/app/assets/javascripts/activeadmin/trumbowyg/langs/vi.min.js +1 -1
  60. data/app/assets/javascripts/activeadmin/trumbowyg/langs/zh_cn.js +57 -0
  61. data/app/assets/javascripts/activeadmin/trumbowyg/langs/zh_tw.js +66 -0
  62. data/app/assets/javascripts/activeadmin/trumbowyg/langs/zh_tw.min.js +1 -1
  63. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/allowtagsfrompaste/trumbowyg.allowtagsfrompaste.js +162 -0
  64. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/allowtagsfrompaste/trumbowyg.allowtagsfrompaste.min.js +1 -0
  65. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/base64/trumbowyg.base64.js +34 -2
  66. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/base64/trumbowyg.base64.min.js +1 -1
  67. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/cleanpaste/trumbowyg.cleanpaste.js +29 -97
  68. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/cleanpaste/trumbowyg.cleanpaste.min.js +1 -1
  69. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/trumbowyg.colors.js +109 -35
  70. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/trumbowyg.colors.min.js +1 -1
  71. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/sass/trumbowyg.colors.scss +30 -11
  72. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.css +27 -15
  73. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.min.css +2 -2
  74. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/trumbowyg.emoji.js +1265 -877
  75. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/trumbowyg.emoji.min.js +1 -1
  76. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/sass/trumbowyg.emoji.scss +1 -4
  77. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.css +2 -5
  78. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.min.css +2 -2
  79. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontfamily/trumbowyg.fontfamily.js +95 -0
  80. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontfamily/trumbowyg.fontfamily.min.js +1 -0
  81. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontsize/trumbowyg.fontsize.js +257 -0
  82. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontsize/trumbowyg.fontsize.min.js +1 -0
  83. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/trumbowyg.giphy.js +182 -0
  84. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/trumbowyg.giphy.min.js +1 -0
  85. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/sass/trumbowyg.giphy.scss +111 -0
  86. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/trumbowyg.giphy.css +90 -0
  87. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/trumbowyg.giphy.min.css +2 -0
  88. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.js +90 -0
  89. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.min.js +1 -0
  90. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/sass/trumbowyg.highlight.scss +25 -0
  91. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.css +20 -0
  92. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.min.css +2 -0
  93. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/history/trumbowyg.history.js +216 -0
  94. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/history/trumbowyg.history.min.js +1 -0
  95. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.js +19 -2
  96. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.min.js +1 -1
  97. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.js +162 -0
  98. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.min.js +1 -0
  99. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.js +117 -0
  100. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.min.js +1 -0
  101. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/sass/trumbowyg.mathml.scss +36 -0
  102. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.css +29 -0
  103. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.min.css +2 -0
  104. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/trumbowyg.mention.js +116 -0
  105. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/trumbowyg.mention.min.js +1 -0
  106. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/sass/trumbowyg.mention.scss +29 -0
  107. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/trumbowyg.mention.css +24 -0
  108. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/trumbowyg.mention.min.css +2 -0
  109. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/noembed/trumbowyg.noembed.js +21 -1
  110. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/noembed/trumbowyg.noembed.min.js +1 -1
  111. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteembed/trumbowyg.pasteembed.js +96 -0
  112. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteembed/trumbowyg.pasteembed.min.js +1 -0
  113. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.js +10 -2
  114. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.min.js +1 -1
  115. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/preformatted/trumbowyg.preformatted.js +22 -3
  116. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/preformatted/trumbowyg.preformatted.min.js +1 -1
  117. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/resizable-resolveconflict.js +20 -0
  118. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/resizable-resolveconflict.min.js +1 -0
  119. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/trumbowyg.resizimg.js +303 -0
  120. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/trumbowyg.resizimg.min.js +1 -0
  121. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/ruby/trumbowyg.ruby.js +94 -0
  122. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/ruby/trumbowyg.ruby.min.js +1 -0
  123. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/trumbowyg.specialchars.js +79 -0
  124. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/trumbowyg.specialchars.min.js +1 -0
  125. data/app/assets/{stylesheets/activeadmin/trumbowyg/plugins/emoji/ui/sass/trumbowyg.emoji.scss → javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/sass/trumbowyg.specialchars.scss} +11 -11
  126. data/app/assets/{stylesheets/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.css → javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/trumbowyg.specialchars.css} +12 -12
  127. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/trumbowyg.specialchars.min.css +2 -0
  128. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/trumbowyg.table.js +346 -81
  129. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/trumbowyg.table.min.js +1 -1
  130. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/sass/trumbowyg.table.scss +46 -0
  131. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/trumbowyg.table.css +36 -0
  132. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/trumbowyg.table.min.css +2 -0
  133. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/template/trumbowyg.template.js +32 -9
  134. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/template/trumbowyg.template.min.js +1 -1
  135. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/upload/trumbowyg.upload.js +58 -23
  136. data/app/assets/javascripts/activeadmin/trumbowyg/plugins/upload/trumbowyg.upload.min.js +1 -1
  137. data/app/assets/javascripts/activeadmin/trumbowyg/trumbowyg.js +427 -188
  138. data/app/assets/javascripts/activeadmin/trumbowyg/trumbowyg.min.js +2 -2
  139. data/app/assets/javascripts/activeadmin/trumbowyg_input.js +17 -6
  140. data/app/assets/stylesheets/activeadmin/_trumbowyg_input.scss +67 -0
  141. data/app/assets/stylesheets/activeadmin/trumbowyg/{ui/sass/trumbowyg.scss → trumbowyg.scss} +44 -16
  142. data/lib/activeadmin/trumbowyg.rb +2 -0
  143. data/lib/activeadmin/trumbowyg/engine.rb +2 -0
  144. data/lib/activeadmin/trumbowyg/version.rb +3 -1
  145. data/lib/activeadmin_trumbowyg.rb +2 -1
  146. data/lib/formtastic/inputs/trumbowyg_input.rb +3 -2
  147. data/lib/tasks/trumbowyg.rake +4 -2
  148. metadata +230 -92
  149. data/.gitignore +0 -3
  150. data/Gemfile +0 -4
  151. data/activeadmin_trumbowyg.gemspec +0 -19
  152. data/app/assets/fonts/active_admin-trumbowyg.svg +0 -1
  153. data/app/assets/javascripts/activeadmin/trumbowyg/ui/icons.svg +0 -1
  154. data/app/assets/javascripts/activeadmin/trumbowyg/ui/sass/trumbowyg.scss +0 -796
  155. data/app/assets/javascripts/activeadmin/trumbowyg/ui/trumbowyg.css +0 -584
  156. data/app/assets/javascripts/activeadmin/trumbowyg/ui/trumbowyg.min.css +0 -2
  157. data/app/assets/stylesheets/activeadmin/_trumbowyg_input.sass +0 -54
  158. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/ar.min.js +0 -11
  159. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/bg.min.js +0 -8
  160. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/by.min.js +0 -8
  161. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/ca.min.js +0 -11
  162. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/cs.min.js +0 -8
  163. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/da.min.js +0 -9
  164. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/de.min.js +0 -9
  165. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/el.min.js +0 -12
  166. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/es.min.js +0 -9
  167. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/es_ar.min.js +0 -10
  168. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/fa.min.js +0 -10
  169. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/fi.min.js +0 -9
  170. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/fr.min.js +0 -10
  171. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/he.min.js +0 -9
  172. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/hr.min.js +0 -9
  173. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/hu.min.js +0 -10
  174. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/id.min.js +0 -11
  175. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/it.min.js +0 -8
  176. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/ja.min.js +0 -10
  177. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/ko.min.js +0 -10
  178. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/mn.min.js +0 -8
  179. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/my.min.js +0 -8
  180. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/nl.min.js +0 -9
  181. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/no_nb.min.js +0 -10
  182. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/ph.min.js +0 -8
  183. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/pl.min.js +0 -9
  184. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/pt.min.js +0 -11
  185. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/pt_br.min.js +0 -11
  186. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/ro.min.js +0 -12
  187. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/rs.min.js +0 -8
  188. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/rs_latin.min.js +0 -9
  189. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/ru.min.js +0 -8
  190. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/sk.min.js +0 -8
  191. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/sv.min.js +0 -12
  192. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/tr.min.js +0 -9
  193. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/ua.min.js +0 -8
  194. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/vi.min.js +0 -9
  195. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/zh_cn.min.js +0 -11
  196. data/app/assets/stylesheets/activeadmin/trumbowyg/langs/zh_tw.min.js +0 -11
  197. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/base64/trumbowyg.base64.js +0 -121
  198. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/base64/trumbowyg.base64.min.js +0 -1
  199. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/cleanpaste/trumbowyg.cleanpaste.js +0 -179
  200. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/cleanpaste/trumbowyg.cleanpaste.min.js +0 -1
  201. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/colors/trumbowyg.colors.js +0 -176
  202. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/colors/trumbowyg.colors.min.js +0 -1
  203. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/colors/ui/sass/trumbowyg.colors.scss +0 -49
  204. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.css +0 -43
  205. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.min.css +0 -2
  206. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/emoji/trumbowyg.emoji.js +0 -965
  207. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/emoji/trumbowyg.emoji.min.js +0 -1
  208. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.min.css +0 -2
  209. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.js +0 -83
  210. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.min.js +0 -1
  211. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/noembed/trumbowyg.noembed.js +0 -101
  212. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/noembed/trumbowyg.noembed.min.js +0 -1
  213. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.js +0 -41
  214. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.min.js +0 -1
  215. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/preformatted/trumbowyg.preformatted.js +0 -123
  216. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/preformatted/trumbowyg.preformatted.min.js +0 -1
  217. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/table/trumbowyg.table.js +0 -154
  218. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/table/trumbowyg.table.min.js +0 -1
  219. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/template/trumbowyg.template.js +0 -58
  220. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/template/trumbowyg.template.min.js +0 -1
  221. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/upload/trumbowyg.upload.js +0 -242
  222. data/app/assets/stylesheets/activeadmin/trumbowyg/plugins/upload/trumbowyg.upload.min.js +0 -1
  223. data/app/assets/stylesheets/activeadmin/trumbowyg/trumbowyg.js +0 -1688
  224. data/app/assets/stylesheets/activeadmin/trumbowyg/trumbowyg.min.js +0 -2
  225. data/app/assets/stylesheets/activeadmin/trumbowyg/ui/icons.svg +0 -1
  226. data/app/assets/stylesheets/activeadmin/trumbowyg/ui/trumbowyg.css +0 -584
  227. data/app/assets/stylesheets/activeadmin/trumbowyg/ui/trumbowyg.min.css +0 -2
  228. data/screenshot.jpg +0 -0
@@ -0,0 +1 @@
1
+ !function(o){"use strict";o.extend(!0,o.trumbowyg,{langs:{de:{history:{redo:"Wiederholen",undo:"Rückgängig"}},en:{history:{redo:"Redo",undo:"Undo"}},da:{history:{redo:"Annuller fortryd",undo:"Fortryd"}},fr:{history:{redo:"Annuler",undo:"Rétablir"}},zh_tw:{history:{redo:"重做",undo:"復原"}},pt_br:{history:{redo:"Refazer",undo:"Desfazer"}},ko:{history:{redo:"다시 실행",undo:"되돌리기"}}},plugins:{history:{init:function(i){i.o.plugins.history=o.extend(!0,{_stack:[],_index:-1,_focusEl:void 0},i.o.plugins.history||{});var t={title:i.lang.history.redo,ico:"redo",key:"Y",fn:function(){if(i.o.plugins.history._index<i.o.plugins.history._stack.length-1){i.o.plugins.history._index+=1;var o=i.o.plugins.history._index,t=i.o.plugins.history._stack[o];i.execCmd("html",t),i.o.plugins.history._stack[o]=i.$ed.html(),l(),s()}}},n={title:i.lang.history.undo,ico:"undo",key:"Z",fn:function(){if(i.o.plugins.history._index>0){i.o.plugins.history._index-=1;var o=i.o.plugins.history._index,t=i.o.plugins.history._stack[o];i.execCmd("html",t),i.o.plugins.history._stack[o]=i.$ed.html(),l(),s()}}},e=function(){var t,n,e=i.o.plugins.history._index,r=i.o.plugins.history._stack,l=r.slice(-1)[0]||"<p></p>",u=r[e],h=i.$ed.html(),c=i.doc.getSelection().focusNode,g="",a=i.o.plugins.history._focusEl;t=o("<div>"+l+"</div>").find("*").map(function(){return this.localName}),n=o("<div>"+h+"</div>").find("*").map(function(){return this.localName}),c&&(i.o.plugins.history._focusEl=c,g=c.outerHTML||c.textContent),h!==u&&(g.slice(-1).match(/\s/)||!d(t,n)||i.o.plugins.history._index<=0||c!==a?(i.o.plugins.history._index+=1,i.o.plugins.history._stack=r.slice(0,i.o.plugins.history._index),i.o.plugins.history._stack.push(h)):i.o.plugins.history._stack[e]=h,s())},s=function(){var o=i.o.plugins.history._index,t=i.o.plugins.history._stack.length,n=o>0,e=0!==t&&o!==t-1;r("historyUndo",n),r("historyRedo",e)},r=function(o,t){var n=i.$box.find(".trumbowyg-"+o+"-button");t?n.removeClass("trumbowyg-disable"):n.hasClass("trumbowyg-disable")||n.addClass("trumbowyg-disable")},d=function(o,i){if(o===i)return!0;if(null==o||null==i)return!1;if(o.length!==i.length)return!1;for(var t=0;t<o.length;t+=1)if(o[t]!==i[t])return!1;return!0},l=function(){var o=i.doc.getSelection().focusNode,t=i.doc.createRange();o.childNodes.length>0&&(t.setStartAfter(o.childNodes[o.childNodes.length-1]),t.setEndAfter(o.childNodes[o.childNodes.length-1]),i.doc.getSelection().removeAllRanges(),i.doc.getSelection().addRange(t))};i.$c.on("tbwinit tbwchange",e),i.addBtnDef("historyRedo",t),i.addBtnDef("historyUndo",n)}}}})}(jQuery);
@@ -33,15 +33,32 @@
33
33
 
34
34
  $.extend(true, $.trumbowyg, {
35
35
  langs: {
36
+ // jshint camelcase:false
36
37
  en: {
37
38
  insertAudio: 'Insert Audio'
38
39
  },
40
+ da: {
41
+ insertAudio: 'Indsæt lyd'
42
+ },
43
+ fr: {
44
+ insertAudio: 'Insérer un son'
45
+ },
39
46
  ru: {
40
47
  insertAudio: 'Вставить аудио'
41
48
  },
42
49
  ja: {
43
50
  insertAudio: '音声の挿入'
44
- }
51
+ },
52
+ tr: {
53
+ insertAudio: 'Ses Ekle'
54
+ },
55
+ pt_br: {
56
+ insertAudio: 'Inserir áudio'
57
+ },
58
+ ko: {
59
+ insertAudio: '소리 넣기'
60
+ },
61
+ // jshint camelcase:true
45
62
  },
46
63
  plugins: {
47
64
  insertAudio: {
@@ -80,4 +97,4 @@
80
97
  }
81
98
  }
82
99
  });
83
- })(jQuery);
100
+ })(jQuery);
@@ -1 +1 @@
1
- !function(e){"use strict";var r={src:{label:"URL",required:!0},autoplay:{label:"AutoPlay",required:!1,type:"checkbox"},muted:{label:"Muted",required:!1,type:"checkbox"},preload:{label:"preload options",required:!1}};e.extend(!0,e.trumbowyg,{langs:{en:{insertAudio:"Insert Audio"},ru:{insertAudio:"Вставить аудио"},ja:{insertAudio:"音声の挿入"}},plugins:{insertAudio:{init:function(t){var n={fn:function(){var n=function(r){var n="<audio controls";r.src&&(n+=" src='"+r.src+"'"),r.autoplay&&(n+=" autoplay"),r.muted&&(n+=" muted"),r.preload&&(n+=" preload='"+r+"'"),n+="></audio>";var o=e(n)[0];return t.range.deleteContents(),t.range.insertNode(o),!0};t.openModalInsert(t.lang.insertAudio,r,n)}};t.addBtnDef("insertAudio",n)}}}})}(jQuery);
1
+ !function(e){"use strict";var r={src:{label:"URL",required:!0},autoplay:{label:"AutoPlay",required:!1,type:"checkbox"},muted:{label:"Muted",required:!1,type:"checkbox"},preload:{label:"preload options",required:!1}};e.extend(!0,e.trumbowyg,{langs:{en:{insertAudio:"Insert Audio"},da:{insertAudio:"Indsæt lyd"},fr:{insertAudio:"Insérer un son"},ru:{insertAudio:"Вставить аудио"},ja:{insertAudio:"音声の挿入"},tr:{insertAudio:"Ses Ekle"},pt_br:{insertAudio:"Inserir áudio"},ko:{insertAudio:"소리 넣기"}},plugins:{insertAudio:{init:function(n){var t={fn:function(){var t=function(r){var t="<audio controls";r.src&&(t+=" src='"+r.src+"'"),r.autoplay&&(t+=" autoplay"),r.muted&&(t+=" muted"),r.preload&&(t+=" preload='"+r+"'"),t+="></audio>";var i=e(t)[0];return n.range.deleteContents(),n.range.insertNode(i),!0};n.openModalInsert(n.lang.insertAudio,r,t)}};n.addBtnDef("insertAudio",t)}}}})}(jQuery);
@@ -0,0 +1,162 @@
1
+ (function ($) {
2
+ 'use strict';
3
+
4
+ $.extend(true, $.trumbowyg, {
5
+ langs: {
6
+ // jshint camelcase:false
7
+ en: {
8
+ lineheight: 'Line height',
9
+ lineheights: {
10
+ '0.9': 'Small',
11
+ 'normal': 'Regular',
12
+ '1.5': 'Large',
13
+ '2.0': 'Extra large'
14
+ }
15
+ },
16
+ da: {
17
+ lineheight: 'Linjehøjde',
18
+ lineheights: {
19
+ '0.9': 'Lille',
20
+ 'normal': 'Normal',
21
+ '1.5': 'Stor',
22
+ '2.0': 'Ekstra stor'
23
+ }
24
+ },
25
+ fr: {
26
+ lineheight: 'Hauteur de ligne',
27
+ lineheights: {
28
+ '0.9': 'Petite',
29
+ 'normal': 'Normale',
30
+ '1.5': 'Grande',
31
+ '2.0': 'Très grande'
32
+ }
33
+ },
34
+ nl: {
35
+ lineheight: 'Regelhoogte',
36
+ lineheights: {
37
+ '0.9': 'Klein',
38
+ 'normal': 'Normaal',
39
+ '1.5': 'Groot',
40
+ '2.0': 'Extra groot'
41
+ }
42
+ },
43
+ tr: {
44
+ lineheight: 'Satır yüksekliği',
45
+ lineheights: {
46
+ '0.9': 'Küçük',
47
+ 'normal': 'Normal',
48
+ '1.5': 'Büyük',
49
+ '2.0': 'Çok Büyük'
50
+ }
51
+ },
52
+ zh_tw: {
53
+ lineheight: '文字間距',
54
+ lineheights: {
55
+ '0.9': '小',
56
+ 'normal': '正常',
57
+ '1.5': '大',
58
+ '2.0': '特大'
59
+ }
60
+ },
61
+ pt_br: {
62
+ lineheight: 'Altura de linha',
63
+ lineheights: {
64
+ '0.9': 'Pequena',
65
+ 'normal': 'Regular',
66
+ '1.5': 'Grande',
67
+ '2.0': 'Extra grande'
68
+ }
69
+ },
70
+ it: {
71
+ lineheight: 'Altezza linea',
72
+ lineheights: {
73
+ '0.9': 'Bassa',
74
+ 'normal': 'Normale',
75
+ '1.5': 'Alta',
76
+ '2.0': 'Molto alta'
77
+ }
78
+ },
79
+ ko: {
80
+ lineheight: '줄 간격',
81
+ lineheights: {
82
+ '0.9': '좁게',
83
+ 'normal': '보통',
84
+ '1.5': '넓게',
85
+ '2.0': '아주 넓게'
86
+ }
87
+ },
88
+ }
89
+ });
90
+ // jshint camelcase:true
91
+
92
+ var defaultOptions = {
93
+ sizeList: [
94
+ '0.9',
95
+ 'normal',
96
+ '1.5',
97
+ '2.0'
98
+ ]
99
+ };
100
+
101
+ // Add dropdown with font sizes
102
+ $.extend(true, $.trumbowyg, {
103
+ plugins: {
104
+ lineheight: {
105
+ init: function (trumbowyg) {
106
+ trumbowyg.o.plugins.lineheight = $.extend({},
107
+ defaultOptions,
108
+ trumbowyg.o.plugins.lineheight || {}
109
+ );
110
+
111
+ trumbowyg.addBtnDef('lineheight', {
112
+ dropdown: buildDropdown(trumbowyg)
113
+ });
114
+ }
115
+ }
116
+ }
117
+ });
118
+
119
+ // Build the dropdown
120
+ function buildDropdown(trumbowyg) {
121
+ var dropdown = [];
122
+
123
+ $.each(trumbowyg.o.plugins.lineheight.sizeList, function(index, size) {
124
+ trumbowyg.addBtnDef('lineheight_' + size, {
125
+ text: trumbowyg.lang.lineheights[size] || size,
126
+ hasIcon: false,
127
+ fn: function(){
128
+ trumbowyg.saveRange();
129
+ var text = trumbowyg.getRangeText();
130
+ if (text.replace(/\s/g, '') !== '') {
131
+ try {
132
+ var parent = getSelectionParentElement();
133
+ $(parent).css('lineHeight', size);
134
+ } catch (e) {
135
+ }
136
+ }
137
+ }
138
+ });
139
+ dropdown.push('lineheight_' + size);
140
+ });
141
+
142
+ return dropdown;
143
+ }
144
+
145
+ // Get the selection's parent
146
+ function getSelectionParentElement() {
147
+ var parentEl = null,
148
+ selection;
149
+ if (window.getSelection) {
150
+ selection = window.getSelection();
151
+ if (selection.rangeCount) {
152
+ parentEl = selection.getRangeAt(0).commonAncestorContainer;
153
+ if (parentEl.nodeType !== 1) {
154
+ parentEl = parentEl.parentNode;
155
+ }
156
+ }
157
+ } else if ((selection = document.selection) && selection.type !== 'Control') {
158
+ parentEl = selection.createRange().parentElement();
159
+ }
160
+ return parentEl;
161
+ }
162
+ })(jQuery);
@@ -0,0 +1 @@
1
+ !function(e){"use strict";function n(n){var i=[];return e.each(n.o.plugins.lineheight.sizeList,function(l,a){n.addBtnDef("lineheight_"+a,{text:n.lang.lineheights[a]||a,hasIcon:!1,fn:function(){n.saveRange();var i=n.getRangeText();if(""!==i.replace(/\s/g,""))try{var l=t();e(l).css("lineHeight",a)}catch(h){}}}),i.push("lineheight_"+a)}),i}function t(){var e,n=null;return window.getSelection?(e=window.getSelection(),e.rangeCount&&(n=e.getRangeAt(0).commonAncestorContainer,1!==n.nodeType&&(n=n.parentNode))):(e=document.selection)&&"Control"!==e.type&&(n=e.createRange().parentElement()),n}e.extend(!0,e.trumbowyg,{langs:{en:{lineheight:"Line height",lineheights:{.9:"Small",normal:"Regular",1.5:"Large","2.0":"Extra large"}},da:{lineheight:"Linjehøjde",lineheights:{.9:"Lille",normal:"Normal",1.5:"Stor","2.0":"Ekstra stor"}},fr:{lineheight:"Hauteur de ligne",lineheights:{.9:"Petite",normal:"Normale",1.5:"Grande","2.0":"Très grande"}},nl:{lineheight:"Regelhoogte",lineheights:{.9:"Klein",normal:"Normaal",1.5:"Groot","2.0":"Extra groot"}},tr:{lineheight:"Satır yüksekliği",lineheights:{.9:"Küçük",normal:"Normal",1.5:"Büyük","2.0":"Çok Büyük"}},zh_tw:{lineheight:"文字間距",lineheights:{.9:"小",normal:"正常",1.5:"大","2.0":"特大"}},pt_br:{lineheight:"Altura de linha",lineheights:{.9:"Pequena",normal:"Regular",1.5:"Grande","2.0":"Extra grande"}},it:{lineheight:"Altezza linea",lineheights:{.9:"Bassa",normal:"Normale",1.5:"Alta","2.0":"Molto alta"}},ko:{lineheight:"줄 간격",lineheights:{.9:"좁게",normal:"보통",1.5:"넓게","2.0":"아주 넓게"}}}});var i={sizeList:["0.9","normal","1.5","2.0"]};e.extend(!0,e.trumbowyg,{plugins:{lineheight:{init:function(t){t.o.plugins.lineheight=e.extend({},i,t.o.plugins.lineheight||{}),t.addBtnDef("lineheight",{dropdown:n(t)})}}}})}(jQuery);
@@ -0,0 +1,117 @@
1
+ /* ===========================================================
2
+ * trumbowyg.mathMl.js v1.0
3
+ * MathML plugin for Trumbowyg
4
+ * http://alex-d.github.com/Trumbowyg
5
+ * ===========================================================
6
+ * Author : loclamor
7
+ */
8
+
9
+ /* globals MathJax */
10
+ (function($) {
11
+ 'use strict';
12
+ $.extend(true, $.trumbowyg, {
13
+ langs: {
14
+ // jshint camelcase:false
15
+ en: {
16
+ mathml: 'Insert Formulas',
17
+ formulas: 'Formulas',
18
+ inline: 'Inline'
19
+ },
20
+ da: {
21
+ mathml: 'Indsæt formler',
22
+ formulas: 'Formler',
23
+ inline: 'Inline'
24
+ },
25
+ fr: {
26
+ mathml: 'Inserer une formule',
27
+ formulas: 'Formule',
28
+ inline: 'En ligne'
29
+ },
30
+ tr: {
31
+ mathml: 'Formül Ekle',
32
+ formulas: 'Formüller',
33
+ inline: 'Satır içi'
34
+ },
35
+ zh_tw: {
36
+ mathml: '插入方程式',
37
+ formulas: '方程式',
38
+ inline: '內嵌'
39
+ },
40
+ pt_br: {
41
+ mathml: 'Inserir fórmulas',
42
+ formulas: 'Fórmulas',
43
+ inline: 'Em linha'
44
+ },
45
+ ko: {
46
+ mathml: '수식 넣기',
47
+ formulas: '수식',
48
+ inline: '글 안에 넣기'
49
+ },
50
+ },
51
+ // jshint camelcase:true
52
+
53
+ plugins: {
54
+ mathml: {
55
+ init: function(trumbowyg) {
56
+ var btnDef = {
57
+ fn: function() {
58
+ trumbowyg.saveRange();
59
+ var mathMLoptions = {
60
+ formulas: {
61
+ label: trumbowyg.lang.formulas,
62
+ required: true,
63
+ value: ''
64
+ },
65
+ inline: {
66
+ label: trumbowyg.lang.inline,
67
+ attributes: {
68
+ checked: true
69
+ },
70
+ type: 'checkbox',
71
+ required: false,
72
+ }
73
+ };
74
+
75
+ var mathmlCallback = function(v) {
76
+ var delimiter = v.inline ? '$' : '$$';
77
+ if (trumbowyg.currentMathNode) {
78
+ $(trumbowyg.currentMathNode)
79
+ .html(delimiter + ' ' + v.formulas + ' ' + delimiter)
80
+ .attr('formulas', v.formulas)
81
+ .attr('inline', (v.inline ? 'true' : 'false'));
82
+ } else {
83
+ var html = '<span class="mathMlContainer" contenteditable="false" formulas="' + v.formulas + '" inline="' + (v.inline ? 'true' : 'false') + '" >' + delimiter + ' ' + v.formulas + ' ' + delimiter + '</span>';
84
+ var node = $(html)[0];
85
+ node.onclick = function() {
86
+ trumbowyg.currentMathNode = this;
87
+ mathMLoptions.formulas.value = $(this).attr('formulas');
88
+
89
+ if ($(this).attr('inline') === 'true') {
90
+ mathMLoptions.inline.attributes.checked = true;
91
+ } else {
92
+ delete mathMLoptions.inline.attributes.checked;
93
+ }
94
+
95
+ trumbowyg.openModalInsert(trumbowyg.lang.mathml, mathMLoptions, mathmlCallback);
96
+ };
97
+
98
+ trumbowyg.range.deleteContents();
99
+ trumbowyg.range.insertNode(node);
100
+ }
101
+
102
+ trumbowyg.currentMathNode = false;
103
+ MathJax.Hub.Queue(['Typeset', MathJax.Hub]);
104
+ return true;
105
+ };
106
+
107
+ mathMLoptions.formulas.value = trumbowyg.getRangeText();
108
+ mathMLoptions.inline.attributes.checked = true;
109
+ trumbowyg.openModalInsert(trumbowyg.lang.mathml, mathMLoptions, mathmlCallback);
110
+ }
111
+ };
112
+ trumbowyg.addBtnDef('mathml', btnDef);
113
+ }
114
+ }
115
+ }
116
+ });
117
+ })(jQuery);
@@ -0,0 +1 @@
1
+ !function(e){"use strict";e.extend(!0,e.trumbowyg,{langs:{en:{mathml:"Insert Formulas",formulas:"Formulas",inline:"Inline"},da:{mathml:"Indsæt formler",formulas:"Formler",inline:"Inline"},fr:{mathml:"Inserer une formule",formulas:"Formule",inline:"En ligne"},tr:{mathml:"Formül Ekle",formulas:"Formüller",inline:"Satır içi"},zh_tw:{mathml:"插入方程式",formulas:"方程式",inline:"內嵌"},pt_br:{mathml:"Inserir fórmulas",formulas:"Fórmulas",inline:"Em linha"},ko:{mathml:"수식 넣기",formulas:"수식",inline:"글 안에 넣기"}},plugins:{mathml:{init:function(n){var l={fn:function(){n.saveRange();var l={formulas:{label:n.lang.formulas,required:!0,value:""},inline:{label:n.lang.inline,attributes:{checked:!0},type:"checkbox",required:!1}},a=function(t){var r=t.inline?"$":"$$";if(n.currentMathNode)e(n.currentMathNode).html(r+" "+t.formulas+" "+r).attr("formulas",t.formulas).attr("inline",t.inline?"true":"false");else{var i='<span class="mathMlContainer" contenteditable="false" formulas="'+t.formulas+'" inline="'+(t.inline?"true":"false")+'" >'+r+" "+t.formulas+" "+r+"</span>",u=e(i)[0];u.onclick=function(){n.currentMathNode=this,l.formulas.value=e(this).attr("formulas"),"true"===e(this).attr("inline")?l.inline.attributes.checked=!0:delete l.inline.attributes.checked,n.openModalInsert(n.lang.mathml,l,a)},n.range.deleteContents(),n.range.insertNode(u)}return n.currentMathNode=!1,MathJax.Hub.Queue(["Typeset",MathJax.Hub]),!0};l.formulas.value=n.getRangeText(),l.inline.attributes.checked=!0,n.openModalInsert(n.lang.mathml,l,a)}};n.addBtnDef("mathml",l)}}}})}(jQuery);
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Trumbowyg v2.21.0 - A lightweight WYSIWYG editor
3
+ * Default stylesheet for Trumbowyg editor plugin
4
+ * ------------------------
5
+ * @link http://alex-d.github.io/Trumbowyg
6
+ * @license MIT
7
+ * @author Alexandre Demode (Alex-D)
8
+ * Twitter : @AlexandreDemode
9
+ * Website : alex-d.fr
10
+ */
11
+
12
+ .mathMlContainer {
13
+ position: relative;
14
+
15
+ &[inline="false"] {
16
+ display: block;
17
+ width: 100%;
18
+ }
19
+
20
+ &:hover {
21
+ pointer-events: none;
22
+
23
+ &::after {
24
+ content: '\270E';
25
+ position: absolute;
26
+ top: 0;
27
+ right: 0;
28
+ bottom: 0;
29
+ left: 0;
30
+ background-color: rgba(255, 255, 255, 0.83);
31
+ box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83);
32
+ cursor: pointer;
33
+ pointer-events: auto;
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Trumbowyg v2.21.0 - A lightweight WYSIWYG editor
3
+ * Trumbowyg plugin stylesheet
4
+ * ------------------------
5
+ * @link http://alex-d.github.io/Trumbowyg
6
+ * @license MIT
7
+ * @author Alexandre Demode (Alex-D)
8
+ * Twitter : @AlexandreDemode
9
+ * Website : alex-d.fr
10
+ */
11
+
12
+ .mathMlContainer {
13
+ position: relative; }
14
+ .mathMlContainer[inline="false"] {
15
+ display: block;
16
+ width: 100%; }
17
+ .mathMlContainer:hover {
18
+ pointer-events: none; }
19
+ .mathMlContainer:hover::after {
20
+ content: '\270E';
21
+ position: absolute;
22
+ top: 0;
23
+ right: 0;
24
+ bottom: 0;
25
+ left: 0;
26
+ background-color: rgba(255, 255, 255, 0.83);
27
+ box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83);
28
+ cursor: pointer;
29
+ pointer-events: auto; }
@@ -0,0 +1,2 @@
1
+ /** Trumbowyg v2.21.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2
+ .mathMlContainer{position:relative}.mathMlContainer[inline=false]{display:block;width:100%}.mathMlContainer:hover{pointer-events:none}.mathMlContainer:hover::after{content:'\270E';position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(255,255,255,.83);box-shadow:0 0 5px 5px rgba(255,255,255,.83);cursor:pointer;pointer-events:auto}
@@ -0,0 +1,116 @@
1
+ /* ===========================================================
2
+ * trumbowyg.mention.js v0.1
3
+ * Mention plugin for Trumbowyg
4
+ * http://alex-d.github.com/Trumbowyg
5
+ * ===========================================================
6
+ * Author : Viper
7
+ * Github: https://github.com/Globulopolis
8
+ * Website: http://киноархив.com
9
+ */
10
+
11
+ (function ($) {
12
+ 'use strict';
13
+
14
+ var defaultOptions = {
15
+ source: [],
16
+ formatDropdownItem: formatDropdownItem,
17
+ formatResult: formatResult
18
+ };
19
+
20
+ $.extend(true, $.trumbowyg, {
21
+ langs: {
22
+ // jshint camelcase:false
23
+ en: {
24
+ mention: 'Mention'
25
+ },
26
+ da: {
27
+ mention: 'Nævn'
28
+ },
29
+ fr: {
30
+ mention: 'Mentionner'
31
+ },
32
+ ru: {
33
+ mention: 'Упомянуть'
34
+ },
35
+ tr: {
36
+ mention: 'Bahset'
37
+ },
38
+ zh_tw: {
39
+ mention: '標記'
40
+ },
41
+ pt_br: {
42
+ mention: 'Menção'
43
+ },
44
+ ko: {
45
+ mention: '언급'
46
+ },
47
+ // jshint camelcase:true
48
+ },
49
+
50
+ plugins: {
51
+ mention: {
52
+ init: function (trumbowyg) {
53
+ trumbowyg.o.plugins.mention = $.extend(true, {}, defaultOptions, trumbowyg.o.plugins.mention || {});
54
+
55
+ var btnDef = {
56
+ dropdown: buildDropdown(trumbowyg.o.plugins.mention.source, trumbowyg)
57
+ };
58
+
59
+ trumbowyg.addBtnDef('mention', btnDef);
60
+ }
61
+ }
62
+ }
63
+ });
64
+
65
+ /**
66
+ * Build dropdown list
67
+ *
68
+ * @param {Array} items Items
69
+ * @param {object} trumbowyg Editor
70
+ *
71
+ * @return {Array}
72
+ */
73
+ function buildDropdown(items, trumbowyg) {
74
+ var dropdown = [];
75
+
76
+ $.each(items, function (i, item) {
77
+ var btn = 'mention-' + i,
78
+ btnDef = {
79
+ hasIcon: false,
80
+ text: trumbowyg.o.plugins.mention.formatDropdownItem(item),
81
+ fn: function () {
82
+ trumbowyg.execCmd('insertHTML', trumbowyg.o.plugins.mention.formatResult(item));
83
+
84
+ return true;
85
+ }
86
+ };
87
+
88
+ trumbowyg.addBtnDef(btn, btnDef);
89
+ dropdown.push(btn);
90
+ });
91
+
92
+ return dropdown;
93
+ }
94
+
95
+ /**
96
+ * Format item in dropdown.
97
+ *
98
+ * @param {object} item Item object.
99
+ *
100
+ * @return {string}
101
+ */
102
+ function formatDropdownItem(item) {
103
+ return item.login;
104
+ }
105
+
106
+ /**
107
+ * Format result pasted in editor.
108
+ *
109
+ * @param {object} item Item object.
110
+ *
111
+ * @return {string}
112
+ */
113
+ function formatResult(item) {
114
+ return '@' + item.login + ' ';
115
+ }
116
+ })(jQuery);