Raw post button

This is a theme component that will add a button to the post menu. When you click the button, you’ll get a modal / popover with the the raw (markdown) version of the post.

Repository link
https://github.com/discourse-com/raw-post-button

Preview:
https://theme-creator.discourse.org/theme/Johani/raw-post-button

Samples

Settings

There’s only one setting and that setting is min_trust_level

This setting allows you to set a minimum trust level the current user needs to have before they can see that button. It defaults to TL0. Anons will never see it.

How do I install this theme component?

Follow the theme installation guide and add the theme component to your active themes.

If you’re new to Discourse themes, you can learn more about them here.

Credits

The idea for this component was proposed by @EricGT :+1:

31 Likes

Awesome.

Now it just needs to work as keyboard shortcut. Since r is not used, I would suggest that.

For those not use to using keyboard shortcuts enter ? when not in edit mode to open keyboard shortcut popup.

2 Likes

Per post keyboard shortcuts only work if the post is selected with J / K. When you have a post selected, the R key is already used for reply_to_post. So we need to find a different shortcut for that.

4 Likes

Great idea! It’s especially useful to post internal markdown templates for forum staff members in order to use them in wordpress, or any other markdown-“compatible” system.

How about to add a Copy button the the raw post popup?

4 Likes