logo
Home XtGem- Templates- XtScript- bottom
XtGemmanual

XtScript routines

textarea pre switch

Switch between textarea and pre HTML tags

Example

<!--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>

Copy as text

This example reads visitor input (URL or cookies), so it is shown as code only. Copy it to your site to try it.

XtGem manual · all sections

Powered by XtGem
About us Contact Forum top