CMS help pages

Print this page
You are here: Home > [Developers] > Templates > Text

Text tags

type=text

When the user right-clicks on the TEXT tag the editor will pop up to allow the user to edit the content of the tag.

The nohtml parameter

This forces the editor into "plain text" mode. This means that line breaks will be true crlf's rather than <br> or <p> tags. The main use for this property is where <br> or <p> tags would spoil the appearance of your design, in a slim footer for example. It may also be used where the editable area is within <pre> tags.

Example 1:
<si5 type=text id=edit1> or <si5 id=edit1> will create an editable text area

Example 2:
<pre><si5 id=text1 nohtml></pre> the "plain text" editor will be invoked when the user right-clicks this tag

The html parameter

This allows the user to enter any HTML or script into the editable area. Useful for code such as Google Adsense or Google conversion tracking.

Note that the content of tags with html set will only be rendered in preview mode. This is to ensure that if users enter dodgy html that prevents the page being displayed properly, they can always recover editability by switching to non-preview mode.

When using the html parameter, always use textsource/texttarget (see below)otherwise the HTML will not be editable.

type=textSource and type=textTarget

These tags allow the user to edit text that would normally be invisible. The id of the source and the target must be the same. The text editor will pop up when the user right-clicks on the textSource tag. The editor will generate straight text without any html tags.

Example 1:
<si5 type=textSource id=alt1>
<img src="image.gif" alt="<si5 type=textTarget id=alt1>">

The first tag will present a user clickable area, the data from which will replace the second tag

Example 2:
<si5 type=textSource id=btnName>
<input type=button onclick="alert('Thank you')" value="<si5 type=textTarget id=btnName>">

This example allows the user to change the text showing on the button.
Note: Always use double quotes ( " ) if delimiters are required.

The script parameter

The script parameter defaults to "no". Use the default setting where the textTarget forms part of the html.
If the textTarget is within javascript code set script=yes. This will render the text "safe" for use within javascript.

Example:
<si5 type=textSource id=alert1>
<img src="image.gif" onclick="alert('<si5 type=textTarget script=yes id=alert1>')">

Note: Single or double quotes may be used as delimiters except where the script itself is enclosed in quotes as in the example above, in which case the textTarget tag must be enclosed in single quotes.

You only need to put in "script=yes" for the tag that is within script tags. If the ID is also used as rendered text, do not include "script=yes" otherwise the rendered text will show carriage returns as "\n\r".