rails_kindeditor-plus 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (239) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +5 -0
  3. data/Gemfile +6 -0
  4. data/README.md +523 -0
  5. data/Rakefile +2 -0
  6. data/app/assets/javascripts/kindeditor.js +1 -0
  7. data/app/controllers/kindeditor/assets_controller.rb +126 -0
  8. data/app/uploaders/kindeditor/asset_uploader.rb +91 -0
  9. data/app/uploaders/kindeditor/file_uploader.rb +10 -0
  10. data/app/uploaders/kindeditor/flash_uploader.rb +10 -0
  11. data/app/uploaders/kindeditor/image_uploader.rb +10 -0
  12. data/app/uploaders/kindeditor/media_uploader.rb +10 -0
  13. data/config/routes.rb +6 -0
  14. data/lib/generators/rails_kindeditor/install/USAGE +10 -0
  15. data/lib/generators/rails_kindeditor/install/install_generator.rb +23 -0
  16. data/lib/generators/rails_kindeditor/install/templates/application.js +17 -0
  17. data/lib/generators/rails_kindeditor/install/templates/rails_kindeditor.rb +29 -0
  18. data/lib/generators/rails_kindeditor/migration/USAGE +14 -0
  19. data/lib/generators/rails_kindeditor/migration/migration_generator.rb +36 -0
  20. data/lib/generators/rails_kindeditor/migration/templates/migration/migration.rb +17 -0
  21. data/lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb +14 -0
  22. data/lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/file.rb +3 -0
  23. data/lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/flash.rb +3 -0
  24. data/lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/image.rb +3 -0
  25. data/lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/media.rb +3 -0
  26. data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/asset.rb +27 -0
  27. data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/file.rb +3 -0
  28. data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/flash.rb +3 -0
  29. data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/image.rb +3 -0
  30. data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/media.rb +3 -0
  31. data/lib/rails_kindeditor.rb +61 -0
  32. data/lib/rails_kindeditor/active_record.rb +14 -0
  33. data/lib/rails_kindeditor/engine.rb +34 -0
  34. data/lib/rails_kindeditor/formtastic.rb +12 -0
  35. data/lib/rails_kindeditor/helper.rb +96 -0
  36. data/lib/rails_kindeditor/simple_form.rb +11 -0
  37. data/lib/rails_kindeditor/version.rb +4 -0
  38. data/lib/tasks/assets.rake +9 -0
  39. data/rails_kindeditor-plus.gemspec +24 -0
  40. data/screenshots/rails_kindeditor.png +0 -0
  41. data/screenshots/simple_mode.png +0 -0
  42. data/vendor/assets/javascripts/kindeditor/kindeditor.js +5963 -0
  43. data/vendor/assets/javascripts/kindeditor/lang/ar.js +233 -0
  44. data/vendor/assets/javascripts/kindeditor/lang/en.js +232 -0
  45. data/vendor/assets/javascripts/kindeditor/lang/ko.js +237 -0
  46. data/vendor/assets/javascripts/kindeditor/lang/zh_CN.js +237 -0
  47. data/vendor/assets/javascripts/kindeditor/lang/zh_TW.js +235 -0
  48. data/vendor/assets/javascripts/kindeditor/plugins/anchor/anchor.js +46 -0
  49. data/vendor/assets/javascripts/kindeditor/plugins/autoheight/autoheight.js +54 -0
  50. data/vendor/assets/javascripts/kindeditor/plugins/baidumap/baidumap.js +93 -0
  51. data/vendor/assets/javascripts/kindeditor/plugins/baidumap/index.html +83 -0
  52. data/vendor/assets/javascripts/kindeditor/plugins/baidumap/map.html +43 -0
  53. data/vendor/assets/javascripts/kindeditor/plugins/clearhtml/clearhtml.js +29 -0
  54. data/vendor/assets/javascripts/kindeditor/plugins/code/code.js +62 -0
  55. data/vendor/assets/javascripts/kindeditor/plugins/code/prettify.css +13 -0
  56. data/vendor/assets/javascripts/kindeditor/plugins/code/prettify.js +28 -0
  57. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/emoticons.js +129 -0
  58. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/0.gif +0 -0
  59. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/1.gif +0 -0
  60. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/10.gif +0 -0
  61. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/100.gif +0 -0
  62. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/101.gif +0 -0
  63. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/102.gif +0 -0
  64. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/103.gif +0 -0
  65. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/104.gif +0 -0
  66. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/105.gif +0 -0
  67. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/106.gif +0 -0
  68. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/107.gif +0 -0
  69. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/108.gif +0 -0
  70. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/109.gif +0 -0
  71. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/11.gif +0 -0
  72. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/110.gif +0 -0
  73. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/111.gif +0 -0
  74. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/112.gif +0 -0
  75. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/113.gif +0 -0
  76. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/114.gif +0 -0
  77. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/115.gif +0 -0
  78. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/116.gif +0 -0
  79. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/117.gif +0 -0
  80. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/118.gif +0 -0
  81. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/119.gif +0 -0
  82. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/12.gif +0 -0
  83. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/120.gif +0 -0
  84. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/121.gif +0 -0
  85. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/122.gif +0 -0
  86. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/123.gif +0 -0
  87. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/124.gif +0 -0
  88. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/125.gif +0 -0
  89. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/126.gif +0 -0
  90. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/127.gif +0 -0
  91. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/128.gif +0 -0
  92. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/129.gif +0 -0
  93. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/13.gif +0 -0
  94. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/130.gif +0 -0
  95. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/131.gif +0 -0
  96. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/132.gif +0 -0
  97. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/133.gif +0 -0
  98. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/134.gif +0 -0
  99. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/14.gif +0 -0
  100. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/15.gif +0 -0
  101. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/16.gif +0 -0
  102. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/17.gif +0 -0
  103. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/18.gif +0 -0
  104. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/19.gif +0 -0
  105. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/2.gif +0 -0
  106. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/20.gif +0 -0
  107. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/21.gif +0 -0
  108. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/22.gif +0 -0
  109. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/23.gif +0 -0
  110. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/24.gif +0 -0
  111. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/25.gif +0 -0
  112. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/26.gif +0 -0
  113. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/27.gif +0 -0
  114. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/28.gif +0 -0
  115. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/29.gif +0 -0
  116. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/3.gif +0 -0
  117. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/30.gif +0 -0
  118. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/31.gif +0 -0
  119. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/32.gif +0 -0
  120. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/33.gif +0 -0
  121. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/34.gif +0 -0
  122. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/35.gif +0 -0
  123. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/36.gif +0 -0
  124. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/37.gif +0 -0
  125. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/38.gif +0 -0
  126. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/39.gif +0 -0
  127. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/4.gif +0 -0
  128. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/40.gif +0 -0
  129. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/41.gif +0 -0
  130. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/42.gif +0 -0
  131. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/43.gif +0 -0
  132. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/44.gif +0 -0
  133. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/45.gif +0 -0
  134. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/46.gif +0 -0
  135. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/47.gif +0 -0
  136. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/48.gif +0 -0
  137. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/49.gif +0 -0
  138. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/5.gif +0 -0
  139. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/50.gif +0 -0
  140. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/51.gif +0 -0
  141. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/52.gif +0 -0
  142. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/53.gif +0 -0
  143. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/54.gif +0 -0
  144. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/55.gif +0 -0
  145. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/56.gif +0 -0
  146. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/57.gif +0 -0
  147. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/58.gif +0 -0
  148. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/59.gif +0 -0
  149. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/6.gif +0 -0
  150. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/60.gif +0 -0
  151. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/61.gif +0 -0
  152. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/62.gif +0 -0
  153. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/63.gif +0 -0
  154. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/64.gif +0 -0
  155. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/65.gif +0 -0
  156. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/66.gif +0 -0
  157. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/67.gif +0 -0
  158. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/68.gif +0 -0
  159. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/69.gif +0 -0
  160. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/7.gif +0 -0
  161. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/70.gif +0 -0
  162. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/71.gif +0 -0
  163. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/72.gif +0 -0
  164. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/73.gif +0 -0
  165. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/74.gif +0 -0
  166. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/75.gif +0 -0
  167. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/76.gif +0 -0
  168. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/77.gif +0 -0
  169. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/78.gif +0 -0
  170. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/79.gif +0 -0
  171. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/8.gif +0 -0
  172. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/80.gif +0 -0
  173. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/81.gif +0 -0
  174. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/82.gif +0 -0
  175. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/83.gif +0 -0
  176. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/84.gif +0 -0
  177. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/85.gif +0 -0
  178. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/86.gif +0 -0
  179. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/87.gif +0 -0
  180. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/88.gif +0 -0
  181. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/89.gif +0 -0
  182. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/9.gif +0 -0
  183. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/90.gif +0 -0
  184. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/91.gif +0 -0
  185. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/92.gif +0 -0
  186. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/93.gif +0 -0
  187. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/94.gif +0 -0
  188. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/95.gif +0 -0
  189. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/96.gif +0 -0
  190. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/97.gif +0 -0
  191. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/98.gif +0 -0
  192. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/99.gif +0 -0
  193. data/vendor/assets/javascripts/kindeditor/plugins/emoticons/images/static.gif +0 -0
  194. data/vendor/assets/javascripts/kindeditor/plugins/filemanager/filemanager.js +189 -0
  195. data/vendor/assets/javascripts/kindeditor/plugins/filemanager/images/file-16.gif +0 -0
  196. data/vendor/assets/javascripts/kindeditor/plugins/filemanager/images/file-64.gif +0 -0
  197. data/vendor/assets/javascripts/kindeditor/plugins/filemanager/images/folder-16.gif +0 -0
  198. data/vendor/assets/javascripts/kindeditor/plugins/filemanager/images/folder-64.gif +0 -0
  199. data/vendor/assets/javascripts/kindeditor/plugins/filemanager/images/go-up.gif +0 -0
  200. data/vendor/assets/javascripts/kindeditor/plugins/flash/flash.js +161 -0
  201. data/vendor/assets/javascripts/kindeditor/plugins/image/image.js +328 -0
  202. data/vendor/assets/javascripts/kindeditor/plugins/image/images/align_left.gif +0 -0
  203. data/vendor/assets/javascripts/kindeditor/plugins/image/images/align_right.gif +0 -0
  204. data/vendor/assets/javascripts/kindeditor/plugins/image/images/align_top.gif +0 -0
  205. data/vendor/assets/javascripts/kindeditor/plugins/image/images/refresh.png +0 -0
  206. data/vendor/assets/javascripts/kindeditor/plugins/insertfile/insertfile.js +144 -0
  207. data/vendor/assets/javascripts/kindeditor/plugins/lineheight/lineheight.js +38 -0
  208. data/vendor/assets/javascripts/kindeditor/plugins/link/link.js +66 -0
  209. data/vendor/assets/javascripts/kindeditor/plugins/map/map.html +57 -0
  210. data/vendor/assets/javascripts/kindeditor/plugins/map/map.js +137 -0
  211. data/vendor/assets/javascripts/kindeditor/plugins/media/media.js +170 -0
  212. data/vendor/assets/javascripts/kindeditor/plugins/multiimage/images/image.png +0 -0
  213. data/vendor/assets/javascripts/kindeditor/plugins/multiimage/images/select-files-en.png +0 -0
  214. data/vendor/assets/javascripts/kindeditor/plugins/multiimage/images/select-files-zh_CN.png +0 -0
  215. data/vendor/assets/javascripts/kindeditor/plugins/multiimage/images/swfupload.swf +0 -0
  216. data/vendor/assets/javascripts/kindeditor/plugins/multiimage/multiimage.js +1384 -0
  217. data/vendor/assets/javascripts/kindeditor/plugins/pagebreak/pagebreak.js +27 -0
  218. data/vendor/assets/javascripts/kindeditor/plugins/plainpaste/plainpaste.js +41 -0
  219. data/vendor/assets/javascripts/kindeditor/plugins/preview/preview.js +33 -0
  220. data/vendor/assets/javascripts/kindeditor/plugins/quickformat/quickformat.js +81 -0
  221. data/vendor/assets/javascripts/kindeditor/plugins/table/table.js +712 -0
  222. data/vendor/assets/javascripts/kindeditor/plugins/template/html/1.html +14 -0
  223. data/vendor/assets/javascripts/kindeditor/plugins/template/html/2.html +42 -0
  224. data/vendor/assets/javascripts/kindeditor/plugins/template/html/3.html +36 -0
  225. data/vendor/assets/javascripts/kindeditor/plugins/template/template.js +58 -0
  226. data/vendor/assets/javascripts/kindeditor/plugins/wordpaste/wordpaste.js +51 -0
  227. data/vendor/assets/javascripts/kindeditor/themes/common/anchor.gif +0 -0
  228. data/vendor/assets/javascripts/kindeditor/themes/common/blank.gif +0 -0
  229. data/vendor/assets/javascripts/kindeditor/themes/common/flash.gif +0 -0
  230. data/vendor/assets/javascripts/kindeditor/themes/common/loading.gif +0 -0
  231. data/vendor/assets/javascripts/kindeditor/themes/common/media.gif +0 -0
  232. data/vendor/assets/javascripts/kindeditor/themes/common/rm.gif +0 -0
  233. data/vendor/assets/javascripts/kindeditor/themes/default/background.png +0 -0
  234. data/vendor/assets/javascripts/kindeditor/themes/default/default.css +1149 -0
  235. data/vendor/assets/javascripts/kindeditor/themes/default/default.png +0 -0
  236. data/vendor/assets/javascripts/kindeditor/themes/qq/editor.gif +0 -0
  237. data/vendor/assets/javascripts/kindeditor/themes/qq/qq.css +143 -0
  238. data/vendor/assets/javascripts/kindeditor/themes/simple/simple.css +100 -0
  239. metadata +309 -0
