Title: Insert Element Hook
Last modified: August 30, 2016

---

# Insert Element Hook

 *  Resolved [Mark Wilkinson](https://wordpress.org/support/users/wpmarkuk/)
 * (@wpmarkuk)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/insert-element-hook/)
 * I was wondering whether there is, or plans to have a action hook that fires on
   the “Insert Element” button which, when pressed as the shortcode the WordPress
   post WYSIWYG.
 * The hook would fire then and have access to the shortcode attributes. Does that
   exist at the moment and if you could such as action hook be added?
 * [https://wordpress.org/plugins/shortcode-ui/](https://wordpress.org/plugins/shortcode-ui/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/insert-element-hook/#post-6306877)
 * Are you familiar with the `media_send_to_editor` filter? Here’s how we’re using
   it:
 * * [https://github.com/fusioneng/image-shortcake/blob/82b73cf6c86f038743d94320feda1459a79a2f2d/image-shortcake.php#L74](https://github.com/fusioneng/image-shortcake/blob/82b73cf6c86f038743d94320feda1459a79a2f2d/image-shortcake.php#L74)
   *
   [https://github.com/fusioneng/image-shortcake/blob/82b73cf6c86f038743d94320feda1459a79a2f2d/inc/class-img-shortcode.php#L329](https://github.com/fusioneng/image-shortcake/blob/82b73cf6c86f038743d94320feda1459a79a2f2d/inc/class-img-shortcode.php#L329)
 * Even though it’s a filter, you could use it like an action by just making sure
   you’re always returning the first supplied value.
 *  Thread Starter [Mark Wilkinson](https://wordpress.org/support/users/wpmarkuk/)
 * (@wpmarkuk)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/insert-element-hook/#post-6306981)
 * Thanks for getting back to me Daniel. I was not aware of that hook but thanks
   for sharing those code examples with me. I will take a look and see if I can 
   get something working. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Insert Element Hook’ is closed to new replies.

 * ![](https://ps.w.org/shortcode-ui/assets/icon.svg?rev=1130575)
 * [Shortcake (Shortcode UI)](https://wordpress.org/plugins/shortcode-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcode-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcode-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcode-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcode-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcode-ui/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Mark Wilkinson](https://wordpress.org/support/users/wpmarkuk/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/insert-element-hook/#post-6306981)
 * Status: resolved