Use URL to compose a new message, with `body` adding new lines


First of all – thank you for the fantastic Discourse! It is literally outstanding!

Question: I am aware that you can pre-create a private message using URL, for example:

What I cannot make work, is &body param passing new lines to the message, I tried:\nType

… and:\\nType

… with no luck.

Is this even possible? If it is possible, could someone advise please?

1 Like

Hello Ilia :wave:t5:

Welcome here!

I believe the newline operator would not work in that way, and off the top of my head, I don’t have another option using the URL the way you have.

But looking at how you have written the URL, it seems you want to set a template users can use when they click the new topic link from where you set it. What I believe you can do here is use the topic template feature and set it for your preferred category where you want the new topic created, then you set this category in the pre-filled link.

How does this sound?

1 Like

Could you use the percentage code for new line? %0A%0D


Using %0A gives a linebreak, and %0A%0D pops in a blank line space.

An example:


Thanks a lot, Jammy! This is exactly what I was looking for and not sure how I missed that in the first place.

Thanks, Osioke. I will certainly utilize topic template feature.