0

As of version 3.5, Wordpress added Quicktags to the media description field witch is an improvement over the simple textarea.

However, I need a full Wysiwyg editor for a project I'm working on. How do I do that?

1
  • Please split that post into a question and a separate answer.
    – fuxia
    Commented Feb 6, 2017 at 23:35

1 Answer 1

0

This function added to functions.php does exactly that:

// Enables Editor in Media edit screen.
function add_editor_support_for_attachments($settings) {
    if( get_post_type() == 'attachment'){
      $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,ul,ol,li,code,close' );
      $settings = array(
        'wpautop'       => true,
        'textarea_name' => 'content',
        'textarea_rows' => 10,
        'media_buttons' => false,
        'tinymce' => true,
        'quicktags' => $quicktags_settings,
      );
      return $settings;
   }
}
add_filter( 'wp_editor_settings', 'add_editor_support_for_attachments' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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