Permalink
Browse files

better markdown with php markdown extra extended

  • Loading branch information...
1 parent 0070831 commit 2d49a6e3e2d126976e4511010ea02fa73108aa3e @wolfv committed Feb 1, 2012
Showing with 9,044 additions and 1,654 deletions.
  1. +15 −3 code/MarkdownField.php
  2. +5 −2 code/MarkdownParser.php
  3. +1 −0 code/lib/markdown
  4. +0 −1,592 code/lib/markdown.php
  5. +0 −19 code/lib/markdown_license.txt
  6. +11 −0 code/lib/phphyphenator/CHANGELOG
  7. +2 −0 code/lib/phphyphenator/dictionary.txt
  8. +58 −0 code/lib/phphyphenator/example.php
  9. +146 −0 code/lib/phphyphenator/hyphenation.php
  10. +87 −0 code/lib/phphyphenator/morecss-plugin.php
  11. +11 −0 code/lib/phphyphenator/patterns/bn.php
  12. +8 −0 code/lib/phphyphenator/patterns/de.php
  13. +8 −0 code/lib/phphyphenator/patterns/en.php
  14. +10 −0 code/lib/phphyphenator/patterns/es.php
  15. +8 −0 code/lib/phphyphenator/patterns/fi.php
  16. +11 −0 code/lib/phphyphenator/patterns/fr.php
  17. +10 −0 code/lib/phphyphenator/patterns/gu.php
  18. +10 −0 code/lib/phphyphenator/patterns/hi.php
  19. +10 −0 code/lib/phphyphenator/patterns/it.php
  20. +10 −0 code/lib/phphyphenator/patterns/ka.php
  21. +10 −0 code/lib/phphyphenator/patterns/ml.php
  22. +10 −0 code/lib/phphyphenator/patterns/nl.php
  23. +10 −0 code/lib/phphyphenator/patterns/or.php
  24. +10 −0 code/lib/phphyphenator/patterns/pa.php
  25. +8 −0 code/lib/phphyphenator/patterns/pl.php
  26. +11 −0 code/lib/phphyphenator/patterns/ru.php
  27. +11 −0 code/lib/phphyphenator/patterns/sv.php
  28. +10 −0 code/lib/phphyphenator/patterns/ta.php
  29. +10 −0 code/lib/phphyphenator/patterns/te.php
  30. +21 −15 css/md.css
  31. +46 −0 javascript/lib/highlight/AUTHORS.en.txt
  32. +46 −0 javascript/lib/highlight/AUTHORS.ru.txt
  33. +24 −0 javascript/lib/highlight/LICENSE
  34. +136 −0 javascript/lib/highlight/README.md
  35. +140 −0 javascript/lib/highlight/README.ru.md
  36. +437 −0 javascript/lib/highlight/classref.txt
  37. +87 −0 javascript/lib/highlight/export.html
  38. +630 −0 javascript/lib/highlight/highlight.js
  39. +1 −0 javascript/lib/highlight/highlight.pack.js
  40. +68 −0 javascript/lib/highlight/languages/1c.js
  41. +432 −0 javascript/lib/highlight/languages/apache.js
  42. +75 −0 javascript/lib/highlight/languages/avrasm.js
  43. +43 −0 javascript/lib/highlight/languages/axapta.js
  44. +56 −0 javascript/lib/highlight/languages/bash.js
  45. +24 −0 javascript/lib/highlight/languages/cmake.js
  46. +62 −0 javascript/lib/highlight/languages/cpp.js
  47. +41 −0 javascript/lib/highlight/languages/cs.js
  48. +101 −0 javascript/lib/highlight/languages/css.js
  49. +70 −0 javascript/lib/highlight/languages/delphi.js
  50. +64 −0 javascript/lib/highlight/languages/diff.js
  51. +72 −0 javascript/lib/highlight/languages/django.js
  52. +29 −0 javascript/lib/highlight/languages/dos.js
  53. +81 −0 javascript/lib/highlight/languages/erlang-repl.js
  54. +201 −0 javascript/lib/highlight/languages/erlang.js
  55. +58 −0 javascript/lib/highlight/languages/go.js
  56. +77 −0 javascript/lib/highlight/languages/haskell.js
  57. +32 −0 javascript/lib/highlight/languages/ini.js
  58. +45 −0 javascript/lib/highlight/languages/java.js
  59. +53 −0 javascript/lib/highlight/languages/javascript.js
  60. +87 −0 javascript/lib/highlight/languages/lisp.js
  61. +75 −0 javascript/lib/highlight/languages/lua.js
  62. +40 −0 javascript/lib/highlight/languages/mel.js
  63. +224 −0 javascript/lib/highlight/languages/nginx.js
  64. +94 −0 javascript/lib/highlight/languages/objectivec.js
  65. +52 −0 javascript/lib/highlight/languages/parser3.js
  66. +143 −0 javascript/lib/highlight/languages/perl.js
  67. +55 −0 javascript/lib/highlight/languages/php.js
  68. +49 −0 javascript/lib/highlight/languages/profile.js
  69. +71 −0 javascript/lib/highlight/languages/python.js
  70. +230 −0 javascript/lib/highlight/languages/renderman.js
  71. +203 −0 javascript/lib/highlight/languages/ruby.js
  72. +60 −0 javascript/lib/highlight/languages/scala.js
  73. +55 −0 javascript/lib/highlight/languages/smalltalk.js
  74. +90 −0 javascript/lib/highlight/languages/sql.js
  75. +62 −0 javascript/lib/highlight/languages/tex.js
  76. +75 −0 javascript/lib/highlight/languages/vala.js
  77. +30 −0 javascript/lib/highlight/languages/vbscript.js
  78. +30 −0 javascript/lib/highlight/languages/vhdl.js
  79. +103 −0 javascript/lib/highlight/languages/xml.js
  80. +151 −0 javascript/lib/highlight/styles/arta.css
  81. +45 −0 javascript/lib/highlight/styles/ascetic.css
  82. +105 −0 javascript/lib/highlight/styles/brown_paper.css
  83. BIN javascript/lib/highlight/styles/brown_papersq.png
  84. +103 −0 javascript/lib/highlight/styles/dark.css
  85. +121 −0 javascript/lib/highlight/styles/default.css
  86. +118 −0 javascript/lib/highlight/styles/far.css
  87. +129 −0 javascript/lib/highlight/styles/github.css
  88. +118 −0 javascript/lib/highlight/styles/idea.css
  89. +103 −0 javascript/lib/highlight/styles/ir_black.css
  90. +118 −0 javascript/lib/highlight/styles/magula.css
  91. +111 −0 javascript/lib/highlight/styles/school_book.css
  92. BIN javascript/lib/highlight/styles/school_book.png
  93. +96 −0 javascript/lib/highlight/styles/solarized_dark.css
  94. +96 −0 javascript/lib/highlight/styles/solarized_light.css
  95. +147 −0 javascript/lib/highlight/styles/sunburst.css
  96. +84 −0 javascript/lib/highlight/styles/vs.css
  97. +115 −0 javascript/lib/highlight/styles/zenburn.css
  98. +1,609 −0 javascript/lib/highlight/test.html
  99. +40 −0 javascript/lib/jquery.ui.autocomplete.html.js
  100. +20 −6 javascript/markdownEditor.js
  101. +19 −14 scss/md.sass
  102. +5 −3 templates/MarkdownEditor.ss
