Discourse | 2024-06-13 22:44:35 UTC | #1 |||| -|-|-| :discourse2: | **Summary** | **Raw Post Button** will add a button to the post menu. When you click the button, you'll get a modal / popover with the raw (markdown) version of the post. | :eyeglasses: | **Preview** | [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/raw-post-button) | :hammer_and_wrench: | **Repository Link** | :open_book: |**New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) [wrap=theme-install-button repoUrl="https://github.com/discourse/raw-post-button" repoName="Raw Post Button"] Install this theme component [/wrap] [quote] :discourse2: As this is an #official theme component maintained by the Discourse team, #support, #bug, #ux, and #feature requests can be made in the respective categories here on Meta, and tagged with the appropriate theme component tag. Click on a link below to get one started. :+1: [:question: **Support**](https://meta.discourse.org/new-topic?category_id=6&tags=raw-post-button "Ask for support on configuring and using Raw Post Button") [:bug: **Bug**](https://meta.discourse.org/new-topic?category_id=1&tags=raw-post-button "A bug report means something is broken, preventing normal/typical use of the theme component") [:eyes: **UX**](https://meta.discourse.org/new-topic?category_id=9&tags=raw-post-button "Discussion about the user interface of Raw Post Button, and how features are presented (including language and UI elements)") [:bulb: **Feature**](https://meta.discourse.org/new-topic?category_id=2&tags=raw-post-button "Discussion about how existing Raw Post Button features can be improved or enhanced, and how proposed new features could work") [/quote] ### Features ![post menu button|690x143, 75%](upload://mRXwOqCabqkBkUry2ETk3EdS1sv.png) ![raw modal|535x500, 75%](upload://35XLU75gzXcox3GPe6mHLzdP6ho.png) ### Settings | Name | Description |-|-| | min trust level | Minimum required trust level for the button to be visible in the post menu | Translation | Default |-|-| | button_title | Raw Post There's only one setting and that setting is `min_trust_level` ![trust level setting|690x134, 50%](upload://wpcAtXJ3v6vouQOKdaXxCcPIB8M.png) 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. ### Credits The idea for this component was [proposed](https://meta.discourse.org/t/more-than-two-levels-of-details/152421/5?u=johani) by @EricGT :+1:
>:discourse2: **Hosted by us?** Theme components are available to use on our Standard, Business, and Enterprise plans. ------------------------- EricGT | 2020-05-25 00:12:44 UTC | #5 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. ------------------------- Johani | 2020-05-26 13:46:19 UTC | #6 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. ------------------------- jrgong | 2020-05-29 10:03:23 UTC | #15 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? ------------------------- md-misko | 2020-10-01 04:12:57 UTC | #19 Raw post dark colour isn't applied in combination with the new Dark Mode setting: ![image|690x198, 75%](upload://rxw7qA6uAP1cXip45vLt86kjibI.png) [quote="jrgong, post:15, topic:152542"] How about to add a Copy button the the raw post popup? [/quote] This would be super useful 😍, I'm often finding it difficult to copy longer chunks of raw text directly from popup, especially on mobile. ------------------------- anon89147131 | 2020-10-22 19:43:14 UTC | #20 Hi there, I apologize for bumping. What could would I have to edit, exactly if possible, to replace the icon with another Font Awesome icon? Thanks, anythingoracve. ------------------------- EricGT | 2020-10-23 10:42:03 UTC | #21 There is no admin option to change the icon. AFAIK the only way to do it would be to clone the GitHub repository, modify the code by either hard coding a new icon, or adding a new option, then use the updated code on your site. You could also request that as a new feature, but there is no guarantee on when it would be done. HTH ------------------------- StefanoCecere | 2025-01-25 07:53:40 UTC | #22 since i think this button just show the *raw* version of a post, like https://meta.discourse.org/raw/152542 **we miss the post TITLE!** can't we have it as first line? maybe with a '#' like `# Raw Post Button` ------------------------- Canapin | 2025-01-30 19:22:23 UTC | #23 [quote="Stefano Cecere, post:22, topic:152542, username:StefanoCecere"] **we miss the post TITLE!** [/quote] Posts don't have titles, topics do. The button shows posts' raw content. Nonetheless, why would you need to see a topic's title in a post's raw content display? You click on the raw button in the topic view, so you already know the topic title, which is always visible at the top of the screen. The title of a topic does not really relate to the content of a post. Therefore, it doesn't really belong in a popup showing the 'raw' post content. It also doesn't contain any raw content to display. So I'm not sure how useful it would be to show this information. :thinking: ------------------------- StefanoCecere | 2025-01-25 13:51:57 UTC | #24 https://meta.discourse.org/raw/152542 gives the raw of a *topic*, not a *post*. topics have titles. and i need it because i use these raw to backup markdown versions of the content -------------------------