ueditor.rails 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (302) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +32 -0
  4. data/app/assets/javascripts/default.config.js +382 -0
  5. data/app/assets/javascripts/ueditor.js +2 -0
  6. data/lib/tasks/ueditor_on_rails_tasks.rake +4 -0
  7. data/lib/ueditor.rails.rb +17 -0
  8. data/lib/ueditor/engine.rb +23 -0
  9. data/lib/ueditor/helpers/form_builder.rb +11 -0
  10. data/lib/ueditor/helpers/form_helper.rb +13 -0
  11. data/lib/ueditor/helpers/js_helper.rb +13 -0
  12. data/lib/ueditor/helpers/view_helper.rb +13 -0
  13. data/lib/ueditor/hooks/simple_form.rb +16 -0
  14. data/lib/ueditor/version.rb +3 -0
  15. data/test/dummy/README.rdoc +28 -0
  16. data/test/dummy/Rakefile +6 -0
  17. data/test/dummy/app/assets/javascripts/application.js +14 -0
  18. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  19. data/test/dummy/app/controllers/application_controller.rb +5 -0
  20. data/test/dummy/app/controllers/dummy_controller.rb +18 -0
  21. data/test/dummy/app/helpers/application_helper.rb +2 -0
  22. data/test/dummy/app/models/dummy_model.rb +5 -0
  23. data/test/dummy/app/views/dummy/new.html.erb +22 -0
  24. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  25. data/test/dummy/bin/bundle +3 -0
  26. data/test/dummy/bin/rails +4 -0
  27. data/test/dummy/bin/rake +4 -0
  28. data/test/dummy/config.ru +4 -0
  29. data/test/dummy/config/application.rb +28 -0
  30. data/test/dummy/config/boot.rb +5 -0
  31. data/test/dummy/config/database.yml +25 -0
  32. data/test/dummy/config/environment.rb +5 -0
  33. data/test/dummy/config/environments/development.rb +34 -0
  34. data/test/dummy/config/environments/production.rb +80 -0
  35. data/test/dummy/config/environments/test.rb +39 -0
  36. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  37. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  38. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  39. data/test/dummy/config/initializers/inflections.rb +16 -0
  40. data/test/dummy/config/initializers/mime_types.rb +4 -0
  41. data/test/dummy/config/initializers/session_store.rb +3 -0
  42. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  43. data/test/dummy/config/locales/en.yml +23 -0
  44. data/test/dummy/config/routes.rb +4 -0
  45. data/test/dummy/config/secrets.yml +22 -0
  46. data/test/dummy/log/development.log +51 -0
  47. data/test/dummy/public/404.html +67 -0
  48. data/test/dummy/public/422.html +67 -0
  49. data/test/dummy/public/500.html +66 -0
  50. data/test/dummy/public/favicon.ico +0 -0
  51. data/test/dummy/tmp/cache/assets/development/sprockets/029530186b2a67ade6e57e578c85b454 +0 -0
  52. data/test/dummy/tmp/cache/assets/development/sprockets/02b56f18dcd4ddec585a02528773c04b +0 -0
  53. data/test/dummy/tmp/cache/assets/development/sprockets/07898ec696d976eeafb61ef6bb48e097 +0 -0
  54. data/test/dummy/tmp/cache/assets/development/sprockets/0ab8e71a1cbfab4ba97406936b8424d8 +0 -0
  55. data/test/dummy/tmp/cache/assets/development/sprockets/0d7c51218669ae27b1bb2d8ff9c9c1f9 +0 -0
  56. data/test/dummy/tmp/cache/assets/development/sprockets/0f941886593d207e4ec1f3aba81f3189 +0 -0
  57. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  58. data/test/dummy/tmp/cache/assets/development/sprockets/19694ecb6829b547affeb420f6c4f4ba +0 -0
  59. data/test/dummy/tmp/cache/assets/development/sprockets/24fd9e383d10c56ae5bf72ce4e8d57d5 +0 -0
  60. data/test/dummy/tmp/cache/assets/development/sprockets/2a3155304ce0d3a6b8245de3b211a442 +0 -0
  61. data/test/dummy/tmp/cache/assets/development/sprockets/2ef8e8b9d212c49500f1cbb6ab432078 +0 -0
  62. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  63. data/test/dummy/tmp/cache/assets/development/sprockets/2f6f08f80fb713b72a4c53eca782d352 +0 -0
  64. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  65. data/test/dummy/tmp/cache/assets/development/sprockets/46de6851f078c896ce0a451fe8e67691 +0 -0
  66. data/test/dummy/tmp/cache/assets/development/sprockets/4d359ff4c9c3e425adcf7471f456dd80 +0 -0
  67. data/test/dummy/tmp/cache/assets/development/sprockets/63be665b75f7410b31ece33884eb8eef +0 -0
  68. data/test/dummy/tmp/cache/assets/development/sprockets/7bd63ec22736e590f74f2614ba885123 +0 -0
  69. data/test/dummy/tmp/cache/assets/development/sprockets/8165d0bcd2b5c04b4a98f4f0cbabef64 +0 -0
  70. data/test/dummy/tmp/cache/assets/development/sprockets/8f07cc0565a08f28c45bc04f78ed9feb +0 -0
  71. data/test/dummy/tmp/cache/assets/development/sprockets/9239aabeb118940064b039f4afb8f328 +0 -0
  72. data/test/dummy/tmp/cache/assets/development/sprockets/92e3cf1ee6169034b72859923497867a +0 -0
  73. data/test/dummy/tmp/cache/assets/development/sprockets/98ba4a17ce612c2782d52cb7f2a2beb9 +0 -0
  74. data/test/dummy/tmp/cache/assets/development/sprockets/a38c0bac61b2d1e331de0057548aba0f +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sprockets/b0df046a48e07ba1cd75447c9732874b +0 -0
  76. data/test/dummy/tmp/cache/assets/development/sprockets/b7d95afb3c2e49e813b301d797917b8c +0 -0
  77. data/test/dummy/tmp/cache/assets/development/sprockets/bc3d8cda22ec9e1bf2cbe1f02cc13438 +0 -0
  78. data/test/dummy/tmp/cache/assets/development/sprockets/bd22193b7c008abf93a7640553ee8b24 +0 -0
  79. data/test/dummy/tmp/cache/assets/development/sprockets/c846ab366c3537979e0c1f64aa2c7e23 +0 -0
  80. data/test/dummy/tmp/cache/assets/development/sprockets/ccf39b0f3aeafc89430db44186a59037 +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sprockets/ce2d1d6840444ec16109eb6d2cf8c224 +0 -0
  82. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  83. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  84. data/test/dummy/tmp/cache/assets/development/sprockets/da3d050a8e457e6eb47cf56f3342fbd5 +0 -0
  85. data/test/dummy/tmp/cache/assets/development/sprockets/db1e6b0095d2d333b72e73bdf3c40965 +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/e357c8a9ad97f42187ce017e3bf4a3ce +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/e37eb86c730315ed8a58688351abf8f9 +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/fa046bb067616da9d14862739bf2c67c +0 -0
  90. data/test/test_helper.rb +15 -0
  91. data/test/ueditor_on_rails_test.rb +7 -0
  92. data/vendor/assets/javascripts/ueditor/dialogs/anchor/anchor.html +40 -0
  93. data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.css +681 -0
  94. data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.html +60 -0
  95. data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.js +754 -0
  96. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif +0 -0
  97. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_default.png +0 -0
  98. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif +0 -0
  99. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif +0 -0
  100. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif +0 -0
  101. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif +0 -0
  102. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif +0 -0
  103. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif +0 -0
  104. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif +0 -0
  105. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif +0 -0
  106. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif +0 -0
  107. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif +0 -0
  108. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif +0 -0
  109. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.gif +0 -0
  110. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.png +0 -0
  111. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/bg.png +0 -0
  112. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.gif +0 -0
  113. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.png +0 -0
  114. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/icons.gif +0 -0
  115. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/icons.png +0 -0
  116. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/image.png +0 -0
  117. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/progress.png +0 -0
  118. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/success.gif +0 -0
  119. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/success.png +0 -0
  120. data/vendor/assets/javascripts/ueditor/dialogs/background/background.css +94 -0
  121. data/vendor/assets/javascripts/ueditor/dialogs/background/background.html +56 -0
  122. data/vendor/assets/javascripts/ueditor/dialogs/background/background.js +376 -0
  123. data/vendor/assets/javascripts/ueditor/dialogs/background/images/bg.png +0 -0
  124. data/vendor/assets/javascripts/ueditor/dialogs/background/images/success.png +0 -0
  125. data/vendor/assets/javascripts/ueditor/dialogs/charts/chart.config.js +65 -0
  126. data/vendor/assets/javascripts/ueditor/dialogs/charts/charts.css +165 -0
  127. data/vendor/assets/javascripts/ueditor/dialogs/charts/charts.html +89 -0
  128. data/vendor/assets/javascripts/ueditor/dialogs/charts/charts.js +519 -0
  129. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts0.png +0 -0
  130. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts1.png +0 -0
  131. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts2.png +0 -0
  132. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts3.png +0 -0
  133. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts4.png +0 -0
  134. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts5.png +0 -0
  135. data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.css +43 -0
  136. data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.html +54 -0
  137. data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.js +186 -0
  138. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/0.gif +0 -0
  139. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/bface.gif +0 -0
  140. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/cface.gif +0 -0
  141. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/fface.gif +0 -0
  142. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/jxface2.gif +0 -0
  143. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/neweditor-tab-bg.png +0 -0
  144. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/tface.gif +0 -0
  145. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/wface.gif +0 -0
  146. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/yface.gif +0 -0
  147. data/vendor/assets/javascripts/ueditor/dialogs/gmap/gmap.html +89 -0
  148. data/vendor/assets/javascripts/ueditor/dialogs/help/help.css +7 -0
  149. data/vendor/assets/javascripts/ueditor/dialogs/help/help.html +82 -0
  150. data/vendor/assets/javascripts/ueditor/dialogs/help/help.js +56 -0
  151. data/vendor/assets/javascripts/ueditor/dialogs/image/image.css +894 -0
  152. data/vendor/assets/javascripts/ueditor/dialogs/image/image.html +120 -0
  153. data/vendor/assets/javascripts/ueditor/dialogs/image/image.js +1139 -0
  154. data/vendor/assets/javascripts/ueditor/dialogs/image/images/alignicon.jpg +0 -0
  155. data/vendor/assets/javascripts/ueditor/dialogs/image/images/bg.png +0 -0
  156. data/vendor/assets/javascripts/ueditor/dialogs/image/images/icons.gif +0 -0
  157. data/vendor/assets/javascripts/ueditor/dialogs/image/images/icons.png +0 -0
  158. data/vendor/assets/javascripts/ueditor/dialogs/image/images/image.png +0 -0
  159. data/vendor/assets/javascripts/ueditor/dialogs/image/images/progress.png +0 -0
  160. data/vendor/assets/javascripts/ueditor/dialogs/image/images/success.gif +0 -0
  161. data/vendor/assets/javascripts/ueditor/dialogs/image/images/success.png +0 -0
  162. data/vendor/assets/javascripts/ueditor/dialogs/insertframe/insertframe.html +98 -0
  163. data/vendor/assets/javascripts/ueditor/dialogs/internal.js +81 -0
  164. data/vendor/assets/javascripts/ueditor/dialogs/link/link.html +126 -0
  165. data/vendor/assets/javascripts/ueditor/dialogs/map/map.html +135 -0
  166. data/vendor/assets/javascripts/ueditor/dialogs/map/show.html +118 -0
  167. data/vendor/assets/javascripts/ueditor/dialogs/music/music.css +30 -0
  168. data/vendor/assets/javascripts/ueditor/dialogs/music/music.html +32 -0
  169. data/vendor/assets/javascripts/ueditor/dialogs/music/music.js +192 -0
  170. data/vendor/assets/javascripts/ueditor/dialogs/preview/preview.html +40 -0
  171. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/addimg.png +0 -0
  172. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/brush.png +0 -0
  173. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/delimg.png +0 -0
  174. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/delimgH.png +0 -0
  175. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/empty.png +0 -0
  176. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/emptyH.png +0 -0
  177. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/eraser.png +0 -0
  178. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/redo.png +0 -0
  179. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/redoH.png +0 -0
  180. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/scale.png +0 -0
  181. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/scaleH.png +0 -0
  182. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/size.png +0 -0
  183. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/undo.png +0 -0
  184. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/undoH.png +0 -0
  185. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/scrawl.css +72 -0
  186. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/scrawl.html +95 -0
  187. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/scrawl.js +671 -0
  188. data/vendor/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.html +102 -0
  189. data/vendor/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.js +164 -0
  190. data/vendor/assets/javascripts/ueditor/dialogs/snapscreen/snapscreen.html +58 -0
  191. data/vendor/assets/javascripts/ueditor/dialogs/spechars/spechars.html +21 -0
  192. data/vendor/assets/javascripts/ueditor/dialogs/spechars/spechars.js +57 -0
  193. data/vendor/assets/javascripts/ueditor/dialogs/table/dragicon.png +0 -0
  194. data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.css +84 -0
  195. data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.html +64 -0
  196. data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.js +237 -0
  197. data/vendor/assets/javascripts/ueditor/dialogs/table/edittd.html +61 -0
  198. data/vendor/assets/javascripts/ueditor/dialogs/table/edittip.html +33 -0
  199. data/vendor/assets/javascripts/ueditor/dialogs/template/config.js +42 -0
  200. data/vendor/assets/javascripts/ueditor/dialogs/template/images/bg.gif +0 -0
  201. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre0.png +0 -0
  202. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre1.png +0 -0
  203. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre2.png +0 -0
  204. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre3.png +0 -0
  205. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre4.png +0 -0
  206. data/vendor/assets/javascripts/ueditor/dialogs/template/template.css +18 -0
  207. data/vendor/assets/javascripts/ueditor/dialogs/template/template.html +26 -0
  208. data/vendor/assets/javascripts/ueditor/dialogs/template/template.js +53 -0
  209. data/vendor/assets/javascripts/ueditor/dialogs/video/images/bg.png +0 -0
  210. data/vendor/assets/javascripts/ueditor/dialogs/video/images/center_focus.jpg +0 -0
  211. data/vendor/assets/javascripts/ueditor/dialogs/video/images/file-icons.gif +0 -0
  212. data/vendor/assets/javascripts/ueditor/dialogs/video/images/file-icons.png +0 -0
  213. data/vendor/assets/javascripts/ueditor/dialogs/video/images/icons.gif +0 -0
  214. data/vendor/assets/javascripts/ueditor/dialogs/video/images/icons.png +0 -0
  215. data/vendor/assets/javascripts/ueditor/dialogs/video/images/image.png +0 -0
  216. data/vendor/assets/javascripts/ueditor/dialogs/video/images/left_focus.jpg +0 -0
  217. data/vendor/assets/javascripts/ueditor/dialogs/video/images/none_focus.jpg +0 -0
  218. data/vendor/assets/javascripts/ueditor/dialogs/video/images/progress.png +0 -0
  219. data/vendor/assets/javascripts/ueditor/dialogs/video/images/right_focus.jpg +0 -0
  220. data/vendor/assets/javascripts/ueditor/dialogs/video/images/success.gif +0 -0
  221. data/vendor/assets/javascripts/ueditor/dialogs/video/images/success.png +0 -0
  222. data/vendor/assets/javascripts/ueditor/dialogs/video/video.css +635 -0
  223. data/vendor/assets/javascripts/ueditor/dialogs/video/video.html +86 -0
  224. data/vendor/assets/javascripts/ueditor/dialogs/video/video.js +789 -0
  225. data/vendor/assets/javascripts/ueditor/dialogs/webapp/webapp.html +53 -0
  226. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/fClipboard_ueditor.swf +0 -0
  227. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/imageUploader.swf +0 -0
  228. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/tangram.js +1495 -0
  229. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/wordimage.html +111 -0
  230. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/wordimage.js +157 -0
  231. data/vendor/assets/javascripts/ueditor/index.html +175 -0
  232. data/vendor/assets/javascripts/ueditor/lang/en/en.js +684 -0
  233. data/vendor/assets/javascripts/ueditor/lang/en/images/addimage.png +0 -0
  234. data/vendor/assets/javascripts/ueditor/lang/en/images/alldeletebtnhoverskin.png +0 -0
  235. data/vendor/assets/javascripts/ueditor/lang/en/images/alldeletebtnupskin.png +0 -0
  236. data/vendor/assets/javascripts/ueditor/lang/en/images/background.png +0 -0
  237. data/vendor/assets/javascripts/ueditor/lang/en/images/button.png +0 -0
  238. data/vendor/assets/javascripts/ueditor/lang/en/images/copy.png +0 -0
  239. data/vendor/assets/javascripts/ueditor/lang/en/images/deletedisable.png +0 -0
  240. data/vendor/assets/javascripts/ueditor/lang/en/images/deleteenable.png +0 -0
  241. data/vendor/assets/javascripts/ueditor/lang/en/images/listbackground.png +0 -0
  242. data/vendor/assets/javascripts/ueditor/lang/en/images/localimage.png +0 -0
  243. data/vendor/assets/javascripts/ueditor/lang/en/images/music.png +0 -0
  244. data/vendor/assets/javascripts/ueditor/lang/en/images/rotateleftdisable.png +0 -0
  245. data/vendor/assets/javascripts/ueditor/lang/en/images/rotateleftenable.png +0 -0
  246. data/vendor/assets/javascripts/ueditor/lang/en/images/rotaterightdisable.png +0 -0
  247. data/vendor/assets/javascripts/ueditor/lang/en/images/rotaterightenable.png +0 -0
  248. data/vendor/assets/javascripts/ueditor/lang/en/images/upload.png +0 -0
  249. data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/copy.png +0 -0
  250. data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/localimage.png +0 -0
  251. data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/music.png +0 -0
  252. data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/upload.png +0 -0
  253. data/vendor/assets/javascripts/ueditor/lang/zh-cn/zh-cn.js +669 -0
  254. data/vendor/assets/javascripts/ueditor/themes/default/css/ueditor.css +1903 -0
  255. data/vendor/assets/javascripts/ueditor/themes/default/css/ueditor.min.css +8 -0
  256. data/vendor/assets/javascripts/ueditor/themes/default/dialogbase.css +100 -0
  257. data/vendor/assets/javascripts/ueditor/themes/default/images/anchor.gif +0 -0
  258. data/vendor/assets/javascripts/ueditor/themes/default/images/arrow.png +0 -0
  259. data/vendor/assets/javascripts/ueditor/themes/default/images/arrow_down.png +0 -0
  260. data/vendor/assets/javascripts/ueditor/themes/default/images/arrow_up.png +0 -0
  261. data/vendor/assets/javascripts/ueditor/themes/default/images/button-bg.gif +0 -0
  262. data/vendor/assets/javascripts/ueditor/themes/default/images/cancelbutton.gif +0 -0
  263. data/vendor/assets/javascripts/ueditor/themes/default/images/charts.png +0 -0
  264. data/vendor/assets/javascripts/ueditor/themes/default/images/cursor_h.gif +0 -0
  265. data/vendor/assets/javascripts/ueditor/themes/default/images/cursor_h.png +0 -0
  266. data/vendor/assets/javascripts/ueditor/themes/default/images/cursor_v.gif +0 -0
  267. data/vendor/assets/javascripts/ueditor/themes/default/images/cursor_v.png +0 -0
  268. data/vendor/assets/javascripts/ueditor/themes/default/images/dialog-title-bg.png +0 -0
  269. data/vendor/assets/javascripts/ueditor/themes/default/images/filescan.png +0 -0
  270. data/vendor/assets/javascripts/ueditor/themes/default/images/highlighted.gif +0 -0
  271. data/vendor/assets/javascripts/ueditor/themes/default/images/icons-all.gif +0 -0
  272. data/vendor/assets/javascripts/ueditor/themes/default/images/icons.gif +0 -0
  273. data/vendor/assets/javascripts/ueditor/themes/default/images/icons.png +0 -0
  274. data/vendor/assets/javascripts/ueditor/themes/default/images/loaderror.png +0 -0
  275. data/vendor/assets/javascripts/ueditor/themes/default/images/loading.gif +0 -0
  276. data/vendor/assets/javascripts/ueditor/themes/default/images/lock.gif +0 -0
  277. data/vendor/assets/javascripts/ueditor/themes/default/images/neweditor-tab-bg.png +0 -0
  278. data/vendor/assets/javascripts/ueditor/themes/default/images/pagebreak.gif +0 -0
  279. data/vendor/assets/javascripts/ueditor/themes/default/images/scale.png +0 -0
  280. data/vendor/assets/javascripts/ueditor/themes/default/images/sortable.png +0 -0
  281. data/vendor/assets/javascripts/ueditor/themes/default/images/spacer.gif +0 -0
  282. data/vendor/assets/javascripts/ueditor/themes/default/images/sparator_v.png +0 -0
  283. data/vendor/assets/javascripts/ueditor/themes/default/images/table-cell-align.png +0 -0
  284. data/vendor/assets/javascripts/ueditor/themes/default/images/tangram-colorpicker.png +0 -0
  285. data/vendor/assets/javascripts/ueditor/themes/default/images/toolbar_bg.png +0 -0
  286. data/vendor/assets/javascripts/ueditor/themes/default/images/unhighlighted.gif +0 -0
  287. data/vendor/assets/javascripts/ueditor/themes/default/images/upload.png +0 -0
  288. data/vendor/assets/javascripts/ueditor/themes/default/images/videologo.gif +0 -0
  289. data/vendor/assets/javascripts/ueditor/themes/default/images/word.gif +0 -0
  290. data/vendor/assets/javascripts/ueditor/themes/default/images/wordpaste.png +0 -0
  291. data/vendor/assets/javascripts/ueditor/themes/iframe.css +1 -0
  292. data/vendor/assets/javascripts/ueditor/third-party/codemirror/codemirror.css +104 -0
  293. data/vendor/assets/javascripts/ueditor/third-party/codemirror/codemirror.js +3581 -0
  294. data/vendor/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.js +1256 -0
  295. data/vendor/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.min.js +9 -0
  296. data/vendor/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.swf +0 -0
  297. data/vendor/assets/javascripts/ueditor/ueditor.all.js +29429 -0
  298. data/vendor/assets/javascripts/ueditor/ueditor.all.min.js +709 -0
  299. data/vendor/assets/javascripts/ueditor/ueditor.config.js +413 -0
  300. data/vendor/assets/javascripts/ueditor/ueditor.parse.js +1022 -0
  301. data/vendor/assets/javascripts/ueditor/ueditor.parse.min.js +28 -0
  302. metadata +464 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5b94461361e7dc61e57987b8194f9516e2742a43
