Css 如何在codemirror编辑器中禁用语法突出显示的文本?

Css 如何在codemirror编辑器中禁用语法突出显示的文本?,css,html,text,syntax-highlighting,codemirror,Css,Html,Text,Syntax Highlighting,Codemirror,我需要禁用codemirror编辑器中突出显示的语法文本,因为用户可能会在编辑器中编辑一些语法,这将导致程序无法运行。那么,如何禁止编辑语法内容呢 例如: 在这种情况下,只有标签不应编辑,其余内容应可编辑。 怎么做 任何帮助都将不胜感激。提前谢谢 readOnly: boolean|string This disables editing of the editor content by the user. If the special value "nocursor" is given (i

我需要禁用codemirror编辑器中突出显示的语法文本,因为用户可能会在编辑器中编辑一些语法,这将导致程序无法运行。那么,如何禁止编辑语法内容呢

例如:

在这种情况下,只有标签不应编辑,其余内容应可编辑。
怎么做

任何帮助都将不胜感激。提前谢谢

readOnly: boolean|string
This disables editing of the editor content by the user. If the special value "nocursor" is given (instead of simply true), focusing of the editor is also disallowed.

访问:对于文档

您是否可以添加您的输出scrrenI在问题中添加了预期的输出对于用户来说,只有该区域应该是可编辑的,当它们运行时,编辑器的全部内容将作为要运行的程序。我需要它,因为最终用户不应该编辑程序的语法。嗯,我不认为授予universe运行PHP脚本的权限是安全的。我想,你误解了我的问题。我添加了一个屏幕截图,如果你不完全理解,请让我知道。