Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

Thanks

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

Use add_editor_style

e.g.: functions.php

add_editor_style('custom-editor-style.css');

http://codex.wordpress.org/Function_Reference/add_editor_style

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

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
add comment

Your Answer

 
discard

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.