# Prefilled composer link generator

**URL:** https://meta.discourse.org/t/prefilled-composer-link-generator/326460
**Category:** Theme component
**Created:** [September 14, 2024, 1:02am UTC](https://meta.discourse.org/t/prefilled-composer-link-generator/326460 "2024-09-14T01:02:03Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [September 14, 2024, 1:02am UTC](https://meta.discourse.org/t/prefilled-composer-link-generator/326460/1 "2024-09-14T01:02:03Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | Adds a button at the bottom of the editor that generates a link to a prefilled composer based on the current content |
| 👓 | **Preview** | [Theme Creator](https://discourse.theme-creator.io/theme/Moin/prefilled-composer-link-generator) |
| 🛠 | **Repository** | [GitHub - moin-Jana/prefilled-composer-generator: Adds a button at the bottom of the editor that generates a link to a prefilled composer based on the current content · GitHub](https://github.com/moin-Jana/prefilled-composer-generator) |
| ❓ | **Install Guide** | [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

Install this theme component

This theme component adds a button next to the close button in the composer that generates a link to a prefilled composer using the current content. The button is displayed when creating a new topic, personal message, or when editing the first post of a topic or message. Additionally, there is a setting that allows you to specify which groups will see the button.

| Setting | Description |
| --- | --- |
| `restrict_to_groups` | Display the copy button only for members of the selected groups |

 ![This is a screenshot of a user interface showing a text box with the placeholder text "This is an awesome topic" At the bottom there is a link icon. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/0/c/f/0cfab87a6e72e8b1af6a75e308981c1fa80aa29a.jpeg)

 ![The image shows a computer screen with a pop-up window that contains a long URL for a prefilled composer link. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/1/c/4/1c456c07899c2ae494c6a8efce6dbbe95454a7c0.jpeg)

For information on how to create topic and message links manually, see the documentation on [Creating a link to start a new topic with pre-filled information](https://meta.discourse.org/t/creating-a-link-to-start-a-new-topic-with-pre-filled-information/28074) and [Creating pre-filled personal message links](https://meta.discourse.org/t/creating-pre-filled-personal-message-links/35984).

In addition to generating links for others, you can also use this button to convert your draft into a link. This serves as a workaround for the limitation of having only one draft at a time, allowing you to save and later continue working on your draft.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [September 14, 2024, 1:58am UTC](https://meta.discourse.org/t/prefilled-composer-link-generator/326460/2 "2024-09-14T01:58:48Z")

</div>

Nicely done! 🤩 :discourse:

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [September 14, 2024, 4:15am UTC](https://meta.discourse.org/t/prefilled-composer-link-generator/326460/3 "2024-09-14T04:15:41Z")

</div>

Pretty sweet awesome saves a lot of manual work

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [March 24, 2026, 2:19pm UTC](https://meta.discourse.org/t/prefilled-composer-link-generator/326460/4 "2026-03-24T14:19:32Z")

</div>

Hi @moin,  
This component started receiving a deprecation notice due to [these changes](https://meta.discourse.org/t/deprecating-hbs-file-extension-in-themes-and-plugins/398896). Do you mind [reviewing/approving the PR to update it](https://github.com/moin-Jana/prefilled-composer-generator/pull/10)?

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [March 25, 2026, 1:23am UTC](https://meta.discourse.org/t/prefilled-composer-link-generator/326460/6 "2026-03-25T01:23:55Z")

</div>

Merged. I noticed adding tags to links is currently broken. Like a lot of other components, this one is also affected by the changes to tags which happened at the beginning of this year.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [March 25, 2026, 2:36pm UTC](https://meta.discourse.org/t/prefilled-composer-link-generator/326460/7 "2026-03-25T14:36:54Z")

</div>

While this seemed to be an easy fix at first, it turned out to be a little more complicated. While the tags were an object as expected when you selected them in the composer (which was the change in core breaking the component), when you close and reopen the composer, the tags are still returned as strings instead of objects. A fix in core is already in progress, but in the meantime, the component can handle both objects and strings, so tags should be included in the links in all cases again.

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/e/5/8e57eb9cf6ee391b21494b464b31b4d2c734efd8.png)

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [March 26, 2026, 4:49am UTC](https://meta.discourse.org/t/prefilled-composer-link-generator/326460/8 "2026-03-26T04:49:43Z")

</div>

This is a sweet little admin aid! Love it. And clever fix just now.
