Hide text?

Anyone an idea if hiding text is possible with discourse? I tried:

[hide]Wait is this working?[/hide] //Nope!

[spoiler]Wait is this working?[/spoiler] //spoiler seems to do something not sure what.

I would hope [spoiler] did this.

Lets test that out on this test kitty :smile::
[spoiler] http://screen-wallpapers.com/wallpapers/3661/bigpreview_Cute%20Kitty.jpg [/spoiler]

[spoiler]this[/spoiler]
should result in
[spoiler]this[/spoiler]

Doesn’t work. :frowning:

<input class="spoilerbutton" type="button" value="Show" onclick="this.value=this.value=='Show'?'Hide':'Show';">
<div class="spoiler"><div>
PUT CONTENT YOU WISH TO HIDE HERE
</div></div>

This works in pure html, but not here, the tags are just ignored:

PUT CONTENT YOU WISH TO HIDE HERE

I haven’t tried this yet in discourse but markdown dose have a spoiler feature. If you want to hid a spoiler you can use >!.

! This doesn’t work in the preview pain. In other sites.
! The disadvantage of this is it doesn’t work for hiding optional large blocks of text like in other forums.
! If you can read this with out mousing over, the spoiler feature dose not work in discourse…

Edit:
Now that I’ve tried it, it doesn’t work… There needs to be some sort of spoiler option, in a discussion board. And a collapsible text block would be nice.

Time for someone to write a discourse plugin for this.

The Discourse meta has a working [spoiler][/spoiler].

The plugin they use is located here: GitHub - discourse/discourse-spoiler-alert: A plugin for discourse to hide spoilers behind the spoiler-alert jQuery plugin

Why is a spoiler needed? Discourse was made to support discussions, to make it better.

Spoilers are extremely useful, especially when it come to trying to help out other people with code problems, posts could end up being absolutely gigantic without spoilers.

1 Like

Spoilers are handled generally different in discourse if I’m not mistaken. Instead of putting it in a collapseable container (which I prefer for just the reason you said above), it seems to blur the text (presumably by setting the color to transparent and adding a blurred text-shadow), at least from what I’ve seen in other Discrouse screenshots about spoilers, but it generally is delimited by the [spoiler] and [/spoiler] tags. Found a forum demo of a functional spoiler as I assume they are handled by default.

At any rate, I would also like to have a collapseable spoiler option for posts XD I’m not sure how plugins work, but maybe this would work (.rb files for Discourse?)

To separate large bodies of text into collapsible sections, so one only need see relevant sections.

It’d be great if the tag /collapse could be enabled. This would be perfect for those plugins that have lots of items to explain in their description, but don’t want it displayed until its clicked.

Everyone should know what I’m talking about, but if not, it’s similar to “Spoilers” here (scroll to his FAQ, installations, etc. spoilers):

The way its set up right now, if I post 10 screenshots of my plugin, some FAQ’s, a description, etc, its going to take up a lot of space.

For the time being, you can attempt to hack it in with the <details> and <summary> HTML tags. You’ll have to forego writing in Markdown if you do, though. That includes turning newlines into linebreaks, you have to write your own <p> and <br> tags. Extremely annoying.

Example 1

Example (click me)

Text that is hidden by default

<details><summary>Example (click me)</summary><blockquote><p>Text that is hidden by default</p></blockquote></details>

Example 2

Click to hide text

Text that is shown by default but can be collapsed

<details open><summary>Click to hide text</summary><blockquote><p>Text that is shown by default but can be collapsed</p></blockquote></details>
1 Like

^ neither of those work? They’re both shown.

1 Like

Works in the latest version of Chrome, but doesn’t work in the latest versions of IE or Firefox

1 Like

The first one works in the latest version of Edge, however the second one is not clickable to hide the text.

Edit: I thought it was posted in 2015, not in 2014…