Archived topic
Sections Text Editor autocorrects my "Ä" (this is an "Ä" in German language
2 replies · Started by Klaus on July 5, 2019
Hello, the Sections text editor autocorrects my html "& A u m l ;" (this is an "Ä" in German language). But I don't like that. (I have a meta charset="UTF-8". Is it possible to protect my html "& A u m l ;" somhow? (It mysteriously doesn't happen on every page, but sometimes...). It autocorrects the html in the text-editor, thats what I don't want, on the front end of course I want to have an "Ä". Regards Klaus
(*It is the same with this form, my html code is automatically corrected in my backend view.)
Well, I found this snippet that does the job:
function fb_change_mce_options($initArray) {
$ext = 'pre[id|name|class|style],iframe[align|longdesc| name|width|height|frameborder|scrolling|marginheight| marginwidth|src]';
if ( isset( $initArray['extended_valid_elements'] ) ) {
$initArray['extended_valid_elements'] .= ',' . $ext;
} else {
$initArray['extended_valid_elements'] = $ext;
}
return $initArray;
}
add_filter('tiny_mce_before_init', 'fb_change_mce_options');
If you don't disagree I would say my question is resolved.
Kind regards Klaus
Hi there,
Yup Sections just uses WordPress' default editor so that solution should be good.
Glad you found it!