WordPress WYSIWYG editor automatically adding span classes with style

For some reason my WYSIWYG editor in WordPress automatically adds span classes with style when I create a bullet list with the button. It’s very annoying because I want my text to be a certain size, but the span class hardcodes the style and it messes the size up.

Does anyone know how to remove this automatic adding of the span class?

Read More

This site is for a customer and he/she doesn’t know how to use HTML, that is why this has to work with the WYSIWYG editor.

Help much appreciated. Thanks.

Related posts

Leave a Reply

2 comments

  1. I have the same problem, and I am not copying, each time I create a list, the editor adds in the code:

    the text

    to the text of the list.

    How can I get rid of this ?


    I have just find a solution that works for me in that post:
    http://wordpress.org/support/topic/strange-behaviour-making-lists-in-the-visual-editor

    If you use a child theme, just add this function to your functions.php file:

     /**
     * I want to use the basic 2012 theme but don't want TinyMCE to create
     * unwanted HTML. By removing editor-style.css from the $editor_styles
     * global, this code effectively undoes the call to add_editor_style()
     */
    add_action( 'after_setup_theme', 'foobar_setup', 11 );
    function foobar_setup() {
      global $editor_styles;
      $editor_styles = array();
    }