editormd.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <script src="/static/js/jquery.min.js?t=13"></script>
  2. <script src="/static/editor.md/editormd.js" type="text/javascript"></script>
  3. <script src="/static/editor.md/lib/marked.min.js"></script>
  4. <script src="/static/editor.md/lib/prettify.min.js"></script>
  5. <script src="/static/editor.md/lib/raphael.min.js"></script>
  6. <script src="/static/editor.md/lib/underscore.min.js"></script>
  7. <script src="/static/editor.md/lib/sequence-diagram.min.js"></script>
  8. <script src="/static/editor.md/lib/flowchart.min.js"></script>
  9. <script src="/static/editor.md/lib/jquery.flowchart.min.js"></script>
  10. <script type="text/javascript">
  11. $(function() {
  12. apiEditor = editormd("api-editormd", {
  13. width : "90%",
  14. height : 720,
  15. path : '/static/editor.md/lib/',
  16. onchange : function() {
  17. $("#output").html("onchange : this.id =>" + this.id + ", markdown =>" + this.getValue());
  18. console.log("onchange =>", this, this.id, this.settings, this.state);
  19. },
  20. toolbarIcons : function() {
  21. // Or return editormd.toolbarModes[name]; // full, simple, mini
  22. // Using "||" set icons align right.
  23. return ["undo", "redo", "|",
  24. "bold", "del", "italic", "quote", "|",
  25. "h1", "h2", "h3", "h4", "h5", "h6", "|",
  26. "list-ul", "list-ol", "hr", "|",
  27. "link", "reference-link", "image", "code", "preformatted-text", "code-block", "table", "datetime", "emoji", "html-entities", "pagebreak", "|",
  28. "goto-line", "watch", "preview", "fullscreen", "clear", "search", "|",
  29. "help", "info"]
  30. },
  31. });
  32. });
  33. </script>