Title: Customizing html code for attachments generated by &#8220;Send to editor&#8221; button
Last modified: August 19, 2016

---

# Customizing html code for attachments generated by “Send to editor” button

 *  [rimu](https://wordpress.org/support/users/rimu/)
 * (@rimu)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/customizing-html-code-for-attachments-generated-by-send-to-editor-button/)
 * I _really_ need to customize the html-code for attachments inserted into the 
   post while pressing the “send to editor” button. After digging the code a bit,
   I found out that it is hardcoded into upload.js script.
 * I think that it is acceptable to hardcode elements of admin panels, however, 
   not the elements that go to the public side of the site. I looked through the
   2.5 code — it stayed the same re this issue. In my opinion, hard-hacking is not
   a good way to solve the problems. If I missed something, and there is actually
   a nicer way to customize this code, I would appreciate your tip very much.
 * Anyway, this thing pretends to be a CMS, so I think such a feature is a must.
 * Due to recent introduction of Shortcode API and galleries based on it, I thought
   that it would be ideal to insert shortcodes istead of the html-code, so that 
   will be no problem with JS and the html-code customization for attachments would
   be possible through Shortcode API.
 * P.S. I would like to thank developers for their hard work on such i fine free
   tool. Recently I’ve been into upgrading my site from nastily hacked WP 1.5.1 
   to 2.3.3, and I was so much amazed by extensiveness of improvements. Go on!

The topic ‘Customizing html code for attachments generated by “Send to editor” button’
is closed to new replies.

## Tags

 * [customization](https://wordpress.org/support/topic-tag/customization/)

 * 0 replies
 * 1 participant
 * Last reply from: [rimu](https://wordpress.org/support/users/rimu/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/customizing-html-code-for-attachments-generated-by-send-to-editor-button/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