4
+ data.tar.gz: 64d66297f4fcdc222f48ce16f70ba24b731b3813
5
+ SHA512:
6
+ metadata.gz: 99f1aab9da026c14f60ad047a7b0d757e9a2adad3c21d88ddc7ae652d3b87c25152ebddd758833577d2ba44cc6e30ae86eecc5712c6a7b9fff85990f5542cfde
7
+ data.tar.gz: a058c1a304399bc963d455b918f58cd711a71160f5a7d3c93cfd85816f64011d5b69485c1d56d0a5c04c206dbeedf5fda538fe7f049b31a9722f95ee32ba492c
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2014 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,32 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'UeditorOnRails'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+
18
+
19
+
20
+ Bundler::GemHelper.install_tasks
21
+
22
+ require 'rake/testtask'
23
+
24
+ Rake::TestTask.new(:test) do |t|
25
+ t.libs << 'lib'
26
+ t.libs << 'test'
27
+ t.pattern = 'test/**/*_test.rb'
28
+ t.verbose = false
29
+ end
30
+
31
+
32
+ task default: :test
@@ -0,0 +1,382 @@
1
+ (function () {
2
+ var URL = window.UEDITOR_HOME_URL || getUEBasePath() + "ueditor/";
3
+
4
+ /**
5
+ * 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
6
+ */
7
+ window.UEDITOR_CONFIG = {
8
+
9
+ //为编辑器实例添加一个路径,这个不能被注释
10
+ UEDITOR_HOME_URL: URL
11
+
12
+ //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义
13
+ , toolbars: [[
14
+ 'bold', 'italic', 'underline',
15
+ 'strikethrough', 'blockquote','insertorderedlist',
16
+ 'insertunorderedlist', 'link', 'unlink', '|', "source"
17
+ ]]
18
+ //当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
19
+ //,labelMap:{
20
+ // 'anchor':'', 'undo':''
21
+ //}
22
+
23
+ //语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
24
+ //lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
25
+ //,lang:"zh-cn"
26
+ //,langPath:URL +"lang/"
27
+
28
+ //主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件:
29
+ //现有如下皮肤:default
30
+ //,theme:'default'
31
+ //,themePath:URL +"themes/"
32
+
33
+ //,zIndex : 900 //编辑器层级的基数,默认是900
34
+
35
+ //针对getAllHtml方法,会在对应的head标签中增加该编码设置。
36
+ //,charset:"utf-8"
37
+
38
+ //若实例化编辑器的页面手动修改的domain,此处需要设置为true
39
+ //,customDomain:false
40
+
41
+ //常用配置项目
42
+ //,isShow : true //默认显示编辑器
43
+
44
+ //,textarea:'editorValue' // 提交表单时,服务器获取编辑器提交内容的所用的参数,多实例时可以给容器name属性,会将name给定的值最为每个实例的键值,不用每次实例化的时候都设置这个值
45
+
46
+ //,initialContent:'欢迎使用ueditor!' //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
47
+
48
+ //,autoClearinitialContent:true //是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
49
+
50
+ //,focus:false //初始化时,是否让编辑器获得焦点true或false
51
+
52
+ //如果自定义,最好给p标签如下的行高,要不输入中文时,会有跳动感
53
+ //,initialStyle:'p{line-height:1em}'//编辑器层级的基数,可以用来改变字体等
54
+
55
+ //,iframeCssUrl: URL + '/themes/iframe.css' //给编辑器内部引入一个css文件
56
+
57
+ //indentValue
58
+ //首行缩进距离,默认是2em
59
+ //,indentValue:'2em'
60
+
61
+ //,initialFrameWidth:1000 //初始化编辑器宽度,默认1000
62
+ //,initialFrameHeight:320 //初始化编辑器高度,默认320
63
+
64
+ //,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false
65
+
66
+ //,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况)
67
+
68
+ //启用自动保存
69
+ //,enableAutoSave: true
70
+ //自动保存间隔时间, 单位ms
71
+ //,saveInterval: 500
72
+
73
+ //,fullscreen : false //是否开启初始化时即全屏,默认关闭
74
+
75
+ //,imagePopup:true //图片操作的浮层开关,默认打开
76
+
77
+ //,autoSyncData:true //自动同步编辑器要提交的数据
78
+ //,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
79
+
80
+ //粘贴只保留标签,去除标签所有属性
81
+ //,retainOnlyLabelPasted: false
82
+
83
+ //,pasteplain:false //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
84
+ //纯文本粘贴模式下的过滤规则
85
+ //'filterTxtRules' : function(){
86
+ // function transP(node){
87
+ // node.tagName = 'p';
88
+ // node.setStyle();
89
+ // }
90
+ // return {
91
+ // //直接删除及其字节点内容
92
+ // '-' : 'script style object iframe embed input select',
93
+ // 'p': {$:{}},
94
+ // 'br':{$:{}},
95
+ // 'div':{'$':{}},
96
+ // 'li':{'$':{}},
97
+ // 'caption':transP,
98
+ // 'th':transP,
99
+ // 'tr':transP,
100
+ // 'h1':transP,'h2':transP,'h3':transP,'h4':transP,'h5':transP,'h6':transP,
101
+ // 'td':function(node){
102
+ // //没有内容的td直接删掉
103
+ // var txt = !!node.innerText();
104
+ // if(txt){
105
+ // node.parentNode.insertAfter(UE.uNode.createText(' &nbsp; &nbsp;'),node);
106
+ // }
107
+ // node.parentNode.removeChild(node,node.innerText())
108
+ // }
109
+ // }
110
+ //}()
111
+
112
+ //,allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串
113
+
114
+ //insertorderedlist
115
+ //有序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
116
+ //,'insertorderedlist':{
117
+ // //自定的样式
118
+ // 'num':'1,2,3...',
119
+ // 'num1':'1),2),3)...',
120
+ // 'num2':'(1),(2),(3)...',
121
+ // 'cn':'一,二,三....',
122
+ // 'cn1':'一),二),三)....',
123
+ // 'cn2':'(一),(二),(三)....',
124
+ // //系统自带
125
+ // 'decimal' : '' , //'1,2,3...'
126
+ // 'lower-alpha' : '' , // 'a,b,c...'
127
+ // 'lower-roman' : '' , //'i,ii,iii...'
128
+ // 'upper-alpha' : '' , lang //'A,B,C'
129
+ // 'upper-roman' : '' //'I,II,III...'
130
+ //}
131
+
132
+ //insertunorderedlist
133
+ //无序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
134
+ //,insertunorderedlist : { //自定的样式
135
+ // 'dash' :'— 破折号', //-破折号
136
+ // 'dot':' 。 小圆圈', //系统自带
137
+ // 'circle' : '', // '○ 小圆圈'
138
+ // 'disc' : '', // '● 小圆点'
139
+ // 'square' : '' //'■ 小方块'
140
+ //}
141
+ //,listDefaultPaddingLeft : '30'//默认的左边缩进的基数倍
142
+ //,listiconpath : 'http://bs.baidu.com/listicon/'//自定义标号的路径
143
+ //,maxListLevel : 3 //限制可以tab的级数, 设置-1为不限制
144
+
145
+ //,autoTransWordToList:false //禁止word中粘贴进来的列表自动变成列表标签
146
+
147
+ //fontfamily
148
+ //字体设置 label留空支持多语言自动切换,若配置,则以配置值为准
149
+ //,'fontfamily':[
150
+ // { label:'',name:'songti',val:'宋体,SimSun'},
151
+ // { label:'',name:'kaiti',val:'楷体,楷体_GB2312, SimKai'},
152
+ // { label:'',name:'yahei',val:'微软雅黑,Microsoft YaHei'},
153
+ // { label:'',name:'heiti',val:'黑体, SimHei'},
154
+ // { label:'',name:'lishu',val:'隶书, SimLi'},
155
+ // { label:'',name:'andaleMono',val:'andale mono'},
156
+ // { label:'',name:'arial',val:'arial, helvetica,sans-serif'},
157
+ // { label:'',name:'arialBlack',val:'arial black,avant garde'},
158
+ // { label:'',name:'comicSansMs',val:'comic sans ms'},
159
+ // { label:'',name:'impact',val:'impact,chicago'},
160
+ // { label:'',name:'timesNewRoman',val:'times new roman'}
161
+ //]
162
+
163
+ //fontsize
164
+ //字号
165
+ //,'fontsize':[10, 11, 12, 14, 16, 18, 20, 24, 36]
166
+
167
+ //paragraph
168
+ //段落格式 值留空时支持多语言自动识别,若配置,则以配置值为准
169
+ //,'paragraph':{'p':'', 'h1':'', 'h2':'', 'h3':'', 'h4':'', 'h5':'', 'h6':''}
170
+
171
+ //rowspacingtop
172
+ //段间距 值和显示的名字相同
173
+ //,'rowspacingtop':['5', '10', '15', '20', '25']
174
+
175
+ //rowspacingBottom
176
+ //段间距 值和显示的名字相同
177
+ //,'rowspacingbottom':['5', '10', '15', '20', '25']
178
+
179
+ //lineheight
180
+ //行内间距 值和显示的名字相同
181
+ //,'lineheight':['1', '1.5','1.75','2', '3', '4', '5']
182
+
183
+ //customstyle
184
+ //自定义样式,不支持国际化,此处配置值即可最后显示值
185
+ //block的元素是依据设置段落的逻辑设置的,inline的元素依据BIU的逻辑设置
186
+ //尽量使用一些常用的标签
187
+ //参数说明
188
+ //tag 使用的标签名字
189
+ //label 显示的名字也是用来标识不同类型的标识符,注意这个值每个要不同,
190
+ //style 添加的样式
191
+ //每一个对象就是一个自定义的样式
192
+ //,'customstyle':[
193
+ // {tag:'h1', name:'tc', label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;'},
194
+ // {tag:'h1', name:'tl',label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;margin:0 0 10px 0;'},
195
+ // {tag:'span',name:'im', label:'', style:'font-style:italic;font-weight:bold'},
196
+ // {tag:'span',name:'hi', label:'', style:'font-style:italic;font-weight:bold;color:rgb(51, 153, 204)'}
197
+ //]
198
+
199
+ //打开右键菜单功能
200
+ //,enableContextMenu: true
201
+ //右键菜单的内容,可以参考plugins/contextmenu.js里边的默认菜单的例子,label留空支持国际化,否则以此配置为准
202
+ //,contextMenu:[
203
+ // {
204
+ // label:'', //显示的名称
205
+ // cmdName:'selectall',//执行的command命令,当点击这个右键菜单时
206
+ // //exec可选,有了exec就会在点击时执行这个function,优先级高于cmdName
207
+ // exec:function () {
208
+ // //this是当前编辑器的实例
209
+ // //this.ui._dialogs['inserttableDialog'].open();
210
+ // }
211
+ // }
212
+ //]
213
+
214
+ //快捷菜单
215
+ //,shortcutMenu:["fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"]
216
+
217
+ //elementPathEnabled
218
+ //是否启用元素路径,默认是显示
219
+ //,elementPathEnabled : true
220
+
221
+ //wordCount
222
+ //,wordCount:true //是否开启字数统计
223
+ //,maximumWords:10000 //允许的最大字符数
224
+ //字数统计提示,{#count}代表当前字数,{#leave}代表还可以输入多少字符数,留空支持多语言自动切换,否则按此配置显示
225
+ //,wordCountMsg:'' //当前已输入 {#count} 个字符,您还可以输入{#leave} 个字符
226
+ //超出字数限制提示 留空支持多语言自动切换,否则按此配置显示
227
+ //,wordOverFlowMsg:'' //<span style="color:red;">你输入的字符个数已经超出最大允许值,服务器可能会拒绝保存!</span>
228
+
229
+ //tab
230
+ //点击tab键时移动的距离,tabSize倍数,tabNode什么字符做为单位
231
+ //,tabSize:4
232
+ //,tabNode:'&nbsp;'
233
+
234
+ //removeFormat
235
+ //清除格式时可以删除的标签和属性
236
+ //removeForamtTags标签
237
+ //,removeFormatTags:'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var'
238
+ //removeFormatAttributes属性
239
+ //,removeFormatAttributes:'class,style,lang,width,height,align,hspace,valign'
240
+
241
+ //undo
242
+ //可以最多回退的次数,默认20
243
+ //,maxUndoCount:20
244
+ //当输入的字符数超过该值时,保存一次现场
245
+ //,maxInputCount:1
246
+
247
+ //autoHeightEnabled
248
+ // 是否自动长高,默认true
249
+ //,autoHeightEnabled:true
250
+
251
+ //scaleEnabled
252
+ //是否可以拉伸长高,默认true(当开启时,自动长高失效)
253
+ //,scaleEnabled:false
254
+ //,minFrameWidth:800 //编辑器拖动时最小宽度,默认800
255
+ //,minFrameHeight:220 //编辑器拖动时最小高度,默认220
256
+
257
+ //autoFloatEnabled
258
+ //是否保持toolbar的位置不动,默认true
259
+ //,autoFloatEnabled:true
260
+ //浮动时工具栏距离浏览器顶部的高度,用于某些具有固定头部的页面
261
+ //,topOffset:30
262
+ //编辑器底部距离工具栏高度(如果参数大于等于编辑器高度,则设置无效)
263
+ //,toolbarTopOffset:400
264
+
265
+ //pageBreakTag
266
+ //分页标识符,默认是_ueditor_page_break_tag_
267
+ //,pageBreakTag:'_ueditor_page_break_tag_'
268
+
269
+ //autotypeset
270
+ //自动排版参数
271
+ //,autotypeset: {
272
+ // mergeEmptyline: true, //合并空行
273
+ // removeClass: true, //去掉冗余的class
274
+ // removeEmptyline: false, //去掉空行
275
+ // textAlign:"left", //段落的排版方式,可以是 left,right,center,justify 去掉这个属性表示不执行排版
276
+ // imageBlockLine: 'center', //图片的浮动方式,独占一行剧中,左右浮动,默认: center,left,right,none 去掉这个属性表示不执行排版
277
+ // pasteFilter: false, //根据规则过滤没事粘贴进来的内容
278
+ // clearFontSize: false, //去掉所有的内嵌字号,使用编辑器默认的字号
279
+ // clearFontFamily: false, //去掉所有的内嵌字体,使用编辑器默认的字体
280
+ // removeEmptyNode: false, // 去掉空节点
281
+ // //可以去掉的标签
282
+ // removeTagNames: {标签名字:1},
283
+ // indent: false, // 行首缩进
284
+ // indentValue : '2em', //行首缩进的大小
285
+ // bdc2sb: false,
286
+ // tobdc: false
287
+ //}
288
+
289
+ //tableDragable
290
+ //表格是否可以拖拽
291
+ //,tableDragable: true
292
+
293
+ //,disabledTableInTable:true //禁止表格嵌套
294
+
295
+ //sourceEditor
296
+ //源码的查看方式,codemirror 是代码高亮,textarea是文本框,默认是codemirror
297
+ //注意默认codemirror只能在ie8+和非ie中使用
298
+ //,sourceEditor:"codemirror"
299
+ //如果sourceEditor是codemirror,还用配置一下两个参数
300
+ //codeMirrorJsUrl js加载的路径,默认是 URL + "third-party/codemirror/codemirror.js"
301
+ //,codeMirrorJsUrl:URL + "third-party/codemirror/codemirror.js"
302
+ //codeMirrorCssUrl css加载的路径,默认是 URL + "third-party/codemirror/codemirror.css"
303
+ //,codeMirrorCssUrl:URL + "third-party/codemirror/codemirror.css"
304
+ //编辑器初始化完成后是否进入源码模式,默认为否。
305
+ //,sourceEditorFirst:false
306
+
307
+ //iframeUrlMap
308
+ //dialog内容的路径 ~会被替换成URL,垓属性一旦打开,将覆盖所有的dialog的默认路径
309
+ //,iframeUrlMap:{
310
+ // 'anchor':'~/dialogs/anchor/anchor.html',
311
+ //}
312
+
313
+ //webAppKey 百度应用的APIkey,每个站长必须首先去百度官网注册一个key后方能正常使用app功能,注册介绍,http://app.baidu.com/static/cms/getapikey.html
314
+ //, webAppKey: ""
315
+ };
316
+
317
+ function getUEBasePath(docUrl, confUrl) {
318
+
319
+ return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath());
320
+
321
+ }
322
+
323
+ function getConfigFilePath() {
324
+
325
+ var configPath = document.getElementsByTagName('script');
326
+
327
+ return configPath[ configPath.length - 1 ].src;
328
+
329
+ }
330
+
331
+ function getBasePath(docUrl, confUrl) {
332
+
333
+ var basePath = confUrl;
334
+
335
+
336
+ if (/^(\/|\\\\)/.test(confUrl)) {
337
+
338
+ basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/, '');
339
+
340
+ } else if (!/^[a-z]+:/i.test(confUrl)) {
341
+
342
+ docUrl = docUrl.split("#")[0].split("?")[0].replace(/[^\\\/]+$/, '');
343
+
344
+ basePath = docUrl + "" + confUrl;
345
+
346
+ }
347
+
348
+ return optimizationPath(basePath);
349
+
350
+ }
351
+
352
+ function optimizationPath(path) {
353
+
354
+ var protocol = /^[a-z]+:\/\//.exec(path)[ 0 ],
355
+ tmp = null,
356
+ res = [];
357
+
358
+ path = path.replace(protocol, "").split("?")[0].split("#")[0];
359
+
360
+ path = path.replace(/\\/g, '/').split(/\//);
361
+
362
+ path[ path.length - 1 ] = "";
363
+
364
+ while (path.length) {
365
+
366
+ if (( tmp = path.shift() ) === "..") {
367
+ res.pop();
368
+ } else if (tmp !== ".") {
369
+ res.push(tmp);
370
+ }
371
+
372
+ }
373
+
374
+ return protocol + res.join("/");
375
+
376
+ }
377
+
378
+ window.UE = {
379
+ getUEBasePath: getUEBasePath
380
+ };
381
+
382
+ })();
@@ -0,0 +1,2 @@
1
+ //= require default.config
2
+ //= require ueditor/ueditor.all.min.js