# Adding an outside widget to composer

**URL:** https://meta.discourse.org/t/adding-an-outside-widget-to-composer/207563
**Category:** Development
**Created:** [October 29, 2021, 4:39pm UTC](https://meta.discourse.org/t/adding-an-outside-widget-to-composer/207563 "2021-10-29T16:39:14Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [October 29, 2021, 5:36pm UTC](https://meta.discourse.org/t/adding-an-outside-widget-to-composer/207563/4 "2021-10-29T17:36:28Z")

</div>

Ok so it sounds like you have already figured out how to add content to the composer? (If not, referencing this example may help [GitHub - discourse/discourse-gifs · GitHub](https://github.com/discourse/discourse-gifs) - this theme component opens a modal when the button is clicked from the toolbar, and then inserts content into the composer based on clicking some content in the modal).

If you’re trying to get a script to load and do something to the post content, I think this post might get you pointed in the right direction… using `loadScript` and `decorateCooked`: [Difficulties in correctly adding external JavaScript - #4 by StevenTammen](https://meta.discourse.org/t/difficulties-in-correctly-adding-external-javascript/118099/4)

---

_[View the full topic](https://meta.discourse.org/t/adding-an-outside-widget-to-composer/207563)._
