textarea pre switch
Switch between textarea and pre HTML tags
Example code
Show in textarea<!--parser:xtscript-->
get copy
if $copy == 1
var $textarea = textarea
var $text = Text
var $val = 0
endif
<!--/parser:xtscript-->
<{_$$textarea|pre}>
This is the content
to be displayed
</{_$$textarea|pre}>
<!-- The switch button -->
<form action="<xt:url>" method="post">
<input type="hidden" name="copy" value="{_$$val|1}" />
<input type="submit" value="{_$$text|Textarea}" />
</form>
Show in textarea Example output
Reload
This is the content
to be displayed