Load and use Markdown parser

If the file we are editing is a markdown file and we have a stickyTab
open, send the parsed editor content to the document DOM for display
This commit is contained in:
Matt Pass
2013-04-30 17:51:26 +01:00
parent 8f997eb4f3
commit 838d44bd5c

View File

@@ -11,10 +11,11 @@
<!--
codemirror-compressed.js
incls: codemirror
modes: clike, coffeescript, css, htmlmixed, javascript, less, php, ruby & xml
modes: clike, coffeescript, css, htmlmixed, javascript, less, markdown, php, ruby & xml
utils: closetag, foldcode, xml-fold, brace-fold, show-hint, javascript-hint, html-hint, searchcursor, match-highlighter
//-->
<script src="<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js"></script>
<script src="lib/mmd.js"></script>
<?php
if (file_exists(dirname(__FILE__)."/plugins/emmet/emmet.min.js")) {
echo '<script src="plugins/emmet/emmet.min.js"></script>';
@@ -198,6 +199,8 @@ function createNewCMInstance(num) {
}
top.ICEcoder.stickyTab.document.documentElement.appendChild(style);
}
} else if (["md"].indexOf(fileExt) > -1) {
top.ICEcoder.stickyTab.document.documentElement.innerHTML = mmd(window['cM'+num].getValue());
}
};
}