• In HTML5, the b and i tags have an independient semantinc from strong and em tags (Although they look the same and the standard is not yet finished, but still). I actually have some usage for b and i, yet when I try to do so, the WYSIWYG editor replaces them with strong and em respectively. Similar thing happens with the u tag which gets replaced by a styled span. There may be other tags affected. There’s some way to avoid that?

Viewing 1 replies (of 1 total)
  • Thread Starter Andrés Sanhueza

    (@atoon)

    I solved it by reading the Codex and some TinyMCE documentation. Something like this has to be added to a plugin or theme function:

    function myformatTinyMCE($in)
    {
     $in['inline_styles']=false;
     $in['extended_valid_elements']="b,i";
     return $in;
    }
    add_filter('tiny_mce_before_init', 'myformatTinyMCE' );
Viewing 1 replies (of 1 total)
  • The topic ‘Avoid the WYSIWYG editor replaces b and i tags with strong and em’ is closed to new replies.