2007-05-12, 12:49 PM
This is just one of many functions I've added to my editor:
I thought you may like to play with it, until I populate the MyBB CodeBox with a lot more functions.
The version I use is MyBB-language compliant, I didn't want to put all of that in this demo for you until the editor is released as a fully-integrated MyBB functional CodeBox.
To install this demo:
Goto:
ACP / Message Filters / Custom MyCode / Add MyCode
MyCode title: Spoiler
MyCode description: Hides text, pictures and videos.
Regular expression: \[spoil\](.*?)\[/spoil\]
Replacement:
<div style="margin:20px; margin-top:5px">
<div class="smalltext" style="margin-bottom:2px"><strong>Click to: </strong> <input type="button" class="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
</div>
<div class="trow2" border="1" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">$1</div>
</div>
</div>
Demo: Spoiler Demo
Guest's can post in the above thread... Please don't Abuse it.