Is there any way to provide an option on how the code gets inserted into the text field when using the WYSIWYG editor button?

I like the connivence of the button, but I don't like how inserts html and styles the image and the caption within the editor.

I would like the WYSIWYG button to simply insert the code [caption caption="Here is some text" align="left"][/caption] around the image/media.

I also seem to be having trouble when disabling the wysiwyg button it leaves the caption html instead of the caption shortcode.

Thanks for any help you can provide.

Comments

gmclelland’s picture

kmonty’s picture

Title: TinyMCE and WYSIWYG button » TinyMCE button inserts rendered Caption HTML into WYSIWYG
Status: Active » Postponed

While this is something that can be accomplished (as you note), I fail to see the real benefit of doing it (especially because most users will not be manually editing the HTML of the textfield. As you can see in the database, the caption is still stored as shortcode, not rendered HTML.

I'd accept a patch for this feature request, but I don't see the value in working on it (personally).