rails_kindeditor 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) hide show
  1. data/README.rdoc +115 -16
  2. data/app/controllers/kindeditor/assets_controller.rb +119 -42
  3. data/app/uploaders/kindeditor/asset_uploader.rb +68 -0
  4. data/app/uploaders/kindeditor/file_uploader.rb +3 -58
  5. data/app/uploaders/kindeditor/flash_uploader.rb +14 -0
  6. data/app/uploaders/kindeditor/image_uploader.rb +3 -58
  7. data/app/uploaders/kindeditor/media_uploader.rb +14 -0
  8. data/lib/generators/rails_kindeditor/install/install_generator.rb +1 -2
  9. data/lib/generators/rails_kindeditor/install/templates/kindeditor/kindeditor-init.js +9 -8
  10. data/lib/generators/rails_kindeditor/install/templates/kindeditor/kindeditor-min.js +158 -0
  11. data/lib/generators/rails_kindeditor/install/templates/kindeditor/lang/en.js +208 -0
  12. data/lib/generators/rails_kindeditor/install/templates/kindeditor/lang/zh_CN.js +210 -0
  13. data/lib/generators/rails_kindeditor/install/templates/kindeditor/lang/zh_TW.js +210 -0
  14. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/clearhtml/clearhtml.js +28 -0
  15. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/code/code.js +57 -0
  16. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/code/prettify.css +13 -0
  17. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/code/prettify.js +28 -0
  18. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/emoticons.js +129 -0
  19. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{0.gif → images/0.gif} +0 -0
  20. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{1.gif → images/1.gif} +0 -0
  21. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{10.gif → images/10.gif} +0 -0
  22. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{100.gif → images/100.gif} +0 -0
  23. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{101.gif → images/101.gif} +0 -0
  24. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{102.gif → images/102.gif} +0 -0
  25. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{103.gif → images/103.gif} +0 -0
  26. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{104.gif → images/104.gif} +0 -0
  27. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{105.gif → images/105.gif} +0 -0
  28. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{106.gif → images/106.gif} +0 -0
  29. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{107.gif → images/107.gif} +0 -0
  30. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{108.gif → images/108.gif} +0 -0
  31. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{109.gif → images/109.gif} +0 -0
  32. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{11.gif → images/11.gif} +0 -0
  33. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{110.gif → images/110.gif} +0 -0
  34. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{111.gif → images/111.gif} +0 -0
  35. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{112.gif → images/112.gif} +0 -0
  36. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{113.gif → images/113.gif} +0 -0
  37. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{114.gif → images/114.gif} +0 -0
  38. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{115.gif → images/115.gif} +0 -0
  39. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{116.gif → images/116.gif} +0 -0
  40. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{117.gif → images/117.gif} +0 -0
  41. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{118.gif → images/118.gif} +0 -0
  42. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{119.gif → images/119.gif} +0 -0
  43. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{12.gif → images/12.gif} +0 -0
  44. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{120.gif → images/120.gif} +0 -0
  45. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{121.gif → images/121.gif} +0 -0
  46. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{122.gif → images/122.gif} +0 -0
  47. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{123.gif → images/123.gif} +0 -0
  48. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{124.gif → images/124.gif} +0 -0
  49. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{125.gif → images/125.gif} +0 -0
  50. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{126.gif → images/126.gif} +0 -0
  51. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{127.gif → images/127.gif} +0 -0
  52. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{128.gif → images/128.gif} +0 -0
  53. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{129.gif → images/129.gif} +0 -0
  54. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{13.gif → images/13.gif} +0 -0
  55. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{130.gif → images/130.gif} +0 -0
  56. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{131.gif → images/131.gif} +0 -0
  57. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{132.gif → images/132.gif} +0 -0
  58. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{133.gif → images/133.gif} +0 -0
  59. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{134.gif → images/134.gif} +0 -0
  60. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{14.gif → images/14.gif} +0 -0
  61. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{15.gif → images/15.gif} +0 -0
  62. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{16.gif → images/16.gif} +0 -0
  63. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{17.gif → images/17.gif} +0 -0
  64. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{18.gif → images/18.gif} +0 -0
  65. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{19.gif → images/19.gif} +0 -0
  66. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{2.gif → images/2.gif} +0 -0
  67. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{20.gif → images/20.gif} +0 -0
  68. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{21.gif → images/21.gif} +0 -0
  69. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{22.gif → images/22.gif} +0 -0
  70. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{23.gif → images/23.gif} +0 -0
  71. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{24.gif → images/24.gif} +0 -0
  72. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{25.gif → images/25.gif} +0 -0
  73. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{26.gif → images/26.gif} +0 -0
  74. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{27.gif → images/27.gif} +0 -0
  75. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{28.gif → images/28.gif} +0 -0
  76. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{29.gif → images/29.gif} +0 -0
  77. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{3.gif → images/3.gif} +0 -0
  78. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{30.gif → images/30.gif} +0 -0
  79. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{31.gif → images/31.gif} +0 -0
  80. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{32.gif → images/32.gif} +0 -0
  81. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{33.gif → images/33.gif} +0 -0
  82. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{34.gif → images/34.gif} +0 -0
  83. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{35.gif → images/35.gif} +0 -0
  84. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{36.gif → images/36.gif} +0 -0
  85. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{37.gif → images/37.gif} +0 -0
  86. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{38.gif → images/38.gif} +0 -0
  87. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{39.gif → images/39.gif} +0 -0
  88. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{4.gif → images/4.gif} +0 -0
  89. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{40.gif → images/40.gif} +0 -0
  90. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{41.gif → images/41.gif} +0 -0
  91. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{42.gif → images/42.gif} +0 -0
  92. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{43.gif → images/43.gif} +0 -0
  93. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{44.gif → images/44.gif} +0 -0
  94. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{45.gif → images/45.gif} +0 -0
  95. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{46.gif → images/46.gif} +0 -0
  96. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{47.gif → images/47.gif} +0 -0
  97. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{48.gif → images/48.gif} +0 -0
  98. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{49.gif → images/49.gif} +0 -0
  99. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{5.gif → images/5.gif} +0 -0
  100. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{50.gif → images/50.gif} +0 -0
  101. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{51.gif → images/51.gif} +0 -0
  102. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{52.gif → images/52.gif} +0 -0
  103. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{53.gif → images/53.gif} +0 -0
  104. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{54.gif → images/54.gif} +0 -0
  105. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{55.gif → images/55.gif} +0 -0
  106. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{56.gif → images/56.gif} +0 -0
  107. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{57.gif → images/57.gif} +0 -0
  108. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{58.gif → images/58.gif} +0 -0
  109. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{59.gif → images/59.gif} +0 -0
  110. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{6.gif → images/6.gif} +0 -0
  111. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{60.gif → images/60.gif} +0 -0
  112. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{61.gif → images/61.gif} +0 -0
  113. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{62.gif → images/62.gif} +0 -0
  114. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{63.gif → images/63.gif} +0 -0
  115. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{64.gif → images/64.gif} +0 -0
  116. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{65.gif → images/65.gif} +0 -0
  117. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{66.gif → images/66.gif} +0 -0
  118. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{67.gif → images/67.gif} +0 -0
  119. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{68.gif → images/68.gif} +0 -0
  120. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{69.gif → images/69.gif} +0 -0
  121. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{7.gif → images/7.gif} +0 -0
  122. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{70.gif → images/70.gif} +0 -0
  123. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{71.gif → images/71.gif} +0 -0
  124. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{72.gif → images/72.gif} +0 -0
  125. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{73.gif → images/73.gif} +0 -0
  126. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{74.gif → images/74.gif} +0 -0
  127. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{75.gif → images/75.gif} +0 -0
  128. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{76.gif → images/76.gif} +0 -0
  129. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{77.gif → images/77.gif} +0 -0
  130. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{78.gif → images/78.gif} +0 -0
  131. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{79.gif → images/79.gif} +0 -0
  132. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{8.gif → images/8.gif} +0 -0
  133. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{80.gif → images/80.gif} +0 -0
  134. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{81.gif → images/81.gif} +0 -0
  135. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{82.gif → images/82.gif} +0 -0
  136. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{83.gif → images/83.gif} +0 -0
  137. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{84.gif → images/84.gif} +0 -0
  138. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{85.gif → images/85.gif} +0 -0
  139. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{86.gif → images/86.gif} +0 -0
  140. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{87.gif → images/87.gif} +0 -0
  141. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{88.gif → images/88.gif} +0 -0
  142. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{89.gif → images/89.gif} +0 -0
  143. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{9.gif → images/9.gif} +0 -0
  144. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{90.gif → images/90.gif} +0 -0
  145. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{91.gif → images/91.gif} +0 -0
  146. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{92.gif → images/92.gif} +0 -0
  147. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{93.gif → images/93.gif} +0 -0
  148. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{94.gif → images/94.gif} +0 -0
  149. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{95.gif → images/95.gif} +0 -0
  150. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{96.gif → images/96.gif} +0 -0
  151. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{97.gif → images/97.gif} +0 -0
  152. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{98.gif → images/98.gif} +0 -0
  153. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{99.gif → images/99.gif} +0 -0
  154. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/{qq.gif → images/static.gif} +0 -0
  155. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/filemanager/filemanager.js +189 -0
  156. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/{file_manager → filemanager}/images/file-16.gif +0 -0
  157. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/{file_manager → filemanager}/images/file-64.gif +0 -0
  158. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/{file_manager → filemanager}/images/folder-16.gif +0 -0
  159. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/{file_manager → filemanager}/images/folder-64.gif +0 -0
  160. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/{file_manager → filemanager}/images/go-up.gif +0 -0
  161. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/flash/flash.js +128 -0
  162. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/image.js +226 -0
  163. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/insertfile/insertfile.js +104 -0
  164. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/lineheight/lineheight.js +38 -0
  165. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/link/link.js +59 -0
  166. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/map/map.html +57 -0
  167. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/map/map.js +135 -0
  168. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/media/media.js +136 -0
  169. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/pagebreak/pagebreak.js +26 -0
  170. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/plainpaste/plainpaste.js +41 -0
  171. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/preview/preview.js +31 -0
  172. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/quickformat/quickformat.js +71 -0
  173. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/table/table.js +661 -0
  174. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/template/html/1.html +14 -0
  175. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/template/html/2.html +42 -0
  176. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/template/html/3.html +36 -0
  177. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/template/template.js +58 -0
  178. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/wordpaste/wordpaste.js +57 -0
  179. data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes}/common/blank.gif +0 -0
  180. data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes}/common/flash.gif +0 -0
  181. data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes}/common/loading.gif +0 -0
  182. data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes}/common/media.gif +0 -0
  183. data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes}/common/rm.gif +0 -0
  184. data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes}/default/bg.gif +0 -0
  185. data/lib/generators/rails_kindeditor/install/templates/kindeditor/{skins → themes/default}/default.css +427 -396
  186. data/lib/generators/rails_kindeditor/install/templates/kindeditor/themes/default/default.gif +0 -0
  187. data/lib/generators/rails_kindeditor/install/templates/kindeditor/themes/simple/simple.css +148 -0
  188. data/lib/generators/rails_kindeditor/migration/migration_generator.rb +16 -3
  189. data/{app/models → lib/generators/rails_kindeditor/migration/templates/models/active_record}/kindeditor/asset.rb +2 -5
  190. data/{app/models → lib/generators/rails_kindeditor/migration/templates/models/active_record}/kindeditor/file.rb +1 -2
  191. data/lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/flash.rb +3 -0
  192. data/{app/models → lib/generators/rails_kindeditor/migration/templates/models/active_record}/kindeditor/image.rb +1 -2
  193. data/lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/media.rb +3 -0
  194. data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/asset.rb +20 -0
  195. data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/file.rb +3 -0
  196. data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/flash.rb +3 -0
  197. data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/image.rb +3 -0
  198. data/lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/media.rb +3 -0
  199. data/lib/rails_kindeditor/helper.rb +14 -2
  200. data/lib/rails_kindeditor/version.rb +1 -1
  201. data/rails_kindeditor.gemspec +3 -3
  202. metadata +199 -182
  203. data/lib/generators/rails_kindeditor/install/templates/kindeditor/kindeditor.js +0 -4688
  204. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/about.html +0 -52
  205. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/accessory.html +0 -74
  206. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/advtable/advtable.html +0 -235
  207. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/advtable/cell.html +0 -201
  208. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/file_manager.css +0 -64
  209. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/file_manager.html +0 -31
  210. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/file_manager.js +0 -221
  211. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/flash.html +0 -69
  212. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/image.html +0 -305
  213. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/link/link.html +0 -82
  214. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/media.html +0 -73
  215. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/plainpaste.html +0 -44
  216. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/wordpaste.html +0 -50
  217. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/doc.gif +0 -0
  218. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/editor.css +0 -47
  219. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/mp3.gif +0 -0
  220. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/pdf.gif +0 -0
  221. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/rar.gif +0 -0
  222. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/xls.gif +0 -0
  223. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/default/default.gif +0 -0
