Php 在CodeMirror文本区域设置默认语言
如何设置CodeMirror TextArea在不回显标记的情况下理解PHP 文本区Php 在CodeMirror文本区域设置默认语言,php,javascript,html,textarea,codemirror,Php,Javascript,Html,Textarea,Codemirror,如何设置CodeMirror TextArea在不回显标记的情况下理解PHP 文本区 <textarea id="code" name="code"> <?php echo '<?php'; ?> </textarea> 我已经解决了,你必须将模式更改为模式:“text/x-php”我已经解决了,你必须将模式更改为模式:“text/x-php”请将其作为答案发布,然后 var editor = CodeMirror.fromTextAr
<textarea id="code" name="code">
<?php
echo '<?php';
?>
</textarea>
我已经解决了,你必须将模式更改为模式:“text/x-php”我已经解决了,你必须将模式更改为
模式:“text/x-php”
请将其作为答案发布,然后
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: false,
matchBrackets: true,
mode: "application/x-httpd-php",
indentUnit: 4,
indentWithTabs: true,
enterMode: "keep",
tabMode: "shift"
});