glebtv-ckeditor 4.6.0 → 4.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (456) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +15 -22
  3. data/MIT-LICENSE +0 -0
  4. data/README.md +2 -325
  5. data/Rakefile +1 -2
  6. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_add.jpg +0 -0
  7. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_add.png +0 -0
  8. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_del.png +0 -0
  9. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_more.gif +0 -0
  10. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/preloader.gif +0 -0
  11. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/avi.gif +0 -0
  12. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/ckfnothumb.gif +0 -0
  13. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/doc.gif +0 -0
  14. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/docx.gif +0 -0
  15. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/exe.gif +0 -0
  16. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/gz.gif +0 -0
  17. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/htm.gif +0 -0
  18. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/jpg.gif +0 -0
  19. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/mp3.gif +0 -0
  20. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/mpg.gif +0 -0
  21. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/pdf.gif +0 -0
  22. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/psd.gif +0 -0
  23. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/rar.gif +0 -0
  24. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/swf.gif +0 -0
  25. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/tar.gif +0 -0
  26. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/txt.gif +0 -0
  27. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/unknown.gif +0 -0
  28. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/wmv.gif +0 -0
  29. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/xls.gif +0 -0
  30. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/xlsx.gif +0 -0
  31. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/zip.gif +0 -0
  32. data/app/assets/javascripts/ckeditor/application.js +0 -0
  33. data/app/assets/javascripts/ckeditor/config.js.erb +1 -2
  34. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/{application.js.erb → application.js} +4 -6
  35. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/fileuploader.js +0 -0
  36. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +0 -0
  37. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.tmpl.min.js +0 -0
  38. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/rails.js +0 -0
  39. data/app/assets/javascripts/ckeditor/init.js.erb +0 -0
  40. data/app/assets/stylesheets/ckeditor/application.css +1 -1
  41. data/app/assets/stylesheets/ckeditor/filebrowser/uploader.scss +172 -0
  42. data/app/controllers/ckeditor/application_controller.rb +9 -10
  43. data/app/controllers/ckeditor/attachment_files_controller.rb +11 -12
  44. data/app/controllers/ckeditor/pictures_controller.rb +10 -12
  45. data/app/helpers/ckeditor/application_helper.rb +1 -10
  46. data/app/views/ckeditor/attachment_files/index.html.erb +5 -5
  47. data/app/views/ckeditor/pictures/index.html.erb +5 -5
  48. data/app/views/ckeditor/shared/_asset.html.erb +18 -21
  49. data/app/views/ckeditor/shared/_asset_tmpl.html.erb +17 -20
  50. data/app/views/layouts/ckeditor/application.html.erb +3 -3
  51. data/config/locales/en.ckeditor.yml +0 -0
  52. data/config/locales/ru.ckeditor.yml +0 -0
  53. data/config/routes.rb +2 -2
  54. data/lib/ckeditor.rb +42 -34
  55. data/lib/ckeditor/asset_response.rb +74 -25
  56. data/lib/ckeditor/backend/carrierwave.rb +8 -5
  57. data/lib/ckeditor/backend/dragonfly.rb +5 -3
  58. data/lib/ckeditor/backend/paperclip.rb +15 -22
  59. data/lib/ckeditor/backend/refile.rb +6 -4
  60. data/lib/ckeditor/helpers/controllers.rb +15 -20
  61. data/lib/ckeditor/helpers/form_builder.rb +1 -1
  62. data/lib/ckeditor/helpers/form_helper.rb +0 -0
  63. data/lib/ckeditor/helpers/view_helper.rb +0 -0
  64. data/lib/ckeditor/hooks/cancan.rb +0 -2
  65. data/lib/ckeditor/hooks/formtastic.rb +2 -2
  66. data/lib/ckeditor/hooks/pundit.rb +1 -4
  67. data/lib/ckeditor/hooks/simple_form.rb +9 -14
  68. data/lib/ckeditor/http.rb +9 -11
  69. data/lib/ckeditor/orm/active_record.rb +1 -3
  70. data/lib/ckeditor/orm/base.rb +5 -5
  71. data/lib/ckeditor/orm/mongoid.rb +4 -6
  72. data/lib/ckeditor/paginatable.rb +3 -1
  73. data/lib/ckeditor/rails.rb +39 -0
  74. data/lib/ckeditor/text_area.rb +16 -15
  75. data/lib/ckeditor/utils.rb +45 -39
  76. data/lib/ckeditor/utils/content_type_detector.rb +7 -10
  77. data/lib/ckeditor/utils/javascript_code.rb +8 -3
  78. data/lib/ckeditor/version.rb +2 -2
  79. data/lib/generators/ckeditor/install_generator.rb +52 -30
  80. data/lib/generators/ckeditor/pundit_policy_generator.rb +1 -3
  81. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +2 -2
  82. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +1 -1
  83. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +1 -1
  84. data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +6 -10
  85. data/lib/generators/ckeditor/templates/active_record/carrierwave/migration_versioned.rb +22 -0
  86. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb +1 -1
  87. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb +1 -1
  88. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb +4 -4
  89. data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +6 -10
  90. data/lib/generators/ckeditor/templates/active_record/dragonfly/migration_versioned.rb +23 -0
  91. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/asset.rb +0 -0
  92. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +3 -3
  93. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +5 -5
  94. data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +2 -5
  95. data/lib/generators/ckeditor/templates/active_record/paperclip/migration_versioned.rb +23 -0
  96. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/asset.rb +0 -0
  97. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/attachment_file.rb +0 -0
  98. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/picture.rb +0 -0
  99. data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +7 -12
  100. data/lib/generators/ckeditor/templates/active_record/refile/migration_versioned.rb +23 -0
  101. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +0 -0
  102. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +4 -4
  103. data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +4 -5
  104. data/lib/generators/ckeditor/templates/ckeditor.rb +16 -7
  105. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +2 -2
  106. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +1 -1
  107. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +1 -1
  108. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb +0 -0
  109. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb +5 -5
  110. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb +5 -5
  111. data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +2 -2
  112. data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +2 -2
  113. data/lib/glebtv-ckeditor.rb +0 -0
  114. data/lib/tasks/ckeditor.rake +6 -14
  115. data/test/controllers/attachment_files_controller_test.rb +0 -0
  116. data/test/controllers/pictures_controller_test.rb +0 -0
  117. data/test/dummy/Rakefile +0 -0
  118. data/test/dummy/app/assets/javascripts/application.js +0 -0
  119. data/test/dummy/app/assets/stylesheets/application.css +0 -0
  120. data/test/dummy/app/assets/stylesheets/scaffold.css +0 -0
  121. data/test/dummy/app/controllers/application_controller.rb +0 -0
  122. data/test/dummy/app/controllers/posts_controller.rb +0 -0
  123. data/test/dummy/app/helpers/application_helper.rb +0 -0
  124. data/test/dummy/app/helpers/posts_helper.rb +0 -0
  125. data/test/dummy/app/models/post.rb +0 -0
  126. data/test/dummy/app/views/layouts/application.html.erb +0 -0
  127. data/test/dummy/app/views/posts/_form.html.erb +0 -0
  128. data/test/dummy/app/views/posts/edit.html.erb +0 -0
  129. data/test/dummy/app/views/posts/index.html.erb +0 -0
  130. data/test/dummy/app/views/posts/new.html.erb +0 -0
  131. data/test/dummy/app/views/posts/show.html.erb +0 -0
  132. data/test/dummy/config.ru +0 -0
  133. data/test/dummy/config/application.rb +0 -0
  134. data/test/dummy/config/boot.rb +0 -0
  135. data/test/dummy/config/database.yml +0 -0
  136. data/test/dummy/config/environment.rb +0 -0
  137. data/test/dummy/config/environments/development.rb +0 -0
  138. data/test/dummy/config/environments/production.rb +0 -0
  139. data/test/dummy/config/environments/test.rb +0 -0
  140. data/test/dummy/config/initializers/assets.rb +1 -0
  141. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
  142. data/test/dummy/config/initializers/ckeditor.rb +0 -0
  143. data/test/dummy/config/initializers/cookies_serializer.rb +0 -0
  144. data/test/dummy/config/initializers/inflections.rb +0 -0
  145. data/test/dummy/config/initializers/mime_types.rb +0 -0
  146. data/test/dummy/config/initializers/paperclip.rb +3 -0
  147. data/test/dummy/config/initializers/session_store.rb +0 -0
  148. data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
  149. data/test/dummy/config/locales/en.yml +0 -0
  150. data/test/dummy/config/mongoid.yml +0 -0
  151. data/test/dummy/config/routes.rb +0 -0
  152. data/test/dummy/config/secrets.yml +0 -0
  153. data/test/dummy/db/migrate/20110623120047_create_posts.rb +0 -0
  154. data/test/dummy/public/404.html +0 -0
  155. data/test/dummy/public/422.html +0 -0
  156. data/test/dummy/public/500.html +0 -0
  157. data/test/dummy/public/favicon.ico +0 -0
  158. data/test/dummy/script/rails +0 -0
  159. data/test/dummy/test/fixtures/files/rails.png +0 -0
  160. data/test/dummy/test/fixtures/files/rails.tar.gz +0 -0
  161. data/test/functional/posts_controller_test.rb +2 -3
  162. data/test/generators/install_generator_test.rb +2 -2
  163. data/test/integration/navigation_test.rb +0 -0
  164. data/test/models/attachment_file_test.rb +3 -8
  165. data/test/models/ckeditor_test.rb +1 -1
  166. data/test/models/picture_test.rb +0 -0
  167. data/test/models/utils_test.rb +6 -6
  168. data/test/orm/active_record.rb +0 -0
  169. data/test/orm/mongoid.rb +0 -0
  170. data/test/support/helpers.rb +0 -0
  171. data/test/support/integration_case.rb +0 -0
  172. data/test/support/raw_post.rb +0 -0
  173. data/test/support/routes.txt +0 -0
  174. data/test/test_helper.rb +1 -1
  175. data/vendor/assets/javascripts/ckeditor/CHANGES.md +1358 -0
  176. data/vendor/assets/javascripts/ckeditor/README.md +39 -0
  177. data/vendor/assets/javascripts/ckeditor/build-config.js +31 -30
  178. data/vendor/assets/javascripts/ckeditor/ckeditor.js +709 -675
  179. data/vendor/assets/javascripts/ckeditor/config.js +10 -0
  180. data/vendor/assets/javascripts/ckeditor/contents.css +208 -0
  181. data/vendor/assets/javascripts/ckeditor/lang/en.js +4 -4
  182. data/vendor/assets/javascripts/ckeditor/lang/ru.js +4 -4
  183. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +5 -5
  184. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +3 -2
  185. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +3 -3
  186. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
  187. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -1
  188. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -1
  189. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
  190. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +6 -1
  191. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -1
  192. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -1
  193. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
  194. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -1
  195. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -0
  196. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +230 -74
  197. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/abcdef.css +1 -1
  198. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +1 -1
  199. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +1 -1
  200. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/colorforth.css +1 -1
  201. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/dracula.css +2 -3
  202. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-dark.css +1 -1
  203. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-light.css +1 -1
  204. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +1 -1
  205. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +1 -1
  206. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/icecoder.css +1 -1
  207. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +1 -1
  208. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/liquibyte.css +3 -3
  209. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/material.css +3 -3
  210. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mdn-like.css +1 -1
  211. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +0 -2
  212. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +1 -1
  213. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +1 -1
  214. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/panda-syntax.css +1 -1
  215. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +1 -1
  216. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +1 -1
  217. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/seti.css +1 -1
  218. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +1 -1
  219. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +1 -1
  220. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ttcn.css +1 -1
  221. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +1 -1
  222. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +1 -1
  223. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +1 -1
  224. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +1 -1
  225. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/yeti.css +1 -1
  226. data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +2 -2
  227. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +2 -2
  228. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +2 -2
  229. data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  230. data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
  231. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +1 -1
  232. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +4 -3
  233. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +23 -23
  234. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/hidpi/loremipsum.png +0 -0
  235. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/loremipsum.png +0 -0
  236. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/en.js +0 -0
  237. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/ru.js +2 -2
  238. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/plugin.js +2 -2
  239. data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +13 -7
  240. data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +49 -39
  241. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
  242. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +33 -19
  243. data/vendor/assets/javascripts/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +6 -1
  244. data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +1 -1
  245. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +4 -1
  246. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +92 -23
  247. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +81 -82
  248. data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon-hdpi.png +0 -0
  249. data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
  250. data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +2 -1
  251. data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +448 -448
  252. data/vendor/assets/javascripts/ckeditor/samples/css/samples.css +1632 -0
  253. data/vendor/assets/javascripts/ckeditor/samples/img/github-top.png +0 -0
  254. data/vendor/assets/javascripts/ckeditor/samples/img/header-bg.png +0 -0
  255. data/vendor/assets/javascripts/ckeditor/samples/img/header-separator.png +0 -0
  256. data/vendor/assets/javascripts/ckeditor/samples/img/logo.png +0 -0
  257. data/vendor/assets/javascripts/ckeditor/samples/img/navigation-tip.png +0 -0
  258. data/vendor/assets/javascripts/ckeditor/samples/index.html +128 -0
  259. data/vendor/assets/javascripts/ckeditor/samples/js/sample.js +53 -0
  260. data/vendor/assets/javascripts/ckeditor/samples/js/sf.js +17 -0
  261. data/vendor/assets/javascripts/ckeditor/samples/old/ajax.html +85 -0
  262. data/vendor/assets/javascripts/ckeditor/samples/old/api.html +210 -0
  263. data/vendor/assets/javascripts/ckeditor/samples/old/appendto.html +59 -0
  264. data/vendor/assets/javascripts/ckeditor/samples/old/assets/inlineall/logo.png +0 -0
  265. data/vendor/assets/javascripts/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css +204 -0
  266. data/vendor/assets/javascripts/ckeditor/samples/old/assets/posteddata.php +59 -0
  267. data/vendor/assets/javascripts/ckeditor/samples/old/assets/sample.jpg +0 -0
  268. data/vendor/assets/javascripts/ckeditor/samples/old/assets/uilanguages/languages.js +7 -0
  269. data/vendor/assets/javascripts/ckeditor/samples/old/datafiltering.html +508 -0
  270. data/vendor/assets/javascripts/ckeditor/samples/old/dialog/assets/my_dialog.js +48 -0
  271. data/vendor/assets/javascripts/ckeditor/samples/old/dialog/dialog.html +190 -0
  272. data/vendor/assets/javascripts/ckeditor/samples/old/divreplace.html +144 -0
  273. data/vendor/assets/javascripts/ckeditor/samples/old/enterkey/enterkey.html +106 -0
  274. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
  275. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
  276. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/swfobject.js +19 -0
  277. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputforflash.html +283 -0
  278. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputhtml.html +224 -0
  279. data/vendor/assets/javascripts/ckeditor/samples/old/index.html +131 -0
  280. data/vendor/assets/javascripts/ckeditor/samples/old/inlineall.html +314 -0
  281. data/vendor/assets/javascripts/ckeditor/samples/old/inlinebycode.html +124 -0
  282. data/vendor/assets/javascripts/ckeditor/samples/old/inlinetextarea.html +113 -0
  283. data/vendor/assets/javascripts/ckeditor/samples/old/jquery.html +103 -0
  284. data/vendor/assets/javascripts/ckeditor/samples/old/magicline/magicline.html +209 -0
  285. data/vendor/assets/javascripts/ckeditor/samples/old/readonly.html +76 -0
  286. data/vendor/assets/javascripts/ckeditor/samples/old/replacebyclass.html +60 -0
  287. data/vendor/assets/javascripts/ckeditor/samples/old/replacebycode.html +59 -0
  288. data/vendor/assets/javascripts/ckeditor/samples/old/sample.css +357 -0
  289. data/vendor/assets/javascripts/ckeditor/samples/old/sample.js +50 -0
  290. data/vendor/assets/javascripts/ckeditor/samples/old/sample_posteddata.php +16 -0
  291. data/vendor/assets/javascripts/ckeditor/samples/old/tabindex.html +78 -0
  292. data/vendor/assets/javascripts/ckeditor/samples/old/toolbar/toolbar.html +235 -0
  293. data/vendor/assets/javascripts/ckeditor/samples/old/uicolor.html +72 -0
  294. data/vendor/assets/javascripts/ckeditor/samples/old/uilanguages.html +122 -0
  295. data/vendor/assets/javascripts/ckeditor/samples/old/wysiwygarea/fullpage.html +80 -0
  296. data/vendor/assets/javascripts/ckeditor/samples/old/xhtmlstyle.html +234 -0
  297. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/css/fontello.css +55 -0
  298. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt +10 -0
  299. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/config.json +28 -0
  300. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.eot +0 -0
  301. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.svg +14 -0
  302. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.ttf +0 -0
  303. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.woff +0 -0
  304. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/index.html +446 -0
  305. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js +13 -0
  306. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js +9 -0
  307. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js +33 -0
  308. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js +14 -0
  309. data/vendor/assets/javascripts/ckeditor/{plugins/codemirror/LICENSE.md → samples/toolbarconfigurator/lib/codemirror/LICENSE} +19 -21
  310. data/vendor/assets/javascripts/ckeditor/{plugins/codemirror/css → samples/toolbarconfigurator/lib/codemirror}/codemirror.css +325 -341
  311. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.js +288 -0
  312. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/javascript.js +25 -0
  313. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css +36 -0
  314. data/vendor/assets/javascripts/ckeditor/{plugins/codemirror/js/addon/hint → samples/toolbarconfigurator/lib/codemirror}/show-hint.css +38 -36
  315. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.js +16 -0
  316. data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog.css +5 -0
  317. data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_ie.css +5 -0
  318. data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_ie7.css +5 -0
  319. data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_ie8.css +5 -0
  320. data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_iequirks.css +5 -0
  321. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor.css +5 -0
  322. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_gecko.css +5 -0
  323. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie.css +5 -0
  324. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie7.css +5 -0
  325. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie8.css +5 -0
  326. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_iequirks.css +5 -0
  327. data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons.png +0 -0
  328. data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons_hidpi.png +0 -0
  329. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/arrow.png +0 -0
  330. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/close.png +0 -0
  331. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/close.png +0 -0
  332. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/lock-open.png +0 -0
  333. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/lock.png +0 -0
  334. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/refresh.png +0 -0
  335. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/lock-open.png +0 -0
  336. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/lock.png +0 -0
  337. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/refresh.png +0 -0
  338. data/vendor/assets/javascripts/ckeditor/skins/minimalist/readme.md +7 -0
  339. data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons16.png +0 -0
  340. data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons16.svg +2374 -0
  341. data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons32.png +0 -0
  342. data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons32.svg +2722 -0
  343. data/vendor/assets/javascripts/ckeditor/skins/moono/dev/locations.json +145 -0
  344. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +1 -1
  345. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +1 -1
  346. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +1 -1
  347. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +1 -1
  348. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +1 -1
  349. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +1 -1
  350. data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
  351. data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
  352. data/vendor/assets/javascripts/ckeditor/skins/moono/skin.js +10 -0
  353. data/vendor/assets/javascripts/ckeditor/styles.js +1 -1
  354. metadata +182 -177
  355. data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.erb +0 -128
  356. data/app/views/rails_admin/main/_form_ck_editor.html.haml +0 -10
  357. data/app/views/rails_admin/main/_form_ck_editorml.html.haml +0 -11
  358. data/config/locales/bg.ckeditor.yml +0 -9
  359. data/config/locales/cs.ckeditor.yml +0 -9
  360. data/config/locales/de.ckeditor.yml +0 -9
  361. data/config/locales/el-GR.cdkeditor.yml +0 -9
  362. data/config/locales/es.ckeditor.yml +0 -9
  363. data/config/locales/fr.ckeditor.yml +0 -9
  364. data/config/locales/hu.ckeditor.yml +0 -9
  365. data/config/locales/it.ckeditor.yml +0 -9
  366. data/config/locales/ja.ckeditor.yml +0 -9
  367. data/config/locales/nb.ckeditor.yml +0 -9
  368. data/config/locales/nl.ckeditor.yml +0 -9
  369. data/config/locales/pl.ckeditor.yml +0 -9
  370. data/config/locales/pt-BR.ckeditor.yml +0 -9
  371. data/config/locales/pt-PT.ckeditor.yml +0 -9
  372. data/config/locales/sv-SE.ckeditor.yml +0 -9
  373. data/config/locales/tr.ckeditor.yml +0 -9
  374. data/config/locales/uk.ckeditor.yml +0 -9
  375. data/config/locales/zh-CN.ckeditor.yml +0 -9
  376. data/config/locales/zh-TW.ckeditor.yml +0 -9
  377. data/lib/ckeditor/engine.rb +0 -46
  378. data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +0 -12
  379. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.ckeditor.css +0 -183
  380. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/comment.js +0 -206
  381. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/continuecomment.js +0 -85
  382. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.css +0 -32
  383. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.js +0 -157
  384. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closebrackets.js +0 -202
  385. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closetag.js +0 -169
  386. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/continuelist.js +0 -51
  387. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchbrackets.js +0 -122
  388. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchtags.js +0 -66
  389. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/trailingspace.js +0 -27
  390. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/brace-fold.js +0 -105
  391. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/comment-fold.js +0 -59
  392. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldcode.js +0 -150
  393. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.css +0 -20
  394. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.js +0 -146
  395. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/indent-fold.js +0 -44
  396. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/markdown-fold.js +0 -49
  397. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/xml-fold.js +0 -182
  398. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/autoFormatAll.js +0 -43
  399. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/formatting.js +0 -226
  400. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/anyword-hint.js +0 -41
  401. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/css-hint.js +0 -60
  402. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/html-hint.js +0 -348
  403. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/javascript-hint.js +0 -155
  404. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/show-hint.js +0 -438
  405. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/sql-hint.js +0 -271
  406. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/xml-hint.js +0 -110
  407. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/loadmode.js +0 -64
  408. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex.js +0 -123
  409. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex_test.js +0 -33
  410. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/overlay.js +0 -85
  411. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/simple.js +0 -213
  412. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/jump-to-line.js +0 -49
  413. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/match-highlighter.js +0 -165
  414. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.css +0 -8
  415. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.js +0 -97
  416. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/search.js +0 -252
  417. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/searchcursor.js +0 -189
  418. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/active-line.js +0 -74
  419. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/mark-selection.js +0 -118
  420. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/selection-pointer.js +0 -98
  421. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify-html.js +0 -952
  422. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.js +0 -2087
  423. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.js +0 -9109
  424. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/bbcode.js +0 -137
  425. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/index.html +0 -73
  426. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/bbcodemixed.js +0 -161
  427. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/index.html +0 -128
  428. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/clike.js +0 -785
  429. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/index.html +0 -360
  430. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/scala.html +0 -767
  431. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/test.js +0 -55
  432. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/css.js +0 -825
  433. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss.html +0 -103
  434. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss_test.js +0 -17
  435. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/index.html +0 -75
  436. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less.html +0 -152
  437. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less_test.js +0 -54
  438. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss.html +0 -157
  439. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss_test.js +0 -110
  440. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/test.js +0 -200
  441. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/htmlembedded.js +0 -28
  442. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/index.html +0 -60
  443. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/htmlmixed.js +0 -152
  444. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/index.html +0 -89
  445. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/index.html +0 -114
  446. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/javascript.js +0 -784
  447. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/json-ld.html +0 -72
  448. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/test.js +0 -247
  449. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/typescript.html +0 -61
  450. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/index.html +0 -64
  451. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/php.js +0 -234
  452. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/test.js +0 -154
  453. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/index.html +0 -61
  454. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/test.js +0 -51
  455. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/xml.js +0 -394
  456. data/vendor/assets/javascripts/ckeditor/plugins/youtube/LICENSE.md +0 -15
