Discourse Spoiler-Alert

:mega: This plugin is now bundled with Discourse core and is enabled by default**. There is no need to install the plugin separately.

:discourse2: Summary Discourse Spoiler Alert provides the ability to hide content marked with a [spoiler] tag in posts.
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-spoiler-alert
:open_book: Install Guide How to install plugins in Discourse

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 :gear: 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:

Examples:

Inline:

[spoiler]This is a spoiler[/spoiler] 

This is a spoiler

Multiline:

[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

https://johncooperclarke.com/poems/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)

Settings

Name Description
spoiler enabled Enable the spoiler plugin. If you change this, you must rebake all posts with: “rake posts:rebake”[1]

:discourse2: Hosted by us? This plugin is available on all of our hosting tiers Spoiler Alert | Discourse - Civilized Discussion


  1. :discourse2: If you’re a hosted customer of ours, please contact team@discourse.org if you have any questions about needing to ‘rebake’ due to a setting change ↩︎

Last edited by @JammyDodger 2024-06-03T21:58:31Z

Check documentPerform check on document:
48 Likes

Moved to core:

3 Likes

:information_source: Discourse Spoiler Alert has now been bundled with Discourse core, so this plugin will no longer need to be installed separately. :partying_face:

If you self-host you should see some information on your dashboard about removing it from your app.yml.

:discourse2: Hosted by us? This change will not affect you in any way. :+1: You can continue to enjoy this plugin and not worry about a thing.

1 Like

I don’t understand why this plugin is enabled by default. Isn’t it only useful for movie forums?

There are plenty of reason to hide text than movie spoilers. More than punchlines of jokes.

2 Likes

Is it possible to add a feature to show the spoiler content after clicking ‘like’ on the post?

You’re more than welcome to create a feature spoiler-alert topic :wink:

2 Likes

:wink:, I’m on my way.