diff options
Diffstat (limited to 'enhancers.txt')
-rw-r--r-- | enhancers.txt | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/enhancers.txt b/enhancers.txt new file mode 100644 index 0000000..22c684b --- /dev/null +++ b/enhancers.txt @@ -0,0 +1,91 @@ +--boundary +X-Thing: Pattern + +text/markdown +--boundary +X-Thing: Head + +<link rel="stylesheet" href="/static/font-awesome/css/font-awesome.min.css"> +<link rel="stylesheet" href="/static/simplemde/dist/simplemde.min.css"> +<script src="/static/simplemde/dist/simplemde.min.js"></script> +--boundary +X-Thing: Tail + +<script> +(function() { + var textarea = document.getElementsByTagName('textarea')[0]; + var form = textarea.form; + var container = document.createElement('div'); + form.insertBefore(container, textarea); + container.appendChild(textarea); + + var tip = document.createElement('aside'); + tip.innerHTML = + '<p>Tip: 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>'+ + '<p>I apologize that it looks funny on this page and in the '+ + 'preview.</p>'; + container.appendChild(tip); + + var simplemde = new SimpleMDE({ + autoDownloadFontAwesome: false, + element: textarea, + promptURLs: true, + forceSync: true, + showIcons: ['code', 'table'], + }); +})(); +</script> +--boundary +X-Thing: Pattern + +text/*; */*+xml +--boundary +X-Thing: Head + +<link rel="stylesheet" href="/static/codemirror/lib/codemirror.css"> +<script src="/static/codemirror/lib/codemirror.js"></script> + + +<script src="/static/codemirror/mode/xml/xml.js"></script> +<script src="/static/codemirror/mode/javascript/javascript.js"></script> +<script src="/static/codemirror/mode/css/css.js"></script> +<script src="/static/codemirror/mode/sass/sass.js"></script> +<script src="/static/codemirror/mode/htmlmixed/htmlmixed.js"></script> +<script src="/static/codemirror/addon/edit/matchbrackets.js"></script> +<script src="/static/codemirror/addon/edit/trailingspace.js"></script> +<script src="/static/codemirror/addon/display/rulers.js"></script> + +<script src="/static/codemirror/addon/fold/foldcode.js"></script> +<script src="/static/codemirror/addon/fold/foldgutter.js"></script> +<link rel="stylesheet" href="/static/codemirror/addon/fold/foldgutter.css"> +<script src="/static/codemirror/addon/fold/brace-fold.js"></script> +<script src="/static/codemirror/addon/fold/xml-fold.js"></script> +<script src="/static/codemirror/addon/fold/markdown-fold.js"></script> +<script src="/static/codemirror/addon/fold/comment-fold.js"></script> +--boundary +X-Thing: Tail + +<script> +(function() { + var textarea = document.getElementsByTagName('textarea')[0]; + var form = textarea.form; + var container = document.createElement('div'); + form.insertBefore(container, textarea); + container.appendChild(textarea); + var cm = CodeMirror.fromTextArea(textarea, { + mode: ctype, + lineNumbers: true, + matchBrackets: true, + foldGutter: true, + rulers: [{column: 80, lineStyle: "dashed"}], + showTrailingSpace: true, + gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], + }); + cm.on("change", function() { + cm.save(); + }); +})(); +</script> +--boundary-- |