4

我们的网站最近被一个推出到 IE 的新插件所击中。该插件适用于检测电话号码并在其旁边添加电话号码链接的 Lync。这通过添加指向正在保存的数据的链接来影响我们的富文本编辑器实现。有谁知道如何使用某种元标记或其他脚本禁用此插件?

我正在考虑删除保存时添加的 html,但这是一个非常笨重的解决方案。任何想法,将不胜感激。

谢谢-斯科特

4

2 回答 2

1

更新答案:用 CSS 隐藏图标更容易:https ://stackoverflow.com/a/18402758/1469525

原答案:

似乎不存在禁用插件的元标记。

通过反复试验,我发现 MS Lync 无法识别不间断的连字符。所以我写了一个 jQuery 插件,用不间断的连字符 ‑ 字符代码替换电话号码中的连字符。MS Lync IE 插件在 javascript 完成后运行,因此它不会看到电话号码,也不会添加图标。

更多细节在我的博客上,或者只看代码:

/* Hide phone numbers from MS Lync plugin */
/* by using non-breaking hyphens          */
/* usage: $('.phone').disableMSLync();    */
jQuery.fn.disableMSLync = function() {
  return this.each(function(){
    this.innerHTML = this.innerHTML.replace(/-/g,"‑");
  })
}
于 2012-06-26T16:20:06.893 回答
0

There are some interesting ideas in the following link for doing the same with the Skype plugin - not sure if these would work for you

Howto Remove Skype Plugin Markup with jQuery

于 2012-02-29T16:43:49.137 回答