It’s easy to get all kinds of information about a post on a Discourse instance using the Discourse API. We can even get the entire text of a post as HTML in it’s “cooked” form. Is it possible, though, to get the original Markdown that was typed in to generate the post via the API?
This theme-component will add a raw button
Thanks for the response. My question, though, is can I access the original Markdown via the Discourse API?
2 Likes
I am not sure with the API but this is another method of getting raw post.
And a topic with similar request.
I think you are talking about the topic/SLUG/id.json
endpoint?
If so, then by adding ?include_raw=true
to the endpoint the JSON for the posts in the topic will include raw.
4 Likes
Yes, that does it exactly - thanks Sam!!
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.