index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <!DOCTYPE html>
  2. <html lang="en-us">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>JavaScript Markdown Editor - SimpleMDE</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
  8. <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
  9. <link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
  10. <link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
  11. <link rel="canonical" href="https://simplemde.com/" />
  12. <script>
  13. if(window.location.href.indexOf("sparksuite.github.io") !== -1) {
  14. window.location.href = "https://simplemde.com/";
  15. }
  16. if(window.location.protocol != "https:")
  17. window.location.href = "https:"+window.location.href.substring(window.location.protocol.length);
  18. </script>
  19. <style>
  20. .editor-preview h1,
  21. .editor-preview h2,
  22. .editor-preview h3,
  23. .editor-preview h4,
  24. .editor-preview h5{
  25. margin-bottom:10px;
  26. }
  27. .editor-preview h1{
  28. border-bottom:1px solid #ddd;
  29. }
  30. .editor-preview h1{
  31. border-bottom:1px solid #eee;
  32. }
  33. </style>
  34. </head>
  35. <body>
  36. <section class="page-header">
  37. <h1 class="project-name">SimpleMDE Markdown Editor</h1>
  38. <h2 class="project-tagline">SimpleMDE is a simple, embeddable, and beautiful JS markdown editor</h2>
  39. <a href="https://github.com/sparksuite/simplemde-markdown-editor" class="btn">View on GitHub</a>
  40. <a href="https://github.com/sparksuite/simplemde-markdown-editor/zipball/master" class="btn">Download .zip</a>
  41. <a href="https://github.com/sparksuite/simplemde-markdown-editor/tarball/master" class="btn">Download .tar.gz</a>
  42. </section>
  43. <section class="main-content">
  44. <h1><a id="h1_demo1" class="anchor" href="#h1_demo1" aria-hidden="true"><span class="octicon octicon-link"></span></a>Demo</h1>
  45. <textarea id="demo1"># Intro
  46. Go ahead, play around with the editor! Be sure to check out **bold** and *italic* styling, or even [links](https://google.com). You can type the Markdown syntax, use the toolbar, or use shortcuts like `cmd-b` or `ctrl-b`.
  47. ## Lists
  48. Unordered lists can be started using the toolbar or by typing `* `, `- `, or `+ `. Ordered lists can be started by typing `1. `.
  49. #### Unordered
  50. * Lists are a piece of cake
  51. * They even auto continue as you type
  52. * A double enter will end them
  53. * Tabs and shift-tabs work too
  54. #### Ordered
  55. 1. Numbered lists...
  56. 2. ...work too!
  57. ## What about images?
  58. ![Yes](https://i.imgur.com/sZlktY7.png)</textarea>
  59. <h1><a id="h1_demo2" class="anchor" href="#h1_demo2" aria-hidden="true"><span class="octicon octicon-link"></span></a>Autosaving</h1>
  60. <textarea id="demo2"># This one autosaves!
  61. By default, it saves every 10 seconds, but this can be changed. When this textarea is included in a form, it will automatically forget the saved value when the form is submitted.</textarea>
  62. <h1><a id="h1_demo3" class="anchor" href="#h1_demo3" aria-hidden="true"><span class="octicon octicon-link"></span></a>Hidden toolbar and status bar</h1>
  63. <textarea id="demo3"># This one is bare
  64. You can also choose to hide the statusbar and/or toolbar for a simple and clean appearance. This one also checks for misspelled words as you type!</textarea>
  65. <footer class="site-footer">
  66. <span class="site-footer-credits"><a href="https://github.com/sparksuite/simplemde-markdown-editor">SimpleMDE Markdown Editor</a> is created and maintained by <a href="https://github.com/sparksuite">Sparksuite</a></span>
  67. </footer>
  68. </section>
  69. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css">
  70. <link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
  71. <script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
  72. <script>
  73. new SimpleMDE({
  74. element: document.getElementById("demo1"),
  75. spellChecker: false,
  76. });
  77. new SimpleMDE({
  78. element: document.getElementById("demo2"),
  79. spellChecker: false,
  80. autosave: {
  81. enabled: true,
  82. unique_id: "demo2",
  83. },
  84. });
  85. new SimpleMDE({
  86. element: document.getElementById("demo3"),
  87. status: false,
  88. toolbar: false,
  89. });
  90. </script>
  91. <script>
  92. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  93. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  94. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  95. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  96. ga('create', 'UA-5808021-18', 'auto');
  97. ga('send', 'pageview');
  98. </script>
  99. </body>
  100. </html>