去除HTML标记,只保留粗体斜体超链接等js正则

var s = '

Editor Events

Page historylast edited by peter 7 years ago

There are several internal events sent from the nicEdit core that can be used in plugins and on your own javascript when doing advanced integration of the editor into your web sites.

blurSent when an editor instance loses focus
focus

Send when an editor gains focus (IE someone clicks inside it)

key

When the user presses a shortcut key (Such as control-b)

addFired when a new instance is added
panelFired when the toolbar is initialized for new instances (This is the preferred event if you want to add a function when NicEdit instances are created)

To attach functions to internal NicEdit events use the addEvent method on the nicInstance object

aaaa n

';

var r = s.replace(/<(?!/?b>|/?strong>|/?i>|/?em>|/?a(?=>|s.*>))[^>]+>/g, '');

document.write(r);

评论

Popular Posts

随身WiFi折腾指南: 解锁、刷机与DIY

Cromite - 极度注重隐私的Chromium浏览器

《赤い涙 》灼眼的夏娜剧场版插曲

求职面试时常被问到的65个问题与技巧性回答

伤不起的盖茨比——那些年,我们没逆袭到的女神

人类的十个有趣心理效应

电话销售技巧8:如何绕过前台

Alexa互联网信息公司中文官方网站

拒绝道德绑架,这才是真正的公益广告

感情的瓶颈期或者说磨合期该怎么度过?