How to manipulate “add media” pop-up

Is there any way to add your own button next to “insert into post” button on the “add media” pop-up? I would like the button to add my own shortcode tags around the inserted image.

The desired result:

Read More
[myshortcode]<a href="link"><img scr="img.jpg" /></a>[/myshortcode]

instead of just:

<a href="link"><img scr="img.jpg" /></a>

Related posts

Leave a Reply

1 comment

  1. There’s no easy way to add a new button at present, however the “image_send_to_editor” filter will let you modify the HTML that is returned for the post insertion.