去除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

常用的国内外延迟测速链接(generate_204)

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

为什么你睡了11个小时仍然觉得疲累?

《爱的博弈》约翰·戈特曼 (John Gottman)

ICEcoder显示汉字出现乱码的处理

让你一生都受用的85句话 (适合做QQ签名)

iPhone 4S用TFT屏 智能机主流屏幕详解

做微信朋友圈生意的30天实操总结

人际沟通黄金四大原则~真的挺不错的(转载)