From 9c4b8766cbdc2a4c63a03292b58cf35d981e1321 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 2 Nov 2016 23:37:00 -0400 Subject: simplemde --- static/mde.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 static/mde.js (limited to 'static/mde.js') 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 = + "

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:

\n"+ + "
---\ntitle: \"Your Title Here\"\n---\n
";*/ + form.insertBefore(container, textarea); + container.appendChild(textarea); + + var simplemde = new SimpleMDE({ + autoDownloadFontAwesome: false, + element: textarea, + promptURLs: true, + forceSync: true, + showIcons: ["code", "table"], + }); +})(); -- cgit v1.2.3-54-g00ecf