这似乎可以做到:
function allow_nbsp_in_tinymce( $mceInit ) {
$mceInit[\'entities\'] = \'160,nbsp,38,amp,60,lt,62,gt\';
$mceInit[\'entity_encoding\'] = \'named\';
return $mceInit;
}
add_filter( \'tiny_mce_before_init\', \'allow_nbsp_in_tinymce\' );
另请参见:
https://www.tinymce.com/docs/configure/content-filtering/#entities有什么改进建议吗?