View
@@ -36,9 +36,14 @@ function getlinktoid() {
function imagesuggest() {
$search = $this->request["search"];
- $data = DataList::create('File')->filter(array("Title:PartialMatch" => $search));
- $data_array = $data->toNestedArray();
- return json_encode($data_array);
+ $data = DataList::create('Image')->filter(array("Title:PartialMatch" => $search));
+ $result;
+
+ foreach($data as $item) {
+ $result[] = array("ImageLink" => $item->CMSThumbnail()->Link(), "Label" => $item->Title, "ID" => 1);
+ }
+ //$data_array = $data->toNestedArray();
+ return json_encode($result);
}
function getimagelinktoid() {
@@ -47,11 +52,18 @@ function getimagelinktoid() {
return $data->Link();
}
+ function getconvertedhtml() {
+ require_once('lib/markdown/markdown.php');
+ $text = $this->request["text"];
+ return Markdown($text);
+ }
+
public function getEditor() {
Requirements::clear();
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js');
Requirements::javascript(THIRDPARTY_DIR. '/jquery-entwine/dist/jquery.entwine-dist.js');
+ Requirements::javascript('markdown/javascript/lib/jquery.ui.autocomplete.html.js');
Requirements::javascript('markdown/javascript/lib/showdown.js');
Requirements::javascript('markdown/javascript/lib/ace/src/ace.js');
Requirements::javascript('markdown/javascript/lib/ace/src/mode-markdown.js');
View
@@ -1,10 +1,13 @@
<?php
-require_once('lib/markdown.php');
+require_once('lib/markdown/markdown.php');
+
class MarkdownParser extends TextParser {
function parse() {
+ $text = Markdown($this->content);
- return Markdown($this->content);
+ include('lib/phphyphenator/hyphenation.php');
+ return hyphenation($text);
}
}
Submodule markdown added at 1897df
Oops, something went wrong.

0 comments on commit 2d49a6e

Please sign in to comment.