زر المشاركات الخام

: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
:hammer_and_wrench: Repository Link https://github.com/discourse/raw-post-button
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Features

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

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 by @EricGT :+1:


:discourse2: Hosted by us? Theme components are available to use on our Standard, Business, and Enterprise plans.

Last edited by @JammyDodger 2024-06-13T22:44:35Z

Check documentPerform check on document:
43 إعجابًا

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)

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 إعجابات

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?

5 إعجابات

Raw post dark colour isn’t applied in combination with the new Dark Mode setting:

This would be super useful :heart_eyes:, I’m often finding it difficult to copy longer chunks of raw text directly from popup, especially on mobile.

4 إعجابات

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.

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

إعجابَين (2)

بما أنني أعتقد أن هذا الزر يعرض فقط الإصدار الخام لمنشور، مثل https://meta.discourse.org/raw/152542

نحن نفتقد عنوان المنشور!
ألا يمكننا جعله السطر الأول؟
ربما مع ‘#’ مثل

# زر المنشور الخام

إعجاب واحد (1)

لا تحتوي المشاركات على عناوين، بل المواضيع.

يعرض الزر المحتوى الخام للمشاركات.

ومع ذلك، لماذا تحتاج إلى رؤية عنوان الموضوع في عرض المحتوى الخام لمشاركة؟

أنت تنقر على الزر الخام في عرض الموضوع، لذا فأنت تعرف بالفعل عنوان الموضوع، والذي يكون مرئيًا دائمًا في أعلى الشاشة.

عنوان الموضوع لا يتعلق حقًا بمحتوى المشاركة. لذلك، لا ينتمي حقًا إلى نافذة منبثقة تعرض محتوى المشاركة “الخام”. كما أنها لا تحتوي على أي محتوى خام لعرضه.

لذلك لست متأكدًا من مدى فائدة عرض هذه المعلومات. :thinking:

إعجابَين (2)

https://meta.discourse.org/raw/152542 يعطي النسخة الخام للموضوع، وليس لمنشور.\nالمواضيع لها عناوين.\nوأنا أحتاجها لأنني أستخدم هذه النسخ الخام لعمل نسخ احتياطية من محتوى ماركداون.

إعجابَين (2)