# JS widget/code (first post)

**URL:** https://meta.discourse.org/t/js-widget-code-first-post/204284
**Category:** Development
**Created:** [September 23, 2021, 7:24am UTC](https://meta.discourse.org/t/js-widget-code-first-post/204284 "2021-09-23T07:24:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![valsha](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/valsha/32/230631_2.png) [@valsha](https://meta.discourse.org/u/valsha)
#### Post date: [September 23, 2021, 7:24am UTC](https://meta.discourse.org/t/js-widget-code-first-post/204284/1 "2021-09-23T07:24:41Z")

</div>

Good day,  
How can I add a custom (my own) JS widget/code to the end of the first post in the topic?  
Thank you.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 23, 2021, 10:34am UTC](https://meta.discourse.org/t/js-widget-code-first-post/204284/2 "2021-09-23T10:34:00Z")

</div>

Have a look at [Developer’s guide to Discourse Themes](https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648).

---

<div class="post-metadata">

### Author: ![valsha](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/valsha/32/230631_2.png) [@valsha](https://meta.discourse.org/u/valsha)
#### Post date: [September 23, 2021, 11:37am UTC](https://meta.discourse.org/t/js-widget-code-first-post/204284/3 "2021-09-23T11:37:16Z")

</div>

Thanks, I saw it. But it didn’t help me, that’s why I created this thread.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [September 23, 2021, 12:56pm UTC](https://meta.discourse.org/t/js-widget-code-first-post/204284/4 "2021-09-23T12:56:29Z")

</div>

For security reasons, Discourse doesn’t accept JS in post content. So you have two options:

1. Onebox  
If the widget you need can be embedded, use that. It’s what we do for Youtube, Codepen, Typeform, and many more.

2. Write (or commission someone to write it for you) a component/plugin  
If you can’t embed it, you will need either a plugin or a theme-component. The guide linked above teaches you how to start, but you can also describe what you need in detail in the #Marketplace category to commission it.
