How to use the new add_editor_style () function in wordPress?

I found this article:

http://www.deluxeblogtips.com/2010/05/editor-style-wordpress-30.html

I created a child theme using the Twentyten theme as a parent. I am trying to have the WYSIWYG editor use a custom stylesheet.

I added this to my functions.php file:

add_editor_style(); 

Then I created the editor-style.css file in the child themes folder and added:

 html .mceContentBody { max-width:591px; } 

When I go to the WYSIWYG editor and use firebug to check the css that affects the .mceContentBody element, I see that it uses my stylesheet, but it is overloaded with the default editor -style.css from topic twenty.

How can I make it use editor-style.css instead of the standard one?

0
source share
3 answers

add_theme_support ('editor_style');

front

 add_editor_style('tinymce-styles.css'); 

assuming your custom css is in the root folder of your template.

+2
source

Try updating twentyten_setup in your theme functions.php file. Just copy and paste the entire twenty function into your theme.

0
source

Check your CSS for errors. I spent several hours pulling my hair out, wondering why Wordpress did not use my stylesheet. It didn't even turn on. Turns out I had an extra {in my css.

0
source

All Articles