It looks like selected some text, but the background color will not disappear when you click it or move cursor.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can't use textarea element for this. Just make a contentEditable contentEditable div and use javascript to style it.
回答2:
It may be a div
with contentEditable set to true
回答3:
That could be a div the styled during events and as other suggested make it contentEditable. With regards to textarea I have read similar question here. Check it if it's what your looking for.