【问题标题】:Prevent CKEditor from filtering out the "tel" protocol防止CKEditor过滤掉“tel”协议
【发布时间】:2013-09-11 02:40:06
【问题描述】:

如何防止 CKEditor 过滤掉 tel 协议?

最好的情况是完全阻止 CKEditor 过滤。

HTML:

<a href="tel:1-800-222-3334"> (800) ABC - DEFG </a>

配置:

CKEDITOR.editorConfig = function( config ) {
config.toolbar = 'Full';    
config.forcePasteAsPlainText = true;    
config.width = '100%';  
config.height = '500px';    
config.toolbarCanCollapse = true;
config.format_p = { element: 'p' };
config.format_div = false;
config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre;address';
config.allowedContent = true;
config.extraAllowedContent = true;
config.toolbar_Full = [...];    
config.protectedSource.push( /<i[\s\S]*?\>/g ); //allows beginning <i> tag
config.protectedSource.push( /<\/i[\s\S]*?\>/g ); //allows ending </i> tag

}

【问题讨论】:

  • 我遗漏了toolbar_Full 值。

标签: javascript html ckeditor wysiwyg tel


【解决方案1】:

这里的问题不在于 CKEditor。过滤发生在服务器端,SharePoint 删除了href="tel:1-800-222-3334"。另一个讨厌 SharePoint 的原因。

【讨论】:

    猜你喜欢
    • 2021-10-14
    • 2013-01-18
    • 2018-05-27
    • 1970-01-01
    • 2015-07-11
    • 1970-01-01
    • 2011-04-06
    • 2021-11-08
    • 1970-01-01
    相关资源
    最近更新 更多