Closed Dn9x closed 10 years ago
<!DOCTYPE html> <html> <body> <textarea id="text-input" oninput="this.editor.update()" rows="6" cols="60">Type **Markdown** here.</textarea> <div id="preview"> </div> <script src="lib/markdown.js"></script> <script> function Editor(input, preview) { this.update = function () { preview.innerHTML = markdown.toHTML(input.value); }; input.editor = this; this.update(); } var $ = function (id) { return document.getElementById(id); }; new Editor($("text-input"), $("preview")); </script> </body> </html>
this is you example! if input code,No effect!
Is it able to load the markdown.js file? I.e. have you made this HTML file in the root of the cloned repo, or copied markdown.js to be in the correct place relative to your HTML file?
markdown.js
this is you example! if input code,No effect!