Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从CKeditor中删除空标记_Ckeditor - Fatal编程技术网

如何从CKeditor中删除空标记

如何从CKeditor中删除空标记,ckeditor,Ckeditor,如何从CKeditor中删除空标记?我试过: Regex.Replace(clean, "(<[/a-zA-Z]+?)([^>]*?)(>)", "$1$3"); Regex.Replace(input, @"<([^>/][^>]*)>((&nbsp;)*|\s*)</\1>", String.Empty); config.allowedContent = true; config.removeFormatAttributes

如何从CKeditor中删除空标记?我试过:

Regex.Replace(clean, "(<[/a-zA-Z]+?)([^>]*?)(>)", "$1$3");

Regex.Replace(input, @"<([^>/][^>]*)>((&nbsp;)*|\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或您想做的事情吗?