@@ -0,0 +1,210 @@
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 : 'HTML代码',
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
+ flash : 'Flash',
43
+ media : '视音频',
44
+ table : '表格',
45
+ tablecell : '单元格',
46
+ hr : '插入横线',
47
+ emoticons : '插入表情',
48
+ link : '超级链接',
49
+ unlink : '取消超级链接',
50
+ fullscreen : '全屏显示(Esc)',
51
+ about : '关于',
52
+ print : '打印(Ctrl+P)',
53
+ filemanager : '浏览服务器',
54
+ code : '插入程序代码',
55
+ map : 'Google地图',
56
+ lineheight : '行距',
57
+ clearhtml : '清理HTML代码',
58
+ pagebreak : '插入分页符',
59
+ quickformat : '一键排版',
60
+ insertfile : '插入文件',
61
+ template : '插入模板',
62
+ yes : '确定',
63
+ no : '取消',
64
+ close : '关闭',
65
+ editImage : '图片属性',
66
+ deleteImage : '删除图片',
67
+ editFlash : 'Flash属性',
68
+ deleteFlash : '删除Flash',
69
+ editMedia : '视音频属性',
70
+ deleteMedia : '删除视音频',
71
+ editLink : '超级链接属性',
72
+ deleteLink : '取消超级链接',
73
+ tableprop : '表格属性',
74
+ tablecellprop : '单元格属性',
75
+ tableinsert : '插入表格',
76
+ tabledelete : '删除表格',
77
+ tablecolinsertleft : '左侧插入列',
78
+ tablecolinsertright : '右侧插入列',
79
+ tablerowinsertabove : '上方插入行',
80
+ tablerowinsertbelow : '下方插入行',
81
+ tablerowmerge : '向下合并单元格',
82
+ tablecolmerge : '向右合并单元格',
83
+ tablerowsplit : '拆分行',
84
+ tablecolsplit : '拆分列',
85
+ tablecoldelete : '删除列',
86
+ tablerowdelete : '删除行',
87
+ noColor : '无颜色',
88
+ invalidImg : "请输入有效的URL地址。\n只允许jpg,gif,bmp,png格式。",
89
+ invalidMedia : "请输入有效的URL地址。\n只允许swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb格式。",
90
+ invalidWidth : "宽度必须为数字。",
91
+ invalidHeight : "高度必须为数字。",
92
+ invalidBorder : "边框必须为数字。",
93
+ invalidUrl : "请输入有效的URL地址。",
94
+ invalidRows : '行数为必选项,只允许输入大于0的数字。',
95
+ invalidCols : '列数为必选项,只允许输入大于0的数字。',
96
+ invalidPadding : '边距必须为数字。',
97
+ invalidSpacing : '间距必须为数字。',
98
+ invalidJson : '服务器发生故障。',
99
+ uploadSuccess : '上传成功。',
100
+ cutError : '您的浏览器安全设置不允许使用剪切操作,请使用快捷键(Ctrl+X)来完成。',
101
+ copyError : '您的浏览器安全设置不允许使用复制操作,请使用快捷键(Ctrl+C)来完成。',
102
+ pasteError : '您的浏览器安全设置不允许使用粘贴操作,请使用快捷键(Ctrl+V)来完成。',
103
+ 'plainpaste.comment' : '请使用快捷键(Ctrl+V)把内容粘贴到下面的方框里。',
104
+ 'wordpaste.comment' : '请使用快捷键(Ctrl+V)把内容粘贴到下面的方框里。',
105
+ 'link.url' : 'URL',
106
+ 'link.linkType' : '打开类型',
107
+ 'link.newWindow' : '新窗口',
108
+ 'link.selfWindow' : '当前窗口',
109
+ 'flash.url' : 'URL',
110
+ 'flash.width' : '宽度',
111
+ 'flash.height' : '高度',
112
+ 'flash.upload' : '上传',
113
+ 'flash.viewServer' : '浏览',
114
+ 'media.url' : 'URL',
115
+ 'media.width' : '宽度',
116
+ 'media.height' : '高度',
117
+ 'media.autostart' : '自动播放',
118
+ 'media.upload' : '上传',
119
+ 'media.viewServer' : '浏览',
120
+ 'image.remoteImage' : '远程图片',
121
+ 'image.localImage' : '本地上传',
122
+ 'image.remoteUrl' : '图片地址',
123
+ 'image.localUrl' : '图片地址',
124
+ 'image.size' : '图片大小',
125
+ 'image.width' : '宽',
126
+ 'image.height' : '高',
127
+ 'image.resetSize' : '重置大小',
128
+ 'image.align' : '对齐方式',
129
+ 'image.defaultAlign' : '默认方式',
130
+ 'image.leftAlign' : '左对齐',
131
+ 'image.rightAlign' : '右对齐',
132
+ 'image.imgTitle' : '图片说明',
133
+ 'image.viewServer' : '浏览...',
134
+ 'filemanager.emptyFolder' : '空文件夹',
135
+ 'filemanager.moveup' : '移到上一级文件夹',
136
+ 'filemanager.viewType' : '显示方式:',
137
+ 'filemanager.viewImage' : '缩略图',
138
+ 'filemanager.listImage' : '详细信息',
139
+ 'filemanager.orderType' : '排序方式:',
140
+ 'filemanager.fileName' : '名称',
141
+ 'filemanager.fileSize' : '大小',
142
+ 'filemanager.fileType' : '类型',
143
+ 'insertfile.url' : 'URL',
144
+ 'insertfile.title' : '文件说明',
145
+ 'insertfile.upload' : '上传',
146
+ 'insertfile.viewServer' : '浏览',
147
+ 'table.cells' : '单元格数',
148
+ 'table.rows' : '行数',
149
+ 'table.cols' : '列数',
150
+ 'table.size' : '大小',
151
+ 'table.width' : '宽度',
152
+ 'table.height' : '高度',
153
+ 'table.percent' : '%',
154
+ 'table.px' : 'px',
155
+ 'table.space' : '边距间距',
156
+ 'table.padding' : '边距',
157
+ 'table.spacing' : '间距',
158
+ 'table.align' : '对齐方式',
159
+ 'table.textAlign' : '水平对齐',
160
+ 'table.verticalAlign' : '垂直对齐',
161
+ 'table.alignDefault' : '默认',
162
+ 'table.alignLeft' : '左对齐',
163
+ 'table.alignCenter' : '居中',
164
+ 'table.alignRight' : '右对齐',
165
+ 'table.alignTop' : '顶部',
166
+ 'table.alignMiddle' : '中部',
167
+ 'table.alignBottom' : '底部',
168
+ 'table.alignBaseline' : '基线',
169
+ 'table.border' : '边框',
170
+ 'table.borderWidth' : '边框',
171
+ 'table.borderColor' : '颜色',
172
+ 'table.backgroundColor' : '背景颜色',
173
+ 'map.address' : '地址: ',
174
+ 'map.search' : '搜索',
175
+ 'formatblock.formatBlock' : {
176
+ h1 : '标题 1',
177
+ h2 : '标题 2',
178
+ h3 : '标题 3',
179
+ h4 : '标题 4',
180
+ p : '正 文'
181
+ },
182
+ 'fontname.fontName' : {
183
+ 'SimSun' : '宋体',
184
+ 'NSimSun' : '新宋体',
185
+ 'FangSong_GB2312' : '仿宋_GB2312',
186
+ 'KaiTi_GB2312' : '楷体_GB2312',
187
+ 'SimHei' : '黑体',
188
+ 'Microsoft YaHei' : '微软雅黑',
189
+ 'Arial' : 'Arial',
190
+ 'Arial Black' : 'Arial Black',
191
+ 'Times New Roman' : 'Times New Roman',
192
+ 'Courier New' : 'Courier New',
193
+ 'Tahoma' : 'Tahoma',
194
+ 'Verdana' : 'Verdana'
195
+ },
196
+ 'lineheight.lineHeight' : [
197
+ {'1' : '单倍行距'},
198
+ {'1.5' : '1.5倍行距'},
199
+ {'2' : '2倍行距'},
200
+ {'2.5' : '2.5倍行距'},
201
+ {'3' : '3倍行距'}
202
+ ],
203
+ 'template.selectTemplate' : '可选模板',
204
+ 'template.replaceContent' : '替换当前内容',
205
+ 'template.fileList' : {
206
+ '1.html' : '图片和文字',
207
+ '2.html' : '表格',
208
+ '3.html' : '项目编号'
209
+ }
210
+ }, 'zh_CN');
@@ -0,0 +1,210 @@
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
+ flash : 'Flash',
43
+ media : '多媒體',
44
+ table : '表格',
45
+ hr : '插入水平線',
46
+ emoticons : '插入表情',
47
+ link : '超連結',
48
+ unlink : '移除超連結',
49
+ fullscreen : '最大化',
50
+ about : '關於',
51
+ print : '列印(Ctrl+P)',
52
+ fileManager : '瀏覽伺服器',
53
+ code : '插入程式代碼',
54
+ map : 'Google地圖',
55
+ lineheight : '行距',
56
+ clearhtml : '清理HTML代碼',
57
+ pagebreak : '插入分頁符號',
58
+ quickformat : '快速排版',
59
+ insertfile : '插入文件',
60
+ template : '插入樣板',
61
+ yes : '確定',
62
+ no : '取消',
63
+ close : '關閉',
64
+ editImage : '影像屬性',
65
+ deleteImage : '刪除影像',
66
+ editFlash : 'Flash屬性',
67
+ deleteFlash : '删除Flash',
68
+ editMedia : '多媒體屬性',
69
+ deleteMedia : '删除多媒體',
70
+ editLink : '超連結屬性',
71
+ deleteLink : '移除超連結',
72
+ tableprop : '表格屬性',
73
+ tablecellprop : '儲存格屬性',
74
+ tableinsert : '插入表格',
75
+ tabledelete : '刪除表格',
76
+ tablecolinsertleft : '向左插入列',
77
+ tablecolinsertright : '向右插入列',
78
+ tablerowinsertabove : '向上插入欄',
79
+ tablerowinsertbelow : '下方插入欄',
80
+ tablerowmerge : '向下合併單元格',
81
+ tablecolmerge : '向右合併單元格',
82
+ tablerowsplit : '分割欄',
83
+ tablecolsplit : '分割列',
84
+ tablecoldelete : '删除列',
85
+ tablerowdelete : '删除欄',
86
+ noColor : '自動',
87
+ invalidImg : "請輸入有效的URL。\n只允許jpg,gif,bmp,png格式。",
88
+ invalidMedia : "請輸入有效的URL。\n只允許swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb格式。",
89
+ invalidWidth : "寬度必須是數字。",
90
+ invalidHeight : "高度必須是數字。",
91
+ invalidBorder : "邊框必須是數字。",
92
+ invalidUrl : "請輸入有效的URL。",
93
+ invalidRows : '欄數是必須輸入項目,只允許輸入大於0的數字。',
94
+ invalidCols : '列數是必須輸入項目,只允許輸入大於0的數字。',
95
+ invalidPadding : '內距必須是數字。',
96
+ invalidSpacing : '間距必須是數字。',
97
+ invalidBorder : '边框必须为数字。',
98
+ pleaseInput : "請輸入內容。",
99
+ invalidJson : '伺服器發生故障。',
100
+ cutError : '您的瀏覽器安全設置不允許使用剪下操作,請使用快捷鍵(Ctrl+X)完成。',
101
+ copyError : '您的瀏覽器安全設置不允許使用剪下操作,請使用快捷鍵(Ctrl+C)完成。',
102
+ pasteError : '您的瀏覽器安全設置不允許使用剪下操作,請使用快捷鍵(Ctrl+V)完成。',
103
+ 'plainpaste.comment' : '請使用快捷鍵(Ctrl+V)把內容貼到下方區域裡。',
104
+ 'wordpaste.comment' : '請使用快捷鍵(Ctrl+V)把內容貼到下方區域裡。',
105
+ 'link.url' : 'URL',
106
+ 'link.linkType' : '打開類型',
107
+ 'link.newWindow' : '新窗口',
108
+ 'link.selfWindow' : '本頁窗口',
109
+ 'flash.url' : 'URL',
110
+ 'flash.width' : '寬度',
111
+ 'flash.height' : '高度',
112
+ 'flash.upload' : '上傳',
113
+ 'flash.viewServer' : '瀏覽',
114
+ 'media.url' : 'URL',
115
+ 'media.width' : '寬度',
116
+ 'media.height' : '高度',
117
+ 'media.autostart' : '自動播放',
118
+ 'media.upload' : '上傳',
119
+ 'media.viewServer' : '瀏覽',
120
+ 'image.remoteImage' : '影像URL',
121
+ 'image.localImage' : '上傳影像',
122
+ 'image.remoteUrl' : '影像URL',
123
+ 'image.localUrl' : '影像URL',
124
+ 'image.size' : '影像大小',
125
+ 'image.width' : '寬度',
126
+ 'image.height' : '高度',
127
+ 'image.resetSize' : '原始大小',
128
+ 'image.align' : '對齊方式',
129
+ 'image.defaultAlign' : '未設定',
130
+ 'image.leftAlign' : '向左對齊',
131
+ 'image.rightAlign' : '向右對齊',
132
+ 'image.imgTitle' : '影像說明',
133
+ 'image.viewServer' : '瀏覽...',
134
+ 'filemanager.emptyFolder' : '空文件夾',
135
+ 'filemanager.moveup' : '至上一級文件夾',
136
+ 'filemanager.viewType' : '顯示方式:',
137
+ 'filemanager.viewImage' : '縮略圖',
138
+ 'filemanager.listImage' : '詳細信息',
139
+ 'filemanager.orderType' : '排序方式:',
140
+ 'filemanager.fileName' : '名稱',
141
+ 'filemanager.fileSize' : '大小',
142
+ 'filemanager.fileType' : '類型',
143
+ 'insertfile.url' : 'URL',
144
+ 'insertfile.title' : '文件說明',
145
+ 'insertfile.upload' : '上傳',
146
+ 'insertfile.viewServer' : '瀏覽',
147
+ 'table.cells' : '儲存格數',
148
+ 'table.rows' : '欄數',
149
+ 'table.cols' : '列數',
150
+ 'table.size' : '表格大小',
151
+ 'table.width' : '寬度',
152
+ 'table.height' : '高度',
153
+ 'table.percent' : '%',
154
+ 'table.px' : 'px',
155
+ 'table.space' : '內距間距',
156
+ 'table.padding' : '內距',
157
+ 'table.spacing' : '間距',
158
+ 'table.align' : '對齊方式',
159
+ 'table.textAlign' : '水平對齊',
160
+ 'table.verticalAlign' : '垂直對齊',
161
+ 'table.alignDefault' : '未設定',
162
+ 'table.alignLeft' : '向左對齊',
163
+ 'table.alignCenter' : '置中',
164
+ 'table.alignRight' : '向右對齊',
165
+ 'table.alignTop' : '靠上',
166
+ 'table.alignMiddle' : '置中',
167
+ 'table.alignBottom' : '靠下',
168
+ 'table.alignBaseline' : '基線',
169
+ 'table.border' : '表格邊框',
170
+ 'table.borderWidth' : '邊框',
171
+ 'table.borderColor' : '顏色',
172
+ 'table.backgroundColor' : '背景顏色',
173
+ 'map.address' : '住所: ',
174
+ 'map.search' : '尋找',
175
+ 'formatblock.formatBlock' : {
176
+ h1 : '標題 1',
177
+ h2 : '標題 2',
178
+ h3 : '標題 3',
179
+ h4 : '標題 4',
180
+ p : '一般'
181
+ },
182
+ 'fontname.fontName' : {
183
+ 'MingLiU' : '細明體',
184
+ 'PMingLiU' : '新細明體',
185
+ 'DFKai-SB' : '標楷體',
186
+ 'SimSun' : '宋體',
187
+ 'NSimSun' : '新宋體',
188
+ 'FangSong' : '仿宋體',
189
+ 'Arial' : 'Arial',
190
+ 'Arial Black' : 'Arial Black',
191
+ 'Times New Roman' : 'Times New Roman',
192
+ 'Courier New' : 'Courier New',
193
+ 'Tahoma' : 'Tahoma',
194
+ 'Verdana' : 'Verdana'
195
+ },
196
+ 'lineheight.lineHeight' : [
197
+ {'1' : '单倍行距'},
198
+ {'1.5' : '1.5倍行距'},
199
+ {'2' : '2倍行距'},
200
+ {'2.5' : '2.5倍行距'},
201
+ {'3' : '3倍行距'}
202
+ ],
203
+ 'template.selectTemplate' : '可選樣板',
204
+ 'template.replaceContent' : '取代當前內容',
205
+ 'template.fileList' : {
206
+ '1.html' : '影像和文字',
207
+ '2.html' : '表格',
208
+ '3.html' : '项目清單'
209
+ }
210
+ }, 'zh_TW');
@@ -0,0 +1,28 @@
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('clearhtml', function(K) {
11
+ var self = this, name = 'clearhtml';
12
+ self.clickToolbar(name, function() {
13
+ self.focus();
14
+ var html = self.html();
15
+ html = html.replace(/(<script[^>]*>)([\s\S]*?)(<\/script>)/ig, '');
16
+ html = html.replace(/(<style[^>]*>)([\s\S]*?)(<\/style>)/ig, '');
17
+ html = K.formatHtml(html, {
18
+ a : ['href', 'target'],
19
+ embed : ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
20
+ img : ['src', 'width', 'height', 'border', 'alt', 'title', '.width', '.height'],
21
+ table : ['border'],
22
+ 'div,td,th,hr,br,tbody,tr,p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : []
23
+ });
24
+ self.html(html);
25
+ self.cmd.selection(true);
26
+ self.addBookmark();
27
+ });
28
+ });
@@ -0,0 +1,57 @@
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
+ // google code prettify: http://google-code-prettify.googlecode.com/
11
+ // http://google-code-prettify.googlecode.com/
12
+
13
+ KindEditor.plugin('code', function(K) {
14
+ var self = this, name = 'code';
15
+ self.clickToolbar(name, function() {
16
+ var lang = self.lang(name + '.'),
17
+ html = ['<div style="padding:10px 20px;">',
18
+ '<div class="ke-dialog-row">',
19
+ '<select class="ke-code-type">',
20
+ '<option value="js">JavaScript</option>',
21
+ '<option value="html">HTML</option>',
22
+ '<option value="css">CSS</option>',
23
+ '<option value="php">PHP</option>',
24
+ '<option value="pl">Perl</option>',
25
+ '<option value="py">Python</option>',
26
+ '<option value="rb">Ruby</option>',
27
+ '<option value="java">Java</option>',
28
+ '<option value="vb">ASP/VB</option>',
29
+ '<option value="cpp">C/C++</option>',
30
+ '<option value="cs">C#</option>',
31
+ '<option value="xml">XML</option>',
32
+ '<option value="bsh">Shell</option>',
33
+ '<option value="">Other</option>',
34
+ '</select>',
35
+ '</div>',
36
+ '<textarea class="ke-textarea" style="width:408px;height:260px;"></textarea>',
37
+ '</div>'].join(''),
38
+ dialog = self.createDialog({
39
+ name : name,
40
+ width : 450,
41
+ title : self.lang(name),
42
+ body : html,
43
+ yesBtn : {
44
+ name : self.lang('yes'),
45
+ click : function(e) {
46
+ var type = K('.ke-code-type', dialog.div).val(),
47
+ code = textarea.val(),
48
+ cls = type === '' ? '' : ' lang-' + type,
49
+ html = '<pre class="prettyprint' + cls + '">\n' + K.escape(code) + '</pre> ';
50
+ self.insertHtml(html).hideDialog().focus();
51
+ }
52
+ }
53
+ }),
54
+ textarea = K('textarea', dialog.div);
55
+ textarea[0].focus();
56
+ });
57
+ });
@@ -0,0 +1,13 @@
1
+ .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
2
+
3
+ pre.prettyprint {
4
+ border: 0;
5
+ border-left: 3px solid rgb(204, 204, 204);
6
+ margin-left: 2em;
7
+ padding: 0.5em;
8
+ font-size: 110%;
9
+ display: block;
10
+ font-family: "Consolas", "Monaco", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
11
+ margin: 1em 0px;
12
+ white-space: pre;
13
+ }
@@ -0,0 +1,28 @@
1
+ var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
2
+ (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
3
+ [],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
4
+ f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
5
+ (j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
6
+ {b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
7
+ t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
8
+ "string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
9
+ l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
10
+ q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
11
+ q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
12
+ "");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
13
+ a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
14
+ for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
15
+ m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
16
+ a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
17
+ j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
18
+ "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
19
+ H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
20
+ J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
21
+ I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
22
+ ["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
23
+ /^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
24
+ ["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
25
+ hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
26
+ !k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
27
+ 250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
28
+ PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();