WARNING
The SiteSpinner tutorial, Adding Code, explains how to insert code into your project by using a code object. However, the tutorial discusses using code with your text object is in the Advanced Topics section and covers the Options and Filters settings of the text object. It then shows a simple example of using an in-line image farther down the page.
This part of the SiteSpinner tutorial is very important. In order to insert code in a text object, you need to modify these filters for the code to be interpreted correctly. Entering code in the text object without turning off the required filters will result in some pretty strange text being displayed.

The code filters you need to modify are shown marked in the example above with red arrows. These 4 characters (less-than sign, greater-than sign, ampersand, and quote mark) have special meaning in HTML code. In order to be displayed as normal text characters, SiteSpinner must convert them to a special code which tells your browser to display the characters instead of using it as code. That is why these filters are normally checked.
In order to use these characters for code in a text object, you need to turn the filters off. This will prevent SiteSpinner from converting them to the special HTML codes so your browser recognizes them as parts of your code instead of regular text.
Depending upon the code you want to enter, you may not need to turn off all of these filters. You will always need to turn off the Convert tag brackets <> filter. These two characters are used to indicate the beginning and end of code tags and must be passed to your browser exactly or your code will not be recognized.
Quote marks in HTML code are used to indicate non-numerical parameter values. However, most modern browsers will accept a single-quote or tick mark (‘) in place of a quote mark. This means that if you use a single quote mark in your code, you will not need to turn this filter off. The exception to this is if you need to use non-numerical parameters inside of non-numerical parameters. This could happen if you want to use in-line style code. This typically looks like:
style=”…”
and then used the quote marks for the non-numerical value within the style code. Fortunately, browsers can distinguish the use of the single quote used in code versus its use in text, so browsers will not get confused if you use contractions or possessive nouns in your text.
The ampersand filter only needs to be turned off when you need to use any of the other filter characters in your text and those filters are turned off. For example, if you turned off the tag brackets and then needed to use either the less-than sign or greater-than sign, then you would need to enter a special HTML code to indicate the desired character. HTML uses the ampersand as the leading character to represent these special codes, so this filter will need to be turned off in order to use the ampersand as an HTML character instead of a text character.
To enter any of the filter characters in your text when the filter is turned off, use the codes in the table below.
| For Character | Use Code |
| < | < |
| > | > |
| “ | " |
| & | & |
Now that you know how to configure text filters to enter code, where do you enter the code? That depends upon the code and what it is supposed to do. While you can enter any code you want, it does not make much sense to enter javascript or build tables since SiteSpinner already provides tools to insert these items into your project. Because the text object contains text, it makes a lot of sense to use CSS style codes to change the appearance of your text beyond what SiteSpinner is capable of doing.
Without going into what to enter (that is covered elsewhere), how to enter code is simply a matter of positioning your text cursor to the position of the text you want to enhance, and enter the code. If the code is designed to span a section of text, then you will need to move the cursor to the end of the text being enhanced and entering the ending code.
Entering code inside a text object really is simple. Deciding what you want to do with it is much harder.
Contact the LowTechGeezer
VM User's Forum
Bruceee's Sandpit
Webmaster's Corner
Other Useful Sites