Text editor on WP caption [closed]

I’m trying to add the visual editor to image captions in wordpress. I’m somewhat able to but there are a few issues.

Here is a screenshot of what I currently have:
a busy cat http://www.pba-online.net/001.jpg

You can see “Visual” and “Text” there but no text editor buttons and the font is white.

I edited a core template file, which I know is not advisable but in this case, necessary:

the original code was :

<textarea {{ maybeReadOnly }}>{{ data.caption }}</textarea>

and I replaced it with

$settings = array( 'media_buttons' => false, 'wpautop' => true );
wp_editor( $content, $editor_id, $settings );

The issue are:
– no text editor buttons
– caption text is white
– when saved, it does not show the caption

On the post page and when I click edit on the image, the caption is there as you can see in the image below:

a busy cat http://www.pba-online.net/002.jpg

I’m looking at solving the 3 issues I have.

Thanks!

0

Leave a Comment