Aizada_M
(Aizada M)
5 سبتمبر 2023، 7:48م
1
تحياتي، قد يبدو استفساري ساذجًا بعض الشيء، لكنني في حيرة من أمري بشأن كيفية الحصول على الكود أو مكون السمة الدقيق الذي يمكن استخدامه لإنشاء زر “نسخ” ضمن منشور نصي. في منشئ السمات في نسختي من المنتدى، يبدو أن هناك غيابًا مقلقًا لوظيفة لإنشاء زر لنسخ النص.
هذه لقطة شاشة لما أريد فعله:
من فضلك أخبرني كيف يمكنني تحقيق هذا التأثير
Moin
5 سبتمبر 2023، 7:56م
2
إنه إعداد موقع إظهار زر النسخ في كتل التعليمات البرمجية
Now live in core Discourse is the ability to show a copy button for codeblocks!
import { createWidget } from 'discourse/widgets/widget';
createWidget('my-widget', {
tagName: 'div.hello',
html() {
return "hello world";
}
});
This feature is off by default, but if your community could benefit from it, you can turn it on by enabling the show copy button on codeblocks site setting.
Some notes about the feature:
The button shows up on pre > code codeblocks, but not inline, …
6 إعجابات
Aizada_M
(Aizada M)
5 سبتمبر 2023، 8:08م
3
Moin:
codeblocks
أنا ممتن لك بعمق ! لقد كنت أبحث عن هذه الميزة طوال اليوم.
إعجابَين (2)
system
(system)
تم إغلاقه في
5 أكتوبر 2023، 8:08م
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.