如何从CKeditor中删除空标记
如何从CKeditor中删除空标记?我试过:如何从CKeditor中删除空标记,ckeditor,Ckeditor,如何从CKeditor中删除空标记?我试过: Regex.Replace(clean, "(<[/a-zA-Z]+?)([^>]*?)(>)", "$1$3"); Regex.Replace(input, @"<([^>/][^>]*)>(( )*|\s*)</\1>", String.Empty); config.allowedContent = true; config.removeFormatAttributes
Regex.Replace(clean, "(<[/a-zA-Z]+?)([^>]*?)(>)", "$1$3");
Regex.Replace(input, @"<([^>/][^>]*)>(( )*|\s*)</\1>", String.Empty);
config.allowedContent = true;
config.removeFormatAttributes = '';
Regex.Replace(干净,(]*?)(>),“$1$3”);
Regex.Replace(输入,@/][^>]*)>(()*\s*)”,String.Empty);
config.allowedContent=true;
config.removeFormatAttributes='';
在ckeditor的config.js中,但它不起作用。听起来像这里的问题: 应该可以定义是否允许标记为空:
// allow i tags to be empty (for font awesome)
CKEDITOR.dtd.$removeEmpty['i'] = false
如果您允许对每个标记都禁用它,那么它们应该被删除
我过去只玩过“I”标签盒。但是我相信所有其他标签也可以这样做。谢谢您的回复,但这在我的项目中不起作用。有JSFIDLE或您想做的事情吗?