How can I prevent CKEditor from filtering out the tel protocol?

Best case scenario would be to prevent CKEditor from filtering at all.

HTML:

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

config:

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

}
有帮助吗?

解决方案

The problem here was not with CKEditor. The filtering was happening on the server side, SharePoint was stripping out the href="tel:1-800-222-3334". Yet another reason to hate SharePoint.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top