Navigation:  How to... >

Text Inserters (tick_24Pro, tick_24Std, tick_24Lite)

Previous pageReturn to chapter overviewNext page

CSE HTML Validator includes text inserters so that HTML/XHTML tags, CSS properties, JavaScript items, PHP items, and user customized text can easily be inserted (or "pasted") into documents.

How to Use the Inserters

To use the inserters, they must first be visible in the editor. Make sure that they are visible by using the editor's View->Inserters submenu. Note that you can move the inserters around to position them to your liking.

To insert text from a text inserter, simply select the menu item that represents the text that you want to insert. If there is a "|" character in the text, then the "|" character indicates where the cursor will be placed after the text is inserted. If document text is selected and an inserter item with a "|" character is selected, then the selected document text will be placed where the "|" character is. For example, if the document text "IMPORTANT" is selected and then an inserter item such as <strong>|</strong> is selected (such as from the Tag Inserter), then the result will be <strong>IMPORTANT</strong>.

When an inserter is no longer needed, it can be left open or it can be closed to save screen space. To close an inserter, use the editor's View->Inserters submenu or the Close Inserter menu item from the inserter itself.

How to Configure the Inserters

All the inserters can be configured by editing the inserter configuration file. However, AI Internet Solutions recommends that only the User Inserter be edited so that the other inserters, such as the Tag, CSS, JavaScript, and PHP Inserters remain standard. Furthermore, any changes made to the Tag, CSS, JavaScript, or PHP Inserter configuration files may be lost the next time HTML Validator is installed, reinstalled, or updated. Therefore, if you change one of these configuration files, then it is recommended that you backup these files in case your changes are ever lost. Changes made to the User Inserter configuration file will not be overwritten the next time HTML Validator is installed or reinstalled.

To edit an inserter's configuration file, load the configuration file into HTML Validator's editor (any text editor should work as well). An easy way to do this is to choose the Edit Configuration menu option from the inserter whose configuration you want to edit. For example, choose User->Edit Configuration to edit the configuration for the User Inserter. You can now edit the configuration to your liking. Please note the following:

Use the entries already available as examples when adding your own entries. For many examples, view the CSS or Tag Inserter configuration file.
Keep each comment and each tag on a separate line. Do not break a single tag onto more than one line.
Enclose all attribute values in double or single quotes. Use double quotes if the value contains one or more single quotes. Use single quotes if the value contains one or more double quotes.
All tag tags should be contained in a "csetaginserterconfiguration" tag.
tag tags define menu items in the inserter. These tags should be empty and end with '/>', not just '>'. They have the following attributes:
menu - What menu the menu item should be placed under; you can create your own menu names
submenu - What submenu the menu item should be placed under; you can create your own submenu names; use "->" to specify multiple submenus like in submenu='SubMenu1->SubMenu2'
flags - One or more of the following (add them together if more than one)
1 - Simulate pressing the enter key after inserting the text
2 - Never change the case when inserting text
4 - The menu item is a line separator
8 - Selecting the menu item causes the inserter to be closed/hidden
16 - The menu item is a CSS property
32 - Never change the case if an XHTML document
64 - Add a '/' before the '>' character if an XHTML document
command
1 - Selecting the menu item causes the inserter's configuration file to be loaded for editing
2 - Selecting the menu item causes the inserter's configuration file to be reloaded so that changes take effect
caption - The caption that is used for the menu item
hint - The hint that is used when the menu item is highlighted; this text usually appears in the status bar
image - The image that is displayed for the menu item
1 - same as File->Exit
2 - same as File->New from Template
21 - same as View->Editor
41 - same as Tags-><!-- -->
inserttext - The text that is inserted into the document when the menu item is selected. Note the following:
&#13; can be used to simulate pressing the enter key
&#8; can be used to simulate pressing the backspace key
&#9; can be used to simulate pressing the tab key
&#34; can be used as a double quotation mark
&#39; can be used as a single quotation mark
Use a '|' character to indicate where the cursor should be placed after inserting the text or where the selected text should be placed if the menu item is selected while part of the document is selected
Example tag tags (taken from the CSS and Tag Inserter configuration files):
<tag menu='B' flags='96' inserttext='<br>' hint='Forcibly break (end) the current line of text.'/>
<tag menu='F' flags='32' inserttext='<form action="|">&#13;&#13;</form>' hint='Use to contain an interactive form. HTML 4.01 requires "action" attribute.'/>
<tag menu='S' flags='32' inserttext='<strong>|</strong>' hint='Indicate stronger emphasis. Use "em" to indicate weaker emphasis.'/>
<tag menu='F' flags='16' inserttext='font-family: ' hint='CSS1: Declares a specific font, generic font family, or both.'/>

When you are finished editing the configuration file, save it and then choose the Reload Configuration option from the appropriate inserter to update the inserter so that it will use the new configuration file. For example, choose User->Reload Configuration to reload the User Inserter configuration.