WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have added some text on tinymce editor on load.
(Every time you click on Add new the tinymce editor load with this text.)

but problem is how to enable css class which are using in default text.


share|improve this question
up vote 6 down vote accepted

Use add_editor_style

e.g.: functions.php



share|improve this answer
You are Great . – Wordpress D Apr 11 '12 at 10:21

add_editor_style is recommended for theme. You can mce_css filter in plugin. The following sample code is from here

function plugin_mce_css( $mce_css ) {
  if ( !empty( $mce_css ) )
    $mce_css .= ',';
    $mce_css .= plugins_url( 'editor.css', __FILE__ );
    return $mce_css;
add_filter( 'mce_css', 'plugin_mce_css' );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.