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?

  • Please split that post into a question and a separate answer. – fuxia Feb 6 '17 at 23:35
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, privacy policy and cookie policy

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