2013-09-09 2 views
1

Как я могу предотвратить CKEditor отфильтровать протокол tel?Предотвращение фильтрации 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 

} 
+0

Я не учитывал значения 'toolbar_Full'. – iambriansreed

ответ

1

Проблема здесь не было с CKEditor. Фильтрация происходила на стороне сервера, SharePoint удалял href="tel:1-800-222-3334". Еще одна причина ненавидеть SharePoint.