holdtom
我为此编写的简单脚本:Jsfiddle选项:可选的字符计数器。突出显示几种不同颜色的图案。正则表达式。将匹配项收集到其他容器。简单的样式:字体颜色和字体,背景,边框半径和线高。Ctrl + Shift键可更改方向。//include function like in the fiddle!//CREATE ELEMENT:create_bind_textarea_highlight({ eleId:"wrap_all_highlighter", width:400, height:110, padding:5, background:'white', backgroundControls:'#585858', radius:5, fontFamilly:'Arial', fontSize:13, lineHeight:18, counterlettres:true, counterFont:'red', matchpatterns:[["(#[0-9A-Za-z]{0,})","$1"],["(@[0-9A-Za-z]{0,})","$1"]], hightlightsColor:['#00d2ff','#FFBF00'], objectsCopy:["copy_hashes","copy_at"] //PRESS Ctrl + SHIFT for direction swip! }); //HTML EXAMPLE: <div id="wrap_all_highlighter" placer='1'></div> <div id='copy_hashes'></div><!--Optional--> <div id='copy_at'></div><!--Optional-->玩得开心!