Discourse Spoiler Alert provides the ability to hide content marked with a [spoiler] tag in posts.
Install Guide
This plugin is bundled with Discourse core. There is no need to install the plugin separately.
Enabling Spoiler Alert
This plugin is default enabled once installed but can be disabled/enabled from its settings, accessed from your admin/plugins page:
Features
Once enabled it adds a ‘Blur Spoiler’ option to the menu in the composer’s formatting bar. Simply highlight the text you’d like to blur and select ‘blur spoiler’ and it will wrap the selected text in the necessary [spoiler] tags:
[spoiler]
I wanna be your vacuum cleaner
Breathing in your dust
I wanna be your Ford Cortina
I will never rust
If you like your coffee hot
Let me be your coffee pot
You call the shots
I wanna be yours
https://johncooperclarke.com/poems/i-wanna-be-yours
[/spoiler]
I wanna be your vacuum cleaner
Breathing in your dust
I wanna be your Ford Cortina
I will never rust
If you like your coffee hot
Let me be your coffee pot
You call the shots
I wanna be yours
Clicking on the blur will reveal the hidden text, and clicking again will re-blur it.
It also works for images:
(to re-blur an image that is large enough to generate a lightbox, you can click on the adjacent white space or refresh the page)
Gibt es eine Möglichkeit, den Inhalt der Spoiler-Vorschau zu bearbeiten? Die aktuelle Implementierung sieht gut aus, aber sie abstrahiert nicht genug, was den Inhalt angeht, den sie verrät.
Hier ist ein Beispiel aus einem Thread, den ich erstellt habe, in dem Benutzer ihre Screenshots hochladen können. Wenn der Screenshot ein Spoiler ist, muss er als solcher gekennzeichnet werden. Wie Sie sehen können, funktioniert die aktuelle Implementierung im Kontext von Spoiler-Tags für Screenshots von kritischen Momenten in Spielen, Filmen usw. nicht wirklich.
Jeder, der das Spiel, das ich geteilt habe, kennt, würde sofort wissen, worum es geht.
Bearbeiten: Mir ist auch aufgefallen, dass, wenn ein Benutzer auf die Bearbeitungshistorie eines Beitrags klickt, der Spoiler enthält, die Bearbeitungshistorie den Inhalt nicht als Spoiler kennzeichnet.
Und wenn Sie mehr Unschärfe wünschen, wenn sich der Cursor über dem Bild befindet, fügen Sie diese Zeilen hinzu und ändern Sie 0,5em (mit einem Wert, der weniger wichtig ist als der vorherige)