JS widget/code (first post)

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.

Have a look at Developer’s guide to Discourse Themes.

1 Like

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

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.

2 Likes