How to put hidden 'spoiler' text in a post
-
wrote 12 days ago last edited by
Im doing some education material on a nodebb forum, where want the answer hidden until its clicked. I think its possible in HTML, as saw spolier somewhere before?
So to have something like
Why did the chicken cross the road
Answer
When Answer is clicked it changes to
To get to the other sideHow to enter this?
-
wrote 12 days ago last edited by
GitHub - NodeBB-Community/nodebb-plugin-spoilers: Allows you to embed spoilers in NodeBB post content.
Allows you to embed spoilers in NodeBB post content. - NodeBB-Community/nodebb-plugin-spoilers
GitHub (github.com)
I will update it for 4.x but it should still work if you install from the CLI
-
wrote 12 days ago last edited by
Published 1.0.1 which is compatible with 4.x and 3.x
-
wrote 11 days ago last edited by
Thanks @baris , could this be added to ACP extend so I can install without needing server access?
-
wrote 11 days ago last edited by
Now that it's upgraded it should show up in the admin page.
-
wrote 11 days ago last edited by
Is the word Spoiler hardcoded?
How to change if I want it to say Answer, for example?Also if my spoiler has 2 lines how to put page break in
E.g.
>! Line1 Line2To come out
Line1
Line2 -
wrote 11 days ago last edited by
-
wrote 10 days ago last edited by
In Federated messages, the !> doesnt work even between nodebb instances that have the plugin.
Not a big issue but its actually interesting that it doesnt work.
For example here a mastodon site sends that code in a post to a nobebb site that has spoilers installed,
when it displays the post why isnt the Functionality triggered?
-
Im doing some education material on a nodebb forum, where want the answer hidden until its clicked. I think its possible in HTML, as saw spolier somewhere before?
So to have something like
Why did the chicken cross the road
Answer
When Answer is clicked it changes to
To get to the other sideHow to enter this?
wrote 10 days ago last edited byNot sure why it doesn't trigger for fediverse posts. At the very least it should have turned into a blockquote. @julian will have to take a look at the fedi issue.
-
Not sure why it doesn't trigger for fediverse posts. At the very least it should have turned into a blockquote. @julian will have to take a look at the fedi issue.
wrote 10 days ago last edited by julian@community.nodebb.org 10 days ago@baris Mastodon posts are interpreted as-is, so that symbol combination is meaningless for Mastodon, and that is reflected in NodeBB
-
wrote 10 days ago last edited by
@julian yes I never expected it so function on Mastodon, of course not.
but when putting that symbol combination into Mastodon post, and sending it to nodebb you would think it would trigger nodebb side.
Actally its hard to understand how it doesnt activate spoiler on nodebb side, given its the same 2 characters.
Im more perplexed, than bothered, that it doesnt! -
@julian yes I never expected it so function on Mastodon, of course not.
but when putting that symbol combination into Mastodon post, and sending it to nodebb you would think it would trigger nodebb side.
Actally its hard to understand how it doesnt activate spoiler on nodebb side, given its the same 2 characters.
Im more perplexed, than bothered, that it doesnt!wrote 10 days ago last edited by@eeeee when Mastodon posts enter NodeBB we save the html in the database as-is (and sanitize it on output).
This is different from NodeBB internally which saves markdown into the database.
The spoiler plugin might not be matching the symbols because from remote communities the line begins with
<p>>! spoiler
instead of just with>!
itself.</p>