由于某种原因,它没有显示要突出显示的文本或任何内容,不知道为什么。
链接:
<link rel=stylesheet href="http://codemirror.net/mode/php/../../doc/docs.css">
<link rel="stylesheet" href="http://codemirror.net/mode/php/../../lib/codemirror.css">
<script src="http://codemirror.net/mode/php/../../lib/codemirror.js"></script>
<script src="http://codemirror.net/mode/php/../../addon/edit/matchbrackets.js"></script>
<script src="http://codemirror.net/mode/php/../htmlmixed/htmlmixed.js"></script>
<script src="http://codemirror.net/mode/php/../xml/xml.js"></script>
<script src="http://codemirror.net/mode/php/../javascript/javascript.js"></script>
<script src="http://codemirror.net/mode/php/../css/css.js"></script>
<script src="http://codemirror.net/mode/php/../clike/clike.js"></script>
<script src="http://codemirror.net/mode/php/php.js"></script>
CSS:
.CodeMirror { height: 400px; width: 500px; border-radius:6px; padding-top:3px; border: 1px solid #ddd; }
.CodeMirror-scroll { max-height: 400px; width:500px; }
.CodeMirror pre { display:inline-block; padding-left: 7px; line-height: 1.25; }
脚本:
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("demotext"), {
lineNumbers: true,
matchBrackets: true,
mode: "text/x-php",
indentUnit: 4,
indentWithTabs: true,
enterMode: "keep",
tabMode: "shift"
});
</script>
它的显示很奇怪并且无法正常工作 D:
需要更多信息?让我知道!