Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Hastimal Shah

    (@hastishah)

    I have added the below filter to allow span tag.. is any problem with that.

    function myextensionTinyMCE($init) {
        // Command separated string of extended elements
        $ext = 'span[id|name|class|style]';
    
        // Add to extended_valid_elements if it alreay exists
        if ( isset( $init['extended_valid_elements'] ) ) {
            $init['extended_valid_elements'] .= ',' . $ext;
        } else {
            $init['extended_valid_elements'] = $ext;
        }
    
        // Super important: return $init!
        return $init;
    }
    
    add_filter('tiny_mce_before_init', 'myextensionTinyMCE' );

    Yeah, this is the best feature of this plugin. I think they need to update it to fix this issue. Why WP doesn’t make this a standard setting in the edit menu is beyond me.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘P tag is disapper’ is closed to new replies.