nat*_*alf 1 html javascript codemirror
我想在 codemirror 中使用 htmlmixed 模式。我开始在 codemirror API 中搜索,但找不到它。我包括以下内容:
<script src="cm/lib/codemirror.js"></script>
<link rel="stylesheet" href="cm/lib/codemirror.css">
<script src="cm/mode/htmlmixed/htmlmixed.js"></script>
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
MCM = CodeMirror(JY.get("devroot"), {
mode: "htmlmixed",
value: "<p>Hello</p>"
});
Run Code Online (Sandbox Code Playgroud)
但它不起作用。有人知道这个吗?
您还必须包含模式脚本cm/mode/xml/xml.js、cm/mode/javascript/javascript.js和cm/mode/css/css.js,它们是 htmlmixed 模式的依赖项。