A Question on Formatting
TappedOut forum
Posted on Feb. 7, 2015, 4:54 p.m. by StormBroken
Hi there, folks! Have a few quick questions to ask about TappedOut and text formatting. Just to clarify, what I'm asking about is not included in the brief article on text formatting available on the site.
On Epochalyptik's deck page for:
Dominus - Dreamcrusher Edition Playtest
Commander / EDH
SCORE: 429 | 128 COMMENTS | 123246 VIEWSThere's a blue link under the Primer section that you can click to open it. How would one go about doing this for your own deck description?
Thanks!
StormBroken says... #3
Hot damn, Epochalyptik. Thanks for the help, sir! Now my deck description will finally look decent.
February 7, 2015 5:07 p.m.
ABadMagicPlayer100 says... #4
I tried this on my deck and couldn't figure out how to make it work...
February 7, 2015 5:13 p.m.
Epochalyptik says... #5
The code I listed above is self-contained. It works on its own.
If your code isn't working, you may have accidentally deleted some of the code itself while adding content. If you're using multiple sets of spoiler text, make sure all of the IDs are unique to each set of spoiler text and the code that supports it.
February 7, 2015 5:23 p.m.
Epochalyptik says... #6
Update: I double checked the above code and correct a misplaced >. The code should now work if copied and pasted.
February 7, 2015 5:32 p.m.
StormBroken says... #7
Epochalyptik: one last question. The HTML code worked for showing/hiding the content, however, you can click on the content to hide it instead of just clicking on the "Hide" link. If you were to accidentally click on the content, you would close it. Any suggestions to remedy this?
February 7, 2015 5:32 p.m.
Epochalyptik says... #8
Update part II: The above methods of creating spoiler text have been added to the formatting guide.
February 7, 2015 5:33 p.m.
Epochalyptik says... #9
@StormBroken: That issue was caused by a misplaced > symbol. The above code is now correct. If you edit your own implementation of the code, add a > symbol to the /a tag just before the content.
February 7, 2015 5:35 p.m.
ABadMagicPlayer100 says... #11
Mine still won't work. Even if I copy-paste this without editing, shows the Show/Hide and followed by the content whether the spoiler is expanded or not.
February 7, 2015 5:54 p.m.
Epochalyptik says... #12
@ABadMagicPlayer100: You must be doing something with the code itself. Copy your code into a comment and post it here so I can take a look at it.
February 7, 2015 6:15 p.m.
Epochalyptik says... #13
Actually, I think I know what's happening. The content itself needs to be in <p> and </p> tags to paragraph it.
February 7, 2015 6:20 p.m.
Epochalyptik says... #14
See the new featured thread for more detailed information about this code.
February 7, 2015 6:25 p.m.
hyperlocke says... #15
Alternatively, if you like spoiler buttons and spoiling block elements (lists, images,...), you can use this code.
February 7, 2015 6:26 p.m.
hyperlocke says... #17
It's completely written by me, the inspiration came from some code flying around in an ancient thread (at least half a year, can't find it. Could have been Femme's.)
February 7, 2015 6:52 p.m.
Epochalyptik says... #18
I'll credit you in the new thread in a couple minutes.
February 7, 2015 6:58 p.m.
Epochalyptik says... #19
For some reason the original code is now acting up. I changed the spans to divs and it seems to work.
February 7, 2015 7:04 p.m.
hyperlocke says... #20
@Epochalyptik: Cool, thanks! Can you edit/delete my comment on the other thread, so that people don't follow the now unnecessary link?
February 7, 2015 7:26 p.m.
Epochalyptik says... #21
I'll leave it up because it doesn't really hurt anything.
Also, I implemented the button code in Dominus - Dreamcrusher Edition. I like it.
Epochalyptik says... #2
Copy and paste verbatim.
<a id="show_id1" onclick="document.getElementById('spoiler_id1').style.display=''; document.getElementById('show_id1').style.display='none';" class="link"><b>SHOW</b></a><div id="spoiler_id1" style="display: none"><a onclick="document.getElementById('spoiler_id1').style.display='none'; document.getElementById('show_id1').style.display='';" class="link"><b>HIDE</b></a><br /><br />
<p>Content goes here.</p>
<br /></div>
Each "id" needs to be the same within this block of code. If you use multiple instances of these blocks, then each block must have a unique id.
There's also this method, but it works on fewer browsers. Notably, Firefox doesn't support this tag.
February 7, 2015 5:01 p.m.