0

I'm search the topic about how to use tinymce in wordpress 3.5.1 and i not found. I'm writing plugin and i have textarea that i want to add timymce into What should i do to add tinymce into suppose that i have textarea like this

<textarea class="focus_des" name="focus_des" id="focus_des" ></textarea>
  • You should use wp_editor() to create TinyMCE instances. – Pat J May 22 '13 at 12:19
1

Use wp_editor(). There are many configuration options; you have to read the source to get all of them.

Example:

$editor_settings =  array (
    'textarea_rows' => 15,
    'media_buttons' => FALSE,
    'teeny'         => TRUE,
    'tinymce'       => TRUE,
    'dfw'           => FALSE,
);

$content = $get_option( 'your_option_name' );
wp_editor( $content, 'your_editor_id', $editor_settings );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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