3
我使用這個插件突出的textarea:語法高亮顯示未檢測到新的生產線
http://www.jqueryscript.net/text/jQuery-Based-Text-Highlighter-For-Textarea.html
$('textarea').textareaHighlighter({
matches: [
{
'match': ['hello','dear','this is a test', 'text to match'], // will check for this matches
'matchClass': 'match' // on matched text this class will be added
}
]
});
的顏色出現,而不是在好的地方,也沒有檢測結束線。
當我啓動調試模式:
$('textarea').textareaHighlighter({
debug: true,
matches: [
{
'match': ['hello','dear','this is a test', 'text to match'], // will check for this matches
'matchClass': 'match' // on matched text this class will be added
},
{
'match': /([\%'])(?:(?=(\\?))\2.)*?\1/g,
'matchClass': 'tags'
}
]
});
這裏演示 https://jsfiddle.net/9at1jgfv/1/
你能不能演示現場演示| jsfiddle? –
@FastSnail:okey :) – Mimouni
@FastSnail:我通過鏈接演示更新了帖子 – Mimouni