可视化编辑器令人蛋疼的取值
2011 六月 7
今天在做一个查询的子模块,沿用了原网页的gbk编码。
发现用kindeditor 出出来的值是这样的:
1 | <meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color:#4b4a4a;font-family:verdana, arial, helvetica, Tahoma;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;line-height:normal;">评价</span><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color:#4b4a4a;font-family:verdana, arial, helvetica, Tahoma;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;line-height:normal;">评价</span><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color:#4b4a4a;font-family:verdana, arial, helvetica, Tahoma;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;line-height:normal;">评价</span><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color:#4b4a4a;font-family:verdana, arial, helvetica, Tahoma;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;line-height:normal;">评价</span><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color:#4b4a4a;font-family:verdana, arial, helvetica, Tahoma;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;line-height:normal;">评价</span><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color:#4b4a4a;font-family:verdana, arial, helvetica, Tahoma;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;line-height:normal;">评价</span> |
蛋疼啊,折腾了好久找不出原因所在。
后来用ckeditor 测试,发现情况与上面的一样。
我不甘心,再换,这次tinymce果然没有让我失败,post后取出来的值是正常的。
一下以来都是用quicktags的,没怎么用tinymce,没想到它的兼容性是相当的给力。
One Response
Post a comment










几大可视化编辑器都有这样那样的问题。 CKEDITOR的自动转换功能特烦。但TINYMCE没有删除WORD格式的功能,也麻烦。