当前位置:网站首页>Codemirror 2 - highlight only (no editor) - codemirror 2 - highlight only (no editor)

Codemirror 2 - highlight only (no editor) - codemirror 2 - highlight only (no editor)

2022-06-12 00:52:00 Bustling city

problem :

Can CodeMirror 2 be used to highlight code from a DIV or PRE tag (without the editor)?CodeMirror 2 Can be used to highlight from DIV or PRE Code of label ( No editor )?

Like CodeMirror 1 used to be able to do with the hightlightText() function? image CodeMirror 1 Used to be able to use hightlightText() Is the function the same ?For example here: http://codemirror.net/1/highlight.html , after you press run highlight (the highlighted text below) For example, here : http://codemirror.net/1/highlight.html , Press down run highlight ( The text highlighted below )

Also can it highlight code from a inline element, like <code> , and keep the results inline, like Google's Prettify does? It can also highlight... From inline elements <code> , for example <code> , And keep the results inline , It's like Google Of Prettify Is that so ?


Solution :

Reference resources : https://stackoom.com/en/question/NAIb
原网站

版权声明
本文为[Bustling city ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203011431539397.html