• //https://www.tiny.cloud/docs/configure/content-filtering/#extended_valid_elements
    function vasu_format_TinyMCE($p){
    $p[‘remove_linebreaks’] = false;
    $p[‘extended_valid_elements’] = ‘h1[class|vasu_toc],h2[class|vasu_toc],h3[class|vasu_toc],h4[class|vasu_toc],h5[class|vasu_toc],h6[class|vasu_toc]’;
    if (isset($p[‘entities’])){
    $p[‘entities’] .= ‘,160,nbsp’;
    }else{
    $p[‘entities’] = ‘160,nbsp’;
    }
    return $p;
    }
    add_filter(‘tiny_mce_before_init’,’vasu_format_TinyMCE’);

  • The topic ‘The best WP news 2018’ is closed to new replies.