# Spoiler Alert



## Reina de la Aldea

Hello,

I tried to use the Spoiler feature on a post for the first time without luck.  I determined that the HTML is wrong.  It should be "SPOILER]title of spoiler[/SPOILER".  The problem is that in the tag of the current HTML, the title of the spoiler appears in quotes.

Thanks for your attention

Paula


----------



## Paulfromitaly

Reina de la Aldea said:


> It should be "SPOILER]text of spoiler[/SPOILER".


I'm afraid not.

Tags always begin and end with a* [ ] *not with* "

BB codes*


[SPOILER]Simple spoiler[/SPOILER]
[SPOILER=Spoiler Title]Spoiler with a title[/SPOILER]
You have to click the following [ISPOILER]word[/ISPOILER] to see the content.



Spoiler



Simple spoiler





Spoiler: Spoiler Title



Spoiler with a title


You have to click the following word to see the content.


----------



## Reina de la Aldea

Paulfromitaly said:


> Tags always begin and end with a* [ ] *not with* "*


I put quotes instead because the text with [] was appearing as a "spoiler" button in my reply, and I wanted only the HTML (in text) to appear, i.e., I needed to use the "plain" tag (it's been many moons since I worked with HTML)

Here's the problem:  When the user types in a title in the "insert spoiler" dialogue box the HTML output is [SPOILER]"title of spoiler"[/SPOILER].  It should be [SPOILER]title of spoiler[/SPOILER] (no quotes around the title of the spoiler).

Thank you for your prompt reply to my OP


----------



## Paulfromitaly

Not quite.
If I click on the SPOILER icon, I get a dialogue box where I'm prompted to enter the spoiler title.
If, for example, my spoiler title is "spoiler title" and the content is "spoiler content", the BBcode will be the following:

[SPOILER="spoiler title"]spoiler content[/SPOILER]
this is the output:


Spoiler: spoiler title



spoiler content


and it works correctly.
The only way for me to replicate the BBcode format you posted is to manually type the (wrong) code.


----------



## Reina de la Aldea

I see what the issue is now.  I didn't realize that the spoiler content had to be entered between SPOILER tags  

Now I wonder if it might be an improvement to include a field for the spoiler content within the Insert Spoiler dialog box.  It probably isn't consistent with input standards, but it might help some who aren't familiar with (or have long forgotten) how HTML works.

Thank you very much for your help and your time


----------



## Paulfromitaly

Reina de la Aldea said:


> Now I wonder if it might be an improvement to include a field for the spoiler content within the Insert Spoiler dialog box. It probably isn't consistent with input standards, but it might help some who aren't familiar with (or have long forgotten) how HTML works.


That would make things easier, if it's feasible.


----------



## Reina de la Aldea

Paulfromitaly said:


> if it's feasible.


Yes.  As it stands, the box doesn't accommodate links, emojis, font styles other than normal, copy and paste, etc. -- things one might want to use in the course of entering the spoiler content.

What about generating, in the body of the message, via the Insert Spoiler dialog box, a highlighted message between the spoiler tags that prompts the user to enter the content there, something like [SPOILER]insert spoiler content here[/SPOILER], such that "insert spoiler content here" disappears as soon as the user begins inputting their content or (re)places the cursor between the spoiler tags


----------



## swift

Reina de la Aldea said:


> Yes. As it stands, the box doesn't accommodate links, emojis, font styles other than normal, copy and paste, etc. -- things one might want to use in the course of entering the spoiler content.





Spoiler: 🧐



www.WordReference.com

spoiler

_Trebuchet_


----------



## Reina de la Aldea

@swift, my fine friend and WR's wise wielder of words, 



Spoiler



_Touché! _


 the problem is not that one cannot include such things as links and emojis in the _body _of the message; it's that the Insert Spoiler dialog box doesn't accommodate them.  I'm suggesting that the output of that dialog be something like [SPOILER]type your spoiler here[/SPOILER], so that it is clear to the user how to exploit the spoiler tag


P.S.  @Paulfromitaly et al.,  I just noticed one cannot generate an in-line Spoiler.  Must it always appear blissfully alone on its own line?


----------



## Paulfromitaly

Not necessarily . You can surround it with text.


----------



## Reina de la Aldea

Paulfromitaly said:


> Not necessarily . You can surround it with text.


Only if you use the Ispoiler tag, which the Insert Spoiler dialog doesn't generate. Oops!


----------



## Paulfromitaly

Because the spoiler dialogue box is only for the second spoiler option (see post #2)
If you want your spoiler to be surrounded by text, you can choose option #3.


----------



## Reina de la Aldea

Paulfromitaly said:


> Because the spoiler dialogue box is only for the second spoiler option (see post #2)
> If you want your spoiler to be surrounded by text, you can use option #3.


Please specify what you mean by the "second spoiler option" and "option #3".  Thank you!


----------



## Paulfromitaly

Paulfromitaly said:


> *BB codes*
> 
> 
> #1 [SPOILER]Simple spoiler[/SPOILER]
> #2 [SPOILER=Spoiler Title]Spoiler with a title[/SPOILER]
> #3 You have to click the following [ISPOILER]word[/ISPOILER] to see the content.
> 
> #1
> 
> 
> 
> Spoiler
> 
> 
> 
> Simple spoiler
> 
> 
> #2
> 
> 
> 
> Spoiler: Spoiler Title
> 
> 
> 
> Spoiler with a title
> 
> 
> #3                                                                                                                                                                                                                                  You have to click the following word to see the content.


----------

