Is there a way to get the markdown content rather than HTML content in posts via API?
-
I noticed that through API, the content is already parsed as HTML. Is there a way to get the orignal markdown one that user typed? Because I want to integrate the system into my app and want to parse the markdown by myself. Or do I have to parse it back to markdown manually?
Thank you so much.
Edit: I found this line: https://github.com/julianlam/nodebb-plugin-markdown/blob/9d5c444dc345429e4efcf8bd0087bb9e1ec8397c/index.js#L31
we can use
/api/post/:pid/raw
to retrieve a single post's raw markdown. But it there a similar api to let us get all posts' markdown in a single topic (e.g./api/topic/:tid/raw
)? -
I don't think so, unfortunately -- you'll have to make the initial call to get the topic, and then subsequent calls to grab the raw markdown. I don't think we'll be adding a way to retrieve the raw markdown at the topic level because we wouldn't have any use for it.