Every time I try to find a spoiler code, they either don't look right or just don't know what to say about it. So I came up with my own.
Name:
Regular Expression:
Replacement:
global.css:
Images to see how it'll look:
Name:
Spoiler
Regular Expression:
\[spoiler=?(.*?)\](.*?)\[/spoiler\]
Replacement:
<div class="spoilerBox"><div style="cursor:pointer;" class="spoilerTitle" onclick="jQuery(this).next().slideToggle(); jQuery(this).children('.spoilerOpen').toggle();jQuery(this).children('.spoilerClose').toggle();"><span class="spoilerOpen">Show</span><span class="spoilerClose" style="display:none;">Hide</span> $1</div><div style="display: none;">$2</div></div>
global.css:
.spoilerBox {
border-radius: 5px;
padding: 5px;
border: 1px solid #CCC;
padding: 10px;
background-color: #F5F5F5;
}
.spoilerTitle {
border-bottom: 1px solid #CCC;
font-weight: bold;
padding-bottom: 3px;
margin-bottom: 10px;
}
.spoilerOpen, .spoilerClose {
font-size: 0.8em;
float: right;
}
Images to see how it'll look: