code-fold.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>Code folding - Editor.md examples</title>
  6. <link rel="stylesheet" href="css/style.css" />
  7. <link rel="stylesheet" href="../css/editormd.css" />
  8. <link rel="shortcut icon" href="https://pandao.github.io/editor.md/favicon.ico" type="image/x-icon" />
  9. </head>
  10. <body>
  11. <div id="layout">
  12. <header>
  13. <h1>Code folding</h1>
  14. <p>Switch code folding : Press Ctrl + Q / Command + Q</p>
  15. </header>
  16. <div id="test-editormd">
  17. <textarea style="display:none;"></textarea>
  18. </div>
  19. </div>
  20. <script src="js/jquery.min.js"></script>
  21. <script src="../editormd.js"></script>
  22. <script type="text/javascript">
  23. var testEditor;
  24. $(function() {
  25. $.get("./test.md", function(md) {
  26. testEditor = editormd("test-editormd", {
  27. width : "90%",
  28. height : 720,
  29. markdown : "#### Setting\r\n\r\n {\n codeFold : true\n }\r\n\r\n" + md,
  30. codeFold : true,
  31. htmlDecode : true,
  32. tex : true,
  33. taskList : true,
  34. emoji : true,
  35. flowChart : true,
  36. sequenceDiagram : true,
  37. path : '../lib/'
  38. });
  39. });
  40. });
  41. </script>
  42. </body>
  43. </html>