summaryrefslogtreecommitdiff
path: root/static/mde.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/mde.js')
-rw-r--r--static/mde.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/static/mde.js b/static/mde.js
new file mode 100644
index 0000000..7471110
--- /dev/null
+++ b/static/mde.js
@@ -0,0 +1,20 @@
+(function() {
+ var textarea = document.getElementsByTagName("textarea")[0];
+ var form = textarea.form;
+ var container = document.createElement('div');
+ /*container.innerHTML =
+ "<p>I know it looks funny in the editor, but to set the page "+
+ "title (what appears in the tab name/window bar), put this at "+
+ "the top of the page:</p>\n"+
+ "<pre>---\ntitle: \"Your Title Here\"\n---\n</pre>";*/
+ form.insertBefore(container, textarea);
+ container.appendChild(textarea);
+
+ var simplemde = new SimpleMDE({
+ autoDownloadFontAwesome: false,
+ element: textarea,
+ promptURLs: true,
+ forceSync: true,
+ showIcons: ["code", "table"],
+ });
+})();