summaryrefslogtreecommitdiff
path: root/static/mde.js
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-11-02 23:37:00 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-11-02 23:37:00 -0400
commit9c4b8766cbdc2a4c63a03292b58cf35d981e1321 (patch)
treeaa84619601ff14e7ea86b1147827f24a6fa82fa0 /static/mde.js
parent85db279e33804c118b019c5f1e7666798df3e1f5 (diff)
simplemde
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"],
+ });
+})();