本文介绍了textarea中的颜色代码使用jquery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以使用jquery为用户输入代码(在textarea内部)着色。
Is it possible to color the user entering code (inside a textarea) using jquery.
特定文本,例如< h1>
,< b>
等应该被着色或突出显示。
Specific texts like <h1>
, <b>
etc should be colored or highlighted.
这有助于区分开始结束标签。
this helps to distinguish the opening closing tags.
帮助
推荐答案
否。
< textarea& code>元素无法格式化。
No.
Text blocks in <textarea>
elements cannot be formatted.
您需要使用ContentEditable元素。
尝试。
You need to use a ContentEditable element.
Try CodeMirror.
这篇关于textarea中的颜色代码使用jquery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!