Passing draft text into a new response

I am interested in adding a draft text parameter to topic or post viewing URLs such that when the topic or post is opened, it also automatically opens the reply interface and populates the reply with the draft text (for review, revision, and possible submission). Is this already a feature (or related to a feature) that I haven’t discovered yet?

To clarify, this is one possible strategy for the use case I have in mind, and it also might be a useful feature in its own right. So let me take a step back and consider the larger use case:

I’m grateful for the embedding comments feature, and I want more. In particular, I want users to be able to select text on the embedding page and have that text be included (as a quote) in a new post when they navigate over to the forum.

One possible way to do this might be the draft text parameter I sketched at the beginning of this post. I started peeking into the topic and posts controllers, but I’m very new to the Discourse codebase, so if anyone wanted to pair up with me on this, that would be fun (for me). (The iframe conversation over in the Docuss topic also seems somewhat relevant here.)

This idea could also be the first in a whole line of features for integration of topic and post information into the embedding page. Admittedly, all of this looks something like other conversations around integration with, but the vision is certainly more tightly bound to a particular Discourse instance. If we want to have a separate site be a rich client of a particular Discourse instance, is the User API keys approach the way to go? That seems heavy and expensive, but maybe a more direct user authentication pathway is insecure.


Yes, there is already an existing feature to initiate a topic with a hyperlink, as well as category topic templates – which is a default reply, pre-populated for any new topic in that category. You can set that by editing the category.


Thanks for responding, Jeff! Yeah, I’ve been very happy to use category topic templates for helping our community to follow guidelines for topics in particular categories.

I feel concerned that I may not have been clear, though. What I am wanting (at least with the first idea in my original post) is to be able to pass in a query parameter to an existing topic such that the text of the parameter becomes the initial text in the “Reply” interface on that topic. So, for example with this topic, if you accessed (something like), then this topic would open, the Reply interface would show by default, and the text within the reply interface would contain “Referenced at:”.

But I also want to stress that this is just one possible approach to my actual goal, which is to be able to easily allow users to select text from a non-Discourse page and then include that text as a quote within a (related) Discourse post. I’m also curious for reactions on the other aspects of the discussion around this.