Unfortunetly pressed submit before finishing my post
Sorry.
I also tried this one:
<match name="spoiler">
<regex>(?s)\[spoiler\](.*?)\[/spoiler\]</regex>
<replace>
<![CDATA[
<div style="margin-bottom: 2px;">
<b>Hidden text. </b>
<input value="Show" type="button" style="margin: 0px; padding: 0px; width: 60px; font-size: 10px;"
onclick="
if (this.parentNode.getElementsByTagName('div')[1].style.display != 'inline') {
this.parentNode.getElementsByTagName('div')[1].style.display = 'inline';
this.value = 'Hide';
} else {
this.parentNode.getElementsByTagName('div')[1].style.display = 'none';
this.value = 'Show';
}">
<div style="border: 1px inset; padding: 6px; margin-top: 3px;">
<div style="display: none;">{TEXT}</div>
</div>
</div>
Everything shows correctly except onclick param. Input doesn't have it. Should I add something somewhere else?