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

《活法》作者:[日]稻盛和夫 pdf下载

Microsoft 365安装包下载(Office桌面应用)

中兴ZTE H618B 路由器固件刷机备忘

解决部分网站禁止复制内容的js脚本(无需安装插件)

使用AdGuard的公共dns屏蔽广告

麦当劳免费Wifi帐号密码及连接设置

浩方对战平台优化版 V2.05 部分去除浩方广告和弹出窗口

Debian 12上使用Nginx代理TCP流量,并配置IPv6白名单访问控制

传说中的脑袋进水

月光宝盒 - 提供网站数据备份服务