For API new topics, how do I make a new line? \n?

If I’m going to make a new topic with multiple lines in the body, how can I make new lines?

test\n ?

test\ntest

EDIT: For API posts, would it consider newline characters? How would I go about this?

You can have HTML in the value of the raw parameter. Using a <br> tag will give you a new line. Or you can use <p></p> tags to break your content into paragraphs.

The raw parameter is markdown, so you need two newlines to make a new paragraph.

4 Likes

You may need both carriage return and line feed.
\r\n

3 Likes

will html work? <br> and other things like <b> or <strong>?

Yes, Discourse markdown accepts a limited set of HTML. (Basically, anything you could already input.)

3 Likes