@@ -0,0 +1,235 @@
1
+ /*******************************************************************************
2
+ * KindEditor - WYSIWYG HTML Editor for Internet
3
+ * Copyright (C) 2006-2011 kindsoft.net
4
+ *
5
+ * @author Roddy <luolonghao@gmail.com>
6
+ * @site http://www.kindsoft.net/
7
+ * @licence http://www.kindsoft.net/license.php
8
+ *******************************************************************************/
9
+
10
+ KindEditor.lang({
11
+ source : '原始碼',
12
+ preview : '預覽',
13
+ undo : '復原(Ctrl+Z)',
14
+ redo : '重複(Ctrl+Y)',
15
+ cut : '剪下(Ctrl+X)',
16
+ copy : '複製(Ctrl+C)',
17
+ paste : '貼上(Ctrl+V)',
18
+ plainpaste : '貼為純文字格式',
19
+ wordpaste : '自Word貼上',
20
+ selectall : '全選(Ctrl+A)',
21
+ justifyleft : '靠左對齊',
22
+ justifycenter : '置中',
23
+ justifyright : '靠右對齊',
24
+ justifyfull : '左右對齊',
25
+ insertorderedlist : '編號清單',
26
+ insertunorderedlist : '項目清單',
27
+ indent : '增加縮排',
28
+ outdent : '減少縮排',
29
+ subscript : '下標',
30
+ superscript : '上標',
31
+ formatblock : '標題',
32
+ fontname : '字體',
33
+ fontsize : '文字大小',
34
+ forecolor : '文字顏色',
35
+ hilitecolor : '背景顏色',
36
+ bold : '粗體(Ctrl+B)',
37
+ italic : '斜體(Ctrl+I)',
38
+ underline : '底線(Ctrl+U)',
39
+ strikethrough : '刪除線',
40
+ removeformat : '清除格式',
41
+ image : '影像',
42
+ multiimage : '批量影像上傳',
43
+ flash : 'Flash',
44
+ media : '多媒體',
45
+ table : '表格',
46
+ hr : '插入水平線',
47
+ emoticons : '插入表情',
48
+ link : '超連結',
49
+ unlink : '移除超連結',
50
+ fullscreen : '最大化',
51
+ about : '關於',
52
+ print : '列印(Ctrl+P)',
53
+ fileManager : '瀏覽伺服器',
54
+ code : '插入程式代碼',
55
+ map : 'Google地圖',
56
+ baidumap : 'Baidu地圖',
57
+ lineheight : '行距',
58
+ clearhtml : '清理HTML代碼',
59
+ pagebreak : '插入分頁符號',
60
+ quickformat : '快速排版',
61
+ insertfile : '插入文件',
62
+ template : '插入樣板',
63
+ anchor : '錨點',
64
+ yes : '確定',
65
+ no : '取消',
66
+ close : '關閉',
67
+ editImage : '影像屬性',
68
+ deleteImage : '刪除影像',
69
+ editFlash : 'Flash屬性',
70
+ deleteFlash : '删除Flash',
71
+ editMedia : '多媒體屬性',
72
+ deleteMedia : '删除多媒體',
73
+ editLink : '超連結屬性',
74
+ deleteLink : '移除超連結',
75
+ tableprop : '表格屬性',
76
+ tablecellprop : '儲存格屬性',
77
+ tableinsert : '插入表格',
78
+ tabledelete : '刪除表格',
79
+ tablecolinsertleft : '向左插入列',
80
+ tablecolinsertright : '向右插入列',
81
+ tablerowinsertabove : '向上插入欄',
82
+ tablerowinsertbelow : '下方插入欄',
83
+ tablerowmerge : '向下合併單元格',
84
+ tablecolmerge : '向右合併單元格',
85
+ tablerowsplit : '分割欄',
86
+ tablecolsplit : '分割列',
87
+ tablecoldelete : '删除列',
88
+ tablerowdelete : '删除欄',
89
+ noColor : '自動',
90
+ pleaseSelectFile : '請選擇文件。',
91
+ invalidImg : "請輸入有效的URL。\n只允許jpg,gif,bmp,png格式。",
92
+ invalidMedia : "請輸入有效的URL。\n只允許swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb格式。",
93
+ invalidWidth : "寬度必須是數字。",
94
+ invalidHeight : "高度必須是數字。",
95
+ invalidBorder : "邊框必須是數字。",
96
+ invalidUrl : "請輸入有效的URL。",
97
+ invalidRows : '欄數是必須輸入項目,只允許輸入大於0的數字。',
98
+ invalidCols : '列數是必須輸入項目,只允許輸入大於0的數字。',
99
+ invalidPadding : '內距必須是數字。',
100
+ invalidSpacing : '間距必須是數字。',
101
+ invalidBorder : '边框必须为数字。',
102
+ pleaseInput : "請輸入內容。",
103
+ invalidJson : '伺服器發生故障。',
104
+ uploadSuccess : '上傳成功。',
105
+ cutError : '您的瀏覽器安全設置不允許使用剪下操作,請使用快捷鍵(Ctrl+X)完成。',
106
+ copyError : '您的瀏覽器安全設置不允許使用剪下操作,請使用快捷鍵(Ctrl+C)完成。',
107
+ pasteError : '您的瀏覽器安全設置不允許使用剪下操作,請使用快捷鍵(Ctrl+V)完成。',
108
+ ajaxLoading : '加載中,請稍候 ...',
109
+ uploadLoading : '上傳中,請稍候 ...',
110
+ uploadError : '上傳錯誤',
111
+ 'plainpaste.comment' : '請使用快捷鍵(Ctrl+V)把內容貼到下方區域裡。',
112
+ 'wordpaste.comment' : '請使用快捷鍵(Ctrl+V)把內容貼到下方區域裡。',
113
+ 'code.pleaseInput' : 'Please input code.',
114
+ 'link.url' : 'URL',
115
+ 'link.linkType' : '打開類型',
116
+ 'link.newWindow' : '新窗口',
117
+ 'link.selfWindow' : '本頁窗口',
118
+ 'flash.url' : 'URL',
119
+ 'flash.width' : '寬度',
120
+ 'flash.height' : '高度',
121
+ 'flash.upload' : '上傳',
122
+ 'flash.viewServer' : '瀏覽',
123
+ 'media.url' : 'URL',
124
+ 'media.width' : '寬度',
125
+ 'media.height' : '高度',
126
+ 'media.autostart' : '自動播放',
127
+ 'media.upload' : '上傳',
128
+ 'media.viewServer' : '瀏覽',
129
+ 'image.remoteImage' : '網絡影像',
130
+ 'image.localImage' : '上傳影像',
131
+ 'image.remoteUrl' : '影像URL',
132
+ 'image.localUrl' : '影像URL',
133
+ 'image.size' : '影像大小',
134
+ 'image.width' : '寬度',
135
+ 'image.height' : '高度',
136
+ 'image.resetSize' : '原始大小',
137
+ 'image.align' : '對齊方式',
138
+ 'image.defaultAlign' : '未設定',
139
+ 'image.leftAlign' : '向左對齊',
140
+ 'image.rightAlign' : '向右對齊',
141
+ 'image.imgTitle' : '影像說明',
142
+ 'image.upload' : '瀏覽...',
143
+ 'image.viewServer' : '瀏覽...',
144
+ 'multiimage.uploadDesc' : 'Allows users to upload <%=uploadLimit%> images, single image size not exceeding <%=sizeLimit%>',
145
+ 'multiimage.startUpload' : 'Start upload',
146
+ 'multiimage.clearAll' : 'Clear all',
147
+ 'multiimage.insertAll' : 'Insert all',
148
+ 'multiimage.queueLimitExceeded' : 'Queue limit exceeded.',
149
+ 'multiimage.fileExceedsSizeLimit' : 'File exceeds size limit.',
150
+ 'multiimage.zeroByteFile' : 'Zero byte file.',
151
+ 'multiimage.invalidFiletype' : 'Invalid file type.',
152
+ 'multiimage.unknownError' : 'Unknown upload error.',
153
+ 'multiimage.pending' : 'Pending ...',
154
+ 'multiimage.uploadError' : 'Upload error',
155
+ 'filemanager.emptyFolder' : '空文件夾',
156
+ 'filemanager.moveup' : '至上一級文件夾',
157
+ 'filemanager.viewType' : '顯示方式:',
158
+ 'filemanager.viewImage' : '縮略圖',
159
+ 'filemanager.listImage' : '詳細信息',
160
+ 'filemanager.orderType' : '排序方式:',
161
+ 'filemanager.fileName' : '名稱',
162
+ 'filemanager.fileSize' : '大小',
163
+ 'filemanager.fileType' : '類型',
164
+ 'insertfile.url' : 'URL',
165
+ 'insertfile.title' : '文件說明',
166
+ 'insertfile.upload' : '上傳',
167
+ 'insertfile.viewServer' : '瀏覽',
168
+ 'table.cells' : '儲存格數',
169
+ 'table.rows' : '欄數',
170
+ 'table.cols' : '列數',
171
+ 'table.size' : '表格大小',
172
+ 'table.width' : '寬度',
173
+ 'table.height' : '高度',
174
+ 'table.percent' : '%',
175
+ 'table.px' : 'px',
176
+ 'table.space' : '內距間距',
177
+ 'table.padding' : '內距',
178
+ 'table.spacing' : '間距',
179
+ 'table.align' : '對齊方式',
180
+ 'table.textAlign' : '水平對齊',
181
+ 'table.verticalAlign' : '垂直對齊',
182
+ 'table.alignDefault' : '未設定',
183
+ 'table.alignLeft' : '向左對齊',
184
+ 'table.alignCenter' : '置中',
185
+ 'table.alignRight' : '向右對齊',
186
+ 'table.alignTop' : '靠上',
187
+ 'table.alignMiddle' : '置中',
188
+ 'table.alignBottom' : '靠下',
189
+ 'table.alignBaseline' : '基線',
190
+ 'table.border' : '表格邊框',
191
+ 'table.borderWidth' : '邊框',
192
+ 'table.borderColor' : '顏色',
193
+ 'table.backgroundColor' : '背景顏色',
194
+ 'map.address' : '住所: ',
195
+ 'map.search' : '尋找',
196
+ 'baidumap.address' : '住所: ',
197
+ 'baidumap.search' : '尋找',
198
+ 'baidumap.insertDynamicMap' : '插入動態地圖',
199
+ 'anchor.name' : '錨點名稱',
200
+ 'formatblock.formatBlock' : {
201
+ h1 : '標題 1',
202
+ h2 : '標題 2',
203
+ h3 : '標題 3',
204
+ h4 : '標題 4',
205
+ p : '一般'
206
+ },
207
+ 'fontname.fontName' : {
208
+ 'MingLiU' : '細明體',
209
+ 'PMingLiU' : '新細明體',
210
+ 'DFKai-SB' : '標楷體',
211
+ 'SimSun' : '宋體',
212
+ 'NSimSun' : '新宋體',
213
+ 'FangSong' : '仿宋體',
214
+ 'Arial' : 'Arial',
215
+ 'Arial Black' : 'Arial Black',
216
+ 'Times New Roman' : 'Times New Roman',
217
+ 'Courier New' : 'Courier New',
218
+ 'Tahoma' : 'Tahoma',
219
+ 'Verdana' : 'Verdana'
220
+ },
221
+ 'lineheight.lineHeight' : [
222
+ {'1' : '单倍行距'},
223
+ {'1.5' : '1.5倍行距'},
224
+ {'2' : '2倍行距'},
225
+ {'2.5' : '2.5倍行距'},
226
+ {'3' : '3倍行距'}
227
+ ],
228
+ 'template.selectTemplate' : '可選樣板',
229
+ 'template.replaceContent' : '取代當前內容',
230
+ 'template.fileList' : {
231
+ '1.html' : '影像和文字',
232
+ '2.html' : '表格',
233
+ '3.html' : '项目清單'
234
+ }
235
+ }, 'zh_TW');
@@ -0,0 +1,46 @@
1
+ /*******************************************************************************
2
+ * KindEditor - WYSIWYG HTML Editor for Internet
3
+ * Copyright (C) 2006-2011 kindsoft.net
4
+ *
5
+ * @author Roddy <luolonghao@gmail.com>
6
+ * @site http://www.kindsoft.net/
7
+ * @licence http://www.kindsoft.net/license.php
8
+ *******************************************************************************/
9
+
10
+ KindEditor.plugin('anchor', function(K) {
11
+ var self = this, name = 'anchor', lang = self.lang(name + '.');
12
+ self.plugin.anchor = {
13
+ edit : function() {
14
+ var html = ['<div style="padding:20px;">',
15
+ '<div class="ke-dialog-row">',
16
+ '<label for="keName">' + lang.name + '</label>',
17
+ '<input class="ke-input-text" type="text" id="keName" name="name" value="" style="width:100px;" />',
18
+ '</div>',
19
+ '</div>'].join('');
20
+ var dialog = self.createDialog({
21
+ name : name,
22
+ width : 300,
23
+ title : self.lang(name),
24
+ body : html,
25
+ yesBtn : {
26
+ name : self.lang('yes'),
27
+ click : function(e) {
28
+ self.insertHtml('<a name="' + nameBox.val() + '">').hideDialog().focus();
29
+ }
30
+ }
31
+ });
32
+ var div = dialog.div,
33
+ nameBox = K('input[name="name"]', div);
34
+ var img = self.plugin.getSelectedAnchor();
35
+ if (img) {
36
+ nameBox.val(unescape(img.attr('data-ke-name')));
37
+ }
38
+ nameBox[0].focus();
39
+ nameBox[0].select();
40
+ },
41
+ 'delete' : function() {
42
+ self.plugin.getSelectedAnchor().remove();
43
+ }
44
+ };
45
+ self.clickToolbar(name, self.plugin.anchor.edit);
46
+ });
@@ -0,0 +1,54 @@
1
+ /*******************************************************************************
2
+ * KindEditor - WYSIWYG HTML Editor for Internet
3
+ * Copyright (C) 2006-2011 kindsoft.net
4
+ *
5
+ * @author Roddy <luolonghao@gmail.com>
6
+ * @site http://www.kindsoft.net/
7
+ * @licence http://www.kindsoft.net/license.php
8
+ *******************************************************************************/
9
+
10
+ KindEditor.plugin('autoheight', function(K) {
11
+ var self = this;
12
+
13
+ if (!self.autoHeightMode) {
14
+ return;
15
+ }
16
+
17
+ var minHeight;
18
+
19
+ function hideScroll() {
20
+ var edit = self.edit;
21
+ var body = edit.doc.body;
22
+ edit.iframe[0].scroll = 'no';
23
+ body.style.overflowY = 'hidden';
24
+ }
25
+
26
+ function resetHeight() {
27
+ var edit = self.edit;
28
+ var body = edit.doc.body;
29
+ edit.iframe.height(minHeight);
30
+ self.resize(null, Math.max((K.IE ? body.scrollHeight : body.offsetHeight) + 76, minHeight));
31
+ }
32
+
33
+ function init() {
34
+ minHeight = K.removeUnit(self.height);
35
+
36
+ self.edit.afterChange(resetHeight);
37
+ hideScroll();
38
+ resetHeight();
39
+ }
40
+
41
+ if (self.isCreated) {
42
+ init();
43
+ } else {
44
+ self.afterCreate(init);
45
+ }
46
+ });
47
+
48
+ /*
49
+ * 如何实现真正的自动高度?
50
+ * 修改编辑器高度之后,再次获取body内容高度时,最小值只会是当前iframe的设置高度,这样就导致高度只增不减。
51
+ * 所以每次获取body内容高度之前,先将iframe的高度重置为最小高度,这样就能获取body的实际高度。
52
+ * 由此就实现了真正的自动高度
53
+ * 测试:chrome、firefox、IE9、IE8
54
+ * */
@@ -0,0 +1,93 @@
1
+ /*******************************************************************************
2
+ * KindEditor - WYSIWYG HTML Editor for Internet
3
+ * Copyright (C) 2006-2011 kindsoft.net
4
+ *
5
+ * @author Roddy <luolonghao@gmail.com>
6
+ * @site http://www.kindsoft.net/
7
+ * @licence http://www.kindsoft.net/license.php
8
+ *******************************************************************************/
9
+
10
+ // Baidu Maps: http://dev.baidu.com/wiki/map/index.php?title=%E9%A6%96%E9%A1%B5
11
+
12
+ KindEditor.plugin('baidumap', function(K) {
13
+ var self = this, name = 'baidumap', lang = self.lang(name + '.');
14
+ var mapWidth = K.undef(self.mapWidth, 558);
15
+ var mapHeight = K.undef(self.mapHeight, 360);
16
+ self.clickToolbar(name, function() {
17
+ var html = ['<div style="padding:10px 20px;">',
18
+ '<div class="ke-header">',
19
+ // left start
20
+ '<div class="ke-left">',
21
+ lang.address + ' <input id="kindeditor_plugin_map_address" name="address" class="ke-input-text" value="" style="width:200px;" /> ',
22
+ '<span class="ke-button-common ke-button-outer">',
23
+ '<input type="button" name="searchBtn" class="ke-button-common ke-button" value="' + lang.search + '" />',
24
+ '</span>',
25
+ '</div>',
26
+ // right start
27
+ '<div class="ke-right">',
28
+ '<input type="checkbox" id="keInsertDynamicMap" name="insertDynamicMap" value="1" /> <label for="keInsertDynamicMap">' + lang.insertDynamicMap + '</label>',
29
+ '</div>',
30
+ '<div class="ke-clearfix"></div>',
31
+ '</div>',
32
+ '<div class="ke-map" style="width:' + mapWidth + 'px;height:' + mapHeight + 'px;"></div>',
33
+ '</div>'].join('');
34
+ var dialog = self.createDialog({
35
+ name : name,
36
+ width : mapWidth + 42,
37
+ title : self.lang(name),
38
+ body : html,
39
+ yesBtn : {
40
+ name : self.lang('yes'),
41
+ click : function(e) {
42
+ var map = win.map;
43
+ var centerObj = map.getCenter();
44
+ var center = centerObj.lng + ',' + centerObj.lat;
45
+ var zoom = map.getZoom();
46
+ var url = [checkbox[0].checked ? self.pluginsPath + 'baidumap/index.html' : 'http://api.map.baidu.com/staticimage',
47
+ '?center=' + encodeURIComponent(center),
48
+ '&zoom=' + encodeURIComponent(zoom),
49
+ '&width=' + mapWidth,
50
+ '&height=' + mapHeight,
51
+ '&markers=' + encodeURIComponent(center),
52
+ '&markerStyles=' + encodeURIComponent('l,A')].join('');
53
+ if (checkbox[0].checked) {
54
+ self.insertHtml('<iframe src="' + url + '" frameborder="0" style="width:' + (mapWidth + 2) + 'px;height:' + (mapHeight + 2) + 'px;"></iframe>');
55
+ } else {
56
+ self.exec('insertimage', url);
57
+ }
58
+ self.hideDialog().focus();
59
+ }
60
+ },
61
+ beforeRemove : function() {
62
+ searchBtn.remove();
63
+ if (doc) {
64
+ doc.write('');
65
+ }
66
+ iframe.remove();
67
+ }
68
+ });
69
+ var div = dialog.div,
70
+ addressBox = K('[name="address"]', div),
71
+ searchBtn = K('[name="searchBtn"]', div),
72
+ checkbox = K('[name="insertDynamicMap"]', dialog.div),
73
+ win, doc;
74
+ var iframe = K('<iframe class="ke-textarea" frameborder="0" src="' + self.pluginsPath + 'baidumap/map.html" style="width:' + mapWidth + 'px;height:' + mapHeight + 'px;"></iframe>');
75
+ function ready() {
76
+ win = iframe[0].contentWindow;
77
+ doc = K.iframeDoc(iframe);
78
+ }
79
+ iframe.bind('load', function() {
80
+ iframe.unbind('load');
81
+ if (K.IE) {
82
+ ready();
83
+ } else {
84
+ setTimeout(ready, 0);
85
+ }
86
+ });
87
+ K('.ke-map', div).replaceWith(iframe);
88
+ // search map
89
+ searchBtn.click(function() {
90
+ win.search(addressBox.val());
91
+ });
92
+ });
93
+ });
@@ -0,0 +1,83 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="keywords" content="百度地图,百度地图API,百度地图自定义工具,百度地图所见即所得工具" />
6
+ <meta name="description" content="百度地图API自定义地图,帮助用户在可视化操作下生成百度地图" />
7
+ <title>百度地图API自定义地图</title>
8
+ <!--引用百度地图API-->
9
+ <style type="text/css">
10
+ html,body{margin:0;padding:0;}
11
+ .iw_poi_title {color:#CC5522;font-size:14px;font-weight:bold;overflow:hidden;padding-right:13px;white-space:nowrap}
12
+ .iw_poi_content {font:12px arial,sans-serif;overflow:visible;padding-top:4px;white-space:-moz-pre-wrap;word-wrap:break-word}
13
+ </style>
14
+ <script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
15
+ </head>
16
+
17
+ <body onload="initMap();">
18
+ <!--百度地图容器-->
19
+ <div style="width:697px;height:550px;border:#ccc solid 1px;" id="dituContent"></div>
20
+ </body>
21
+ <script type="text/javascript">
22
+ function getParam(name) {
23
+ return location.href.match(new RegExp('[?&]' + name + '=([^?&]+)', 'i')) ? decodeURIComponent(RegExp.$1) : '';
24
+ }
25
+ var centerParam = getParam('center');
26
+ var zoomParam = getParam('zoom');
27
+ var widthParam = getParam('width');
28
+ var heightParam = getParam('height');
29
+ var markersParam = getParam('markers');
30
+ var markerStylesParam = getParam('markerStyles');
31
+
32
+ //创建和初始化地图函数:
33
+ function initMap(){
34
+ // [FF]切换模式后报错
35
+ if (!window.BMap) {
36
+ return;
37
+ }
38
+ var dituContent = document.getElementById('dituContent');
39
+ dituContent.style.width = widthParam + 'px';
40
+ dituContent.style.height = heightParam + 'px';
41
+
42
+ createMap();//创建地图
43
+ setMapEvent();//设置地图事件
44
+ addMapControl();//向地图添加控件
45
+
46
+ // 创建标注
47
+ var markersArr = markersParam.split(',');
48
+ var point = new BMap.Point(markersArr[0], markersArr[1]);
49
+ var marker = new BMap.Marker(point);
50
+ map.addOverlay(marker); // 将标注添加到地图中
51
+ }
52
+
53
+ //创建地图函数:
54
+ function createMap(){
55
+ var map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
56
+ var centerArr = centerParam.split(',');
57
+ var point = new BMap.Point(centerArr[0], centerArr[1]);//定义一个中心点坐标
58
+ map.centerAndZoom(point, zoomParam);//设定地图的中心点和坐标并将地图显示在地图容器中
59
+ window.map = map;//将map变量存储在全局
60
+ }
61
+
62
+ //地图事件设置函数:
63
+ function setMapEvent(){
64
+ map.enableDragging();//启用地图拖拽事件,默认启用(可不写)
65
+ map.enableScrollWheelZoom();//启用地图滚轮放大缩小
66
+ map.enableDoubleClickZoom();//启用鼠标双击放大,默认启用(可不写)
67
+ map.enableKeyboard();//启用键盘上下左右键移动地图
68
+ }
69
+
70
+ //地图控件添加函数:
71
+ function addMapControl(){
72
+ //向地图中添加缩放控件
73
+ var ctrl_nav = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE});
74
+ map.addControl(ctrl_nav);
75
+ //向地图中添加缩略图控件
76
+ var ctrl_ove = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:1});
77
+ map.addControl(ctrl_ove);
78
+ //向地图中添加比例尺控件
79
+ var ctrl_sca = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT});
80
+ map.addControl(ctrl_sca);
81
+ }
82
+ </script>
83
+ </html>