@@ -1,72 +0,0 @@
1
- <!doctype html>
2
-
3
- <title>CodeMirror: JSON-LD mode</title>
4
- <meta charset="utf-8"/>
5
- <link rel=stylesheet href="../../doc/docs.css">
6
-
7
- <link rel="stylesheet" href="../../lib/codemirror.css">
8
- <script src="../../lib/codemirror.js"></script>
9
- <script src="../../addon/edit/matchbrackets.js"></script>
10
- <script src="../../addon/comment/continuecomment.js"></script>
11
- <script src="../../addon/comment/comment.js"></script>
12
- <script src="javascript.js"></script>
13
- <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
14
- <div id="nav">
15
- <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"/></a>
16
-
17
- <ul>
18
- <li><a href="../../index.html">Home</a>
19
- <li><a href="../../doc/manual.html">Manual</a>
20
- <li><a href="https://github.com/codemirror/codemirror">Code</a>
21
- </ul>
22
- <ul>
23
- <li><a href="../index.html">Language modes</a>
24
- <li><a class=active href="#">JSON-LD</a>
25
- </ul>
26
- </div>
27
-
28
- <article>
29
- <h2>JSON-LD mode</h2>
30
-
31
-
32
- <div><textarea id="code" name="code">
33
- {
34
- "@context": {
35
- "name": "http://schema.org/name",
36
- "description": "http://schema.org/description",
37
- "image": {
38
- "@id": "http://schema.org/image",
39
- "@type": "@id"
40
- },
41
- "geo": "http://schema.org/geo",
42
- "latitude": {
43
- "@id": "http://schema.org/latitude",
44
- "@type": "xsd:float"
45
- },
46
- "longitude": {
47
- "@id": "http://schema.org/longitude",
48
- "@type": "xsd:float"
49
- },
50
- "xsd": "http://www.w3.org/2001/XMLSchema#"
51
- },
52
- "name": "The Empire State Building",
53
- "description": "The Empire State Building is a 102-story landmark in New York City.",
54
- "image": "http://www.civil.usherbrooke.ca/cours/gci215a/empire-state-building.jpg",
55
- "geo": {
56
- "latitude": "40.75",
57
- "longitude": "73.98"
58
- }
59
- }
60
- </textarea></div>
61
-
62
- <script>
63
- var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
64
- matchBrackets: true,
65
- autoCloseBrackets: true,
66
- mode: "application/ld+json",
67
- lineWrapping: true
68
- });
69
- </script>
70
-
71
- <p>This is a specialization of the <a href="index.html">JavaScript mode</a>.</p>
72
- </article>
@@ -1,247 +0,0 @@
1
- // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
- // Distributed under an MIT license: http://codemirror.net/LICENSE
3
-
4
- (function() {
5
- var mode = CodeMirror.getMode({indentUnit: 2}, "javascript");
6
- function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
7
-
8
- MT("locals",
9
- "[keyword function] [def foo]([def a], [def b]) { [keyword var] [def c] [operator =] [number 10]; [keyword return] [variable-2 a] [operator +] [variable-2 c] [operator +] [variable d]; }");
10
-
11
- MT("comma-and-binop",
12
- "[keyword function](){ [keyword var] [def x] [operator =] [number 1] [operator +] [number 2], [def y]; }");
13
-
14
- MT("destructuring",
15
- "([keyword function]([def a], [[[def b], [def c] ]]) {",
16
- " [keyword let] {[def d], [property foo]: [def c][operator =][number 10], [def x]} [operator =] [variable foo]([variable-2 a]);",
17
- " [[[variable-2 c], [variable y] ]] [operator =] [variable-2 c];",
18
- "})();");
19
-
20
- MT("destructure_trailing_comma",
21
- "[keyword let] {[def a], [def b],} [operator =] [variable foo];",
22
- "[keyword let] [def c];"); // Parser still in good state?
23
-
24
- MT("class_body",
25
- "[keyword class] [def Foo] {",
26
- " [property constructor]() {}",
27
- " [property sayName]() {",
28
- " [keyword return] [string-2 `foo${][variable foo][string-2 }oo`];",
29
- " }",
30
- "}");
31
-
32
- MT("class",
33
- "[keyword class] [def Point] [keyword extends] [variable SuperThing] {",
34
- " [keyword get] [property prop]() { [keyword return] [number 24]; }",
35
- " [property constructor]([def x], [def y]) {",
36
- " [keyword super]([string 'something']);",
37
- " [keyword this].[property x] [operator =] [variable-2 x];",
38
- " }",
39
- "}");
40
-
41
- MT("anonymous_class_expression",
42
- "[keyword const] [def Adder] [operator =] [keyword class] [keyword extends] [variable Arithmetic] {",
43
- " [property add]([def a], [def b]) {}",
44
- "};");
45
-
46
- MT("named_class_expression",
47
- "[keyword const] [def Subber] [operator =] [keyword class] [def Subtract] {",
48
- " [property sub]([def a], [def b]) {}",
49
- "};");
50
-
51
- MT("import",
52
- "[keyword function] [def foo]() {",
53
- " [keyword import] [def $] [keyword from] [string 'jquery'];",
54
- " [keyword import] { [def encrypt], [def decrypt] } [keyword from] [string 'crypto'];",
55
- "}");
56
-
57
- MT("import_trailing_comma",
58
- "[keyword import] {[def foo], [def bar],} [keyword from] [string 'baz']")
59
-
60
- MT("const",
61
- "[keyword function] [def f]() {",
62
- " [keyword const] [[ [def a], [def b] ]] [operator =] [[ [number 1], [number 2] ]];",
63
- "}");
64
-
65
- MT("for/of",
66
- "[keyword for]([keyword let] [def of] [keyword of] [variable something]) {}");
67
-
68
- MT("generator",
69
- "[keyword function*] [def repeat]([def n]) {",
70
- " [keyword for]([keyword var] [def i] [operator =] [number 0]; [variable-2 i] [operator <] [variable-2 n]; [operator ++][variable-2 i])",
71
- " [keyword yield] [variable-2 i];",
72
- "}");
73
-
74
- MT("quotedStringAddition",
75
- "[keyword let] [def f] [operator =] [variable a] [operator +] [string 'fatarrow'] [operator +] [variable c];");
76
-
77
- MT("quotedFatArrow",
78
- "[keyword let] [def f] [operator =] [variable a] [operator +] [string '=>'] [operator +] [variable c];");
79
-
80
- MT("fatArrow",
81
- "[variable array].[property filter]([def a] [operator =>] [variable-2 a] [operator +] [number 1]);",
82
- "[variable a];", // No longer in scope
83
- "[keyword let] [def f] [operator =] ([[ [def a], [def b] ]], [def c]) [operator =>] [variable-2 a] [operator +] [variable-2 c];",
84
- "[variable c];");
85
-
86
- MT("spread",
87
- "[keyword function] [def f]([def a], [meta ...][def b]) {",
88
- " [variable something]([variable-2 a], [meta ...][variable-2 b]);",
89
- "}");
90
-
91
- MT("quasi",
92
- "[variable re][string-2 `fofdlakj${][variable x] [operator +] ([variable re][string-2 `foo`]) [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]");
93
-
94
- MT("quasi_no_function",
95
- "[variable x] [operator =] [string-2 `fofdlakj${][variable x] [operator +] [string-2 `foo`] [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]");
96
-
97
- MT("indent_statement",
98
- "[keyword var] [def x] [operator =] [number 10]",
99
- "[variable x] [operator +=] [variable y] [operator +]",
100
- " [atom Infinity]",
101
- "[keyword debugger];");
102
-
103
- MT("indent_if",
104
- "[keyword if] ([number 1])",
105
- " [keyword break];",
106
- "[keyword else] [keyword if] ([number 2])",
107
- " [keyword continue];",
108
- "[keyword else]",
109
- " [number 10];",
110
- "[keyword if] ([number 1]) {",
111
- " [keyword break];",
112
- "} [keyword else] [keyword if] ([number 2]) {",
113
- " [keyword continue];",
114
- "} [keyword else] {",
115
- " [number 10];",
116
- "}");
117
-
118
- MT("indent_for",
119
- "[keyword for] ([keyword var] [def i] [operator =] [number 0];",
120
- " [variable i] [operator <] [number 100];",
121
- " [variable i][operator ++])",
122
- " [variable doSomething]([variable i]);",
123
- "[keyword debugger];");
124
-
125
- MT("indent_c_style",
126
- "[keyword function] [def foo]()",
127
- "{",
128
- " [keyword debugger];",
129
- "}");
130
-
131
- MT("indent_else",
132
- "[keyword for] (;;)",
133
- " [keyword if] ([variable foo])",
134
- " [keyword if] ([variable bar])",
135
- " [number 1];",
136
- " [keyword else]",
137
- " [number 2];",
138
- " [keyword else]",
139
- " [number 3];");
140
-
141
- MT("indent_funarg",
142
- "[variable foo]([number 10000],",
143
- " [keyword function]([def a]) {",
144
- " [keyword debugger];",
145
- "};");
146
-
147
- MT("indent_below_if",
148
- "[keyword for] (;;)",
149
- " [keyword if] ([variable foo])",
150
- " [number 1];",
151
- "[number 2];");
152
-
153
- MT("indent_semicolonless_if",
154
- "[keyword function] [def foo]() {",
155
- " [keyword if] ([variable x])",
156
- " [variable foo]()",
157
- "}")
158
-
159
- MT("indent_semicolonless_if_with_statement",
160
- "[keyword function] [def foo]() {",
161
- " [keyword if] ([variable x])",
162
- " [variable foo]()",
163
- " [variable bar]()",
164
- "}")
165
-
166
- MT("multilinestring",
167
- "[keyword var] [def x] [operator =] [string 'foo\\]",
168
- "[string bar'];");
169
-
170
- MT("scary_regexp",
171
- "[string-2 /foo[[/]]bar/];");
172
-
173
- MT("indent_strange_array",
174
- "[keyword var] [def x] [operator =] [[",
175
- " [number 1],,",
176
- " [number 2],",
177
- "]];",
178
- "[number 10];");
179
-
180
- MT("param_default",
181
- "[keyword function] [def foo]([def x] [operator =] [string-2 `foo${][number 10][string-2 }bar`]) {",
182
- " [keyword return] [variable-2 x];",
183
- "}");
184
-
185
- MT("new_target",
186
- "[keyword function] [def F]([def target]) {",
187
- " [keyword if] ([variable-2 target] [operator &&] [keyword new].[keyword target].[property name]) {",
188
- " [keyword return] [keyword new]",
189
- " .[keyword target];",
190
- " }",
191
- "}");
192
-
193
- var ts_mode = CodeMirror.getMode({indentUnit: 2}, "application/typescript")
194
- function TS(name) {
195
- test.mode(name, ts_mode, Array.prototype.slice.call(arguments, 1))
196
- }
197
-
198
- TS("extend_type",
199
- "[keyword class] [def Foo] [keyword extends] [variable-3 Some][operator <][variable-3 Type][operator >] {}")
200
-
201
- TS("arrow_type",
202
- "[keyword let] [def x]: ([variable arg]: [variable-3 Type]) [operator =>] [variable-3 ReturnType]")
203
-
204
- TS("typescript_class",
205
- "[keyword class] [def Foo] {",
206
- " [keyword public] [keyword static] [property main]() {}",
207
- " [keyword private] [property _foo]: [variable-3 string];",
208
- "}")
209
-
210
- var jsonld_mode = CodeMirror.getMode(
211
- {indentUnit: 2},
212
- {name: "javascript", jsonld: true}
213
- );
214
- function LD(name) {
215
- test.mode(name, jsonld_mode, Array.prototype.slice.call(arguments, 1));
216
- }
217
-
218
- LD("json_ld_keywords",
219
- '{',
220
- ' [meta "@context"]: {',
221
- ' [meta "@base"]: [string "http://example.com"],',
222
- ' [meta "@vocab"]: [string "http://xmlns.com/foaf/0.1/"],',
223
- ' [property "likesFlavor"]: {',
224
- ' [meta "@container"]: [meta "@list"]',
225
- ' [meta "@reverse"]: [string "@beFavoriteOf"]',
226
- ' },',
227
- ' [property "nick"]: { [meta "@container"]: [meta "@set"] },',
228
- ' [property "nick"]: { [meta "@container"]: [meta "@index"] }',
229
- ' },',
230
- ' [meta "@graph"]: [[ {',
231
- ' [meta "@id"]: [string "http://dbpedia.org/resource/John_Lennon"],',
232
- ' [property "name"]: [string "John Lennon"],',
233
- ' [property "modified"]: {',
234
- ' [meta "@value"]: [string "2010-05-29T14:17:39+02:00"],',
235
- ' [meta "@type"]: [string "http://www.w3.org/2001/XMLSchema#dateTime"]',
236
- ' }',
237
- ' } ]]',
238
- '}');
239
-
240
- LD("json_ld_fake",
241
- '{',
242
- ' [property "@fake"]: [string "@fake"],',
243
- ' [property "@contextual"]: [string "@identifier"],',
244
- ' [property "user@domain.com"]: [string "@graphical"],',
245
- ' [property "@ID"]: [string "@@ID"]',
246
- '}');
247
- })();
@@ -1,61 +0,0 @@
1
- <!doctype html>
2
-
3
- <title>CodeMirror: TypeScript mode</title>
4
- <meta charset="utf-8"/>
5
- <link rel=stylesheet href="../../doc/docs.css">
6
-
7
- <link rel="stylesheet" href="../../lib/codemirror.css">
8
- <script src="../../lib/codemirror.js"></script>
9
- <script src="javascript.js"></script>
10
- <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
11
- <div id=nav>
12
- <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
13
-
14
- <ul>
15
- <li><a href="../../index.html">Home</a>
16
- <li><a href="../../doc/manual.html">Manual</a>
17
- <li><a href="https://github.com/codemirror/codemirror">Code</a>
18
- </ul>
19
- <ul>
20
- <li><a href="../index.html">Language modes</a>
21
- <li><a class=active href="#">TypeScript</a>
22
- </ul>
23
- </div>
24
-
25
- <article>
26
- <h2>TypeScript mode</h2>
27
-
28
-
29
- <div><textarea id="code" name="code">
30
- class Greeter {
31
- greeting: string;
32
- constructor (message: string) {
33
- this.greeting = message;
34
- }
35
- greet() {
36
- return "Hello, " + this.greeting;
37
- }
38
- }
39
-
40
- var greeter = new Greeter("world");
41
-
42
- var button = document.createElement('button')
43
- button.innerText = "Say Hello"
44
- button.onclick = function() {
45
- alert(greeter.greet())
46
- }
47
-
48
- document.body.appendChild(button)
49
-
50
- </textarea></div>
51
-
52
- <script>
53
- var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
54
- lineNumbers: true,
55
- matchBrackets: true,
56
- mode: "text/typescript"
57
- });
58
- </script>
59
-
60
- <p>This is a specialization of the <a href="index.html">JavaScript mode</a>.</p>
61
- </article>
@@ -1,64 +0,0 @@
1
- <!doctype html>
2
-
3
- <title>CodeMirror: PHP mode</title>
4
- <meta charset="utf-8"/>
5
- <link rel=stylesheet href="../../doc/docs.css">
6
-
7
- <link rel="stylesheet" href="../../lib/codemirror.css">
8
- <script src="../../lib/codemirror.js"></script>
9
- <script src="../../addon/edit/matchbrackets.js"></script>
10
- <script src="../htmlmixed/htmlmixed.js"></script>
11
- <script src="../xml/xml.js"></script>
12
- <script src="../javascript/javascript.js"></script>
13
- <script src="../css/css.js"></script>
14
- <script src="../clike/clike.js"></script>
15
- <script src="php.js"></script>
16
- <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
17
- <div id=nav>
18
- <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
19
-
20
- <ul>
21
- <li><a href="../../index.html">Home</a>
22
- <li><a href="../../doc/manual.html">Manual</a>
23
- <li><a href="https://github.com/codemirror/codemirror">Code</a>
24
- </ul>
25
- <ul>
26
- <li><a href="../index.html">Language modes</a>
27
- <li><a class=active href="#">PHP</a>
28
- </ul>
29
- </div>
30
-
31
- <article>
32
- <h2>PHP mode</h2>
33
- <form><textarea id="code" name="code">
34
- <?php
35
- $a = array('a' => 1, 'b' => 2, 3 => 'c');
36
-
37
- echo "$a[a] ${a[3] /* } comment */} {$a[b]} \$a[a]";
38
-
39
- function hello($who) {
40
- return "Hello $who!";
41
- }
42
- ?>
43
- <p>The program says <?= hello("World") ?>.</p>
44
- <script>
45
- alert("And here is some JS code"); // also colored
46
- </script>
47
- </textarea></form>
48
-
49
- <script>
50
- var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
51
- lineNumbers: true,
52
- matchBrackets: true,
53
- mode: "application/x-httpd-php",
54
- indentUnit: 4,
55
- indentWithTabs: true
56
- });
57
- </script>
58
-
59
- <p>Simple HTML/PHP mode based on
60
- the <a href="../clike/">C-like</a> mode. Depends on XML,
61
- JavaScript, CSS, HTMLMixed, and C-like modes.</p>
62
-
63
- <p><strong>MIME types defined:</strong> <code>application/x-httpd-php</code> (HTML with PHP code), <code>text/x-php</code> (plain, non-wrapped PHP code).</p>
64
- </article>
@@ -1,234 +0,0 @@
1
- // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
- // Distributed under an MIT license: http://codemirror.net/LICENSE
3
-
4
- (function(mod) {
5
- if (typeof exports == "object" && typeof module == "object") // CommonJS
6
- mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../clike/clike"));
7
- else if (typeof define == "function" && define.amd) // AMD
8
- define(["../../lib/codemirror", "../htmlmixed/htmlmixed", "../clike/clike"], mod);
9
- else // Plain browser env
10
- mod(CodeMirror);
11
- })(function(CodeMirror) {
12
- "use strict";
13
-
14
- function keywords(str) {
15
- var obj = {}, words = str.split(" ");
16
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
17
- return obj;
18
- }
19
-
20
- // Helper for phpString
21
- function matchSequence(list, end, escapes) {
22
- if (list.length == 0) return phpString(end);
23
- return function (stream, state) {
24
- var patterns = list[0];
25
- for (var i = 0; i < patterns.length; i++) if (stream.match(patterns[i][0])) {
26
- state.tokenize = matchSequence(list.slice(1), end);
27
- return patterns[i][1];
28
- }
29
- state.tokenize = phpString(end, escapes);
30
- return "string";
31
- };
32
- }
33
- function phpString(closing, escapes) {
34
- return function(stream, state) { return phpString_(stream, state, closing, escapes); };
35
- }
36
- function phpString_(stream, state, closing, escapes) {
37
- // "Complex" syntax
38
- if (escapes !== false && stream.match("${", false) || stream.match("{$", false)) {
39
- state.tokenize = null;
40
- return "string";
41
- }
42
-
43
- // Simple syntax
44
- if (escapes !== false && stream.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)) {
45
- // After the variable name there may appear array or object operator.
46
- if (stream.match("[", false)) {
47
- // Match array operator
48
- state.tokenize = matchSequence([
49
- [["[", null]],
50
- [[/\d[\w\.]*/, "number"],
51
- [/\$[a-zA-Z_][a-zA-Z0-9_]*/, "variable-2"],
52
- [/[\w\$]+/, "variable"]],
53
- [["]", null]]
54
- ], closing, escapes);
55
- }
56
- if (stream.match(/\-\>\w/, false)) {
57
- // Match object operator
58
- state.tokenize = matchSequence([
59
- [["->", null]],
60
- [[/[\w]+/, "variable"]]
61
- ], closing, escapes);
62
- }
63
- return "variable-2";
64
- }
65
-
66
- var escaped = false;
67
- // Normal string
68
- while (!stream.eol() &&
69
- (escaped || escapes === false ||
70
- (!stream.match("{$", false) &&
71
- !stream.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/, false)))) {
72
- if (!escaped && stream.match(closing)) {
73
- state.tokenize = null;
74
- state.tokStack.pop(); state.tokStack.pop();
75
- break;
76
- }
77
- escaped = stream.next() == "\\" && !escaped;
78
- }
79
- return "string";
80
- }
81
-
82
- var phpKeywords = "abstract and array as break case catch class clone const continue declare default " +
83
- "do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final " +
84
- "for foreach function global goto if implements interface instanceof namespace " +
85
- "new or private protected public static switch throw trait try use var while xor " +
86
- "die echo empty exit eval include include_once isset list require require_once return " +
87
- "print unset __halt_compiler self static parent yield insteadof finally";
88
- var phpAtoms = "true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";
89
- var phpBuiltin = "func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";
90
- CodeMirror.registerHelper("hintWords", "php", [phpKeywords, phpAtoms, phpBuiltin].join(" ").split(" "));
91
- CodeMirror.registerHelper("wordChars", "php", /[\w$]/);
92
-
93
- var phpConfig = {
94
- name: "clike",
95
- helperType: "php",
96
- keywords: keywords(phpKeywords),
97
- blockKeywords: keywords("catch do else elseif for foreach if switch try while finally"),
98
- defKeywords: keywords("class function interface namespace trait"),
99
- atoms: keywords(phpAtoms),
100
- builtin: keywords(phpBuiltin),
101
- multiLineStrings: true,
102
- hooks: {
103
- "$": function(stream) {
104
- stream.eatWhile(/[\w\$_]/);
105
- return "variable-2";
106
- },
107
- "<": function(stream, state) {
108
- var before;
109
- if (before = stream.match(/<<\s*/)) {
110
- var quoted = stream.eat(/['"]/);
111
- stream.eatWhile(/[\w\.]/);
112
- var delim = stream.current().slice(before[0].length + (quoted ? 2 : 1));
113
- if (quoted) stream.eat(quoted);
114
- if (delim) {
115
- (state.tokStack || (state.tokStack = [])).push(delim, 0);
116
- state.tokenize = phpString(delim, quoted != "'");
117
- return "string";
118
- }
119
- }
120
- return false;
121
- },
122
- "#": function(stream) {
123
- while (!stream.eol() && !stream.match("?>", false)) stream.next();
124
- return "comment";
125
- },
126
- "/": function(stream) {
127
- if (stream.eat("/")) {
128
- while (!stream.eol() && !stream.match("?>", false)) stream.next();
129
- return "comment";
130
- }
131
- return false;
132
- },
133
- '"': function(_stream, state) {
134
- (state.tokStack || (state.tokStack = [])).push('"', 0);
135
- state.tokenize = phpString('"');
136
- return "string";
137
- },
138
- "{": function(_stream, state) {
139
- if (state.tokStack && state.tokStack.length)
140
- state.tokStack[state.tokStack.length - 1]++;
141
- return false;
142
- },
143
- "}": function(_stream, state) {
144
- if (state.tokStack && state.tokStack.length > 0 &&
145
- !--state.tokStack[state.tokStack.length - 1]) {
146
- state.tokenize = phpString(state.tokStack[state.tokStack.length - 2]);
147
- }
148
- return false;
149
- }
150
- }
151
- };
152
-
153
- CodeMirror.defineMode("php", function(config, parserConfig) {
154
- var htmlMode = CodeMirror.getMode(config, "text/html");
155
- var phpMode = CodeMirror.getMode(config, phpConfig);
156
-
157
- function dispatch(stream, state) {
158
- var isPHP = state.curMode == phpMode;
159
- if (stream.sol() && state.pending && state.pending != '"' && state.pending != "'") state.pending = null;
160
- if (!isPHP) {
161
- if (stream.match(/^<\?\w*/)) {
162
- state.curMode = phpMode;
163
- if (!state.php) state.php = CodeMirror.startState(phpMode, htmlMode.indent(state.html, ""))
164
- state.curState = state.php;
165
- return "meta";
166
- }
167
- if (state.pending == '"' || state.pending == "'") {
168
- while (!stream.eol() && stream.next() != state.pending) {}
169
- var style = "string";
170
- } else if (state.pending && stream.pos < state.pending.end) {
171
- stream.pos = state.pending.end;
172
- var style = state.pending.style;
173
- } else {
174
- var style = htmlMode.token(stream, state.curState);
175
- }
176
- if (state.pending) state.pending = null;
177
- var cur = stream.current(), openPHP = cur.search(/<\?/), m;
178
- if (openPHP != -1) {
179
- if (style == "string" && (m = cur.match(/[\'\"]$/)) && !/\?>/.test(cur)) state.pending = m[0];
180
- else state.pending = {end: stream.pos, style: style};
181
- stream.backUp(cur.length - openPHP);
182
- }
183
- return style;
184
- } else if (isPHP && state.php.tokenize == null && stream.match("?>")) {
185
- state.curMode = htmlMode;
186
- state.curState = state.html;
187
- if (!state.php.context.prev) state.php = null;
188
- return "meta";
189
- } else {
190
- return phpMode.token(stream, state.curState);
191
- }
192
- }
193
-
194
- return {
195
- startState: function() {
196
- var html = CodeMirror.startState(htmlMode)
197
- var php = parserConfig.startOpen ? CodeMirror.startState(phpMode) : null
198
- return {html: html,
199
- php: php,
200
- curMode: parserConfig.startOpen ? phpMode : htmlMode,
201
- curState: parserConfig.startOpen ? php : html,
202
- pending: null};
203
- },
204
-
205
- copyState: function(state) {
206
- var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html),
207
- php = state.php, phpNew = php && CodeMirror.copyState(phpMode, php), cur;
208
- if (state.curMode == htmlMode) cur = htmlNew;
209
- else cur = phpNew;
210
- return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur,
211
- pending: state.pending};
212
- },
213
-
214
- token: dispatch,
215
-
216
- indent: function(state, textAfter) {
217
- if ((state.curMode != phpMode && /^\s*<\//.test(textAfter)) ||
218
- (state.curMode == phpMode && /^\?>/.test(textAfter)))
219
- return htmlMode.indent(state.html, textAfter);
220
- return state.curMode.indent(state.curState, textAfter);
221
- },
222
-
223
- blockCommentStart: "/*",
224
- blockCommentEnd: "*/",
225
- lineComment: "//",
226
-
227
- innerMode: function(state) { return {state: state.curState, mode: state.curMode}; }
228
- };
229
- }, "htmlmixed", "clike");
230
-
231
- CodeMirror.defineMIME("application/x-httpd-php", "php");
232
- CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true});
233
- CodeMirror.defineMIME("text/x-php", phpConfig);
234
- });