使用jQuery在textarea中着色文本 [英] colorize text in textarea with jQuery
本文介绍了使用jQuery在textarea中着色文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要为textarea中的文本着色部分。让我们说第一行是红色,第二行是蓝色。如何做到这一点? (jQuery)
解决方案
我不知道如果它可能与textarea。而应使用div contentEditable 。
查看类似问题
p> i need to colorize part of the text in textarea. Let's say first line in red, second in blue. How to do this? (jQuery) I'm not sure if it possible with textarea. Instead use div contentEditable. See similar questions Rendering HTML inside textarea How to set background color for some inner text of HTML textarea element? 这篇关于使用jQuery在textarea中着色文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! 解决方案
查看全文