TinyMCE WYSIWYG编辑器将空间符号转换为
默认情况下,实体。因为默认值entities
属性设置为将空间符号转换为
实体:
entities: "160,nbsp,38,amp,34,quot,162,cent,8364,euro,163,pound,165,yen,169,copy,174,reg,8482,trade,8240,permil,181,micro...."
要解决此问题,应重新定义
entities
初始化属性。例如:
tinyMCE.init({
entities: "38,amp,34,quot,162,cent,8364,euro,163,pound,165,yen,169,copy,174,reg,8482,trade"
});
要在WordPress中初始化TinyMCE选项,您必须将自己的挂钩添加到
tiny_mce_before_init
过滤器:
function wpse8170_change_mce_options($initArray) {
// other settings...
$initArray[\'entities\'] = \'38,amp,34,quot,162,cent,8364,euro,163,pound,165,yen,169,copy,174,reg,8482,trade\';
return $initArray;
}
add_filter(\'tiny_mce_before_init\', \'wpse8170_change_mce_options\');
可以调整的完整值列表,您可以在
TinyMCE Configuration 页和的最后一个链接
entities 选项