玛氪宕·梦魔(Markdown Memo),使用Markdown的云端备忘录,百度IFE的RIA启航班的不合格的作业,才……才没有什么阴谋呢! 源gitee链接https://gitee.com/arathi/MarkdownMemo?_from=gitee_search
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

50 lines
1.9 KiB

<!DOCTYPE html>
<html lang="zh">
<head>
<title>CodeMirror Test</title>
<meta charset="UTF-8">
<meta name="description" content="" />
<meta name="keywords" content="" />
<link rel="stylesheet" href="../examples/css/style.css" />
</head>
<body>
<div style="text-align: left;">
<textarea id="test" style="height: 700px;">###Hello world!</textarea>
</div>
<script src="../lib/jquery.min.js"></script>
<link rel="stylesheet" href="../lib/codemirror/codemirror.min.css" />
<script src="../lib/codemirror/codemirror.min.js"></script>
<script src="../lib/codemirror/modes.min.js"></script>
<script src="../lib/codemirror/addons.min.js"></script>
<script type="text/javascript">
$(function() {
var codeMirrorConfig = {
mode: "gfm",
theme: "default",
tabSize: 4,
dragDrop: false,
autofocus: true,
indentUnit : 4,
lineNumbers: true,
lineWrapping: true,
matchBrackets: true,
indentWithTabs: true,
styleActiveLine: true,
styleSelectedText: true,
autoCloseBrackets: true,
showTrailingSpace: true,
highlightSelectionMatches: {
showToken: /\w/
}
};
$.get("../examples/test.md", function(md){
$("#test").html(md);
var codeMirrorEditor = CodeMirror.fromTextArea($("#test")[0], codeMirrorConfig);
var codeMirror = $(".CodeMirror");
});
});
</script>
</body>
</html>