Interfaces such as Tag Insight and Tag Inspector require tag-specific information to operate properly. For instance, the Tag Inspector needs to know the attributes of the tag being entered, the type of each of those attributes, and, in some instances, the enumerated values of an attribute. Individual tag definition files store this information.
These tag definitions are stored in \Extensions\TagDefs\. For instance, all the information about the applet
tag is stored in \Extensions\TagDefs\HTML\Applet.vtm. The definition files are organized in language directories to prevent possible name conflicts between various markup languages.
Whenever you make changes to a VTM file or create a new one, save the file, then press Ctrl+Alt+Shift+C to apply the changes.
The following features use tag definition files:
You can customize existing tag definitions and create new tag definition files. Every tag editor file contains the following markup structure:
<tag>
<attributes> ... Defines tag attribute properties and behavior </attributes> <attribcategories> ... Defines logical grouping for tag attributes </attribcategories> <editorlayout> ... Defines the layout of a tag editor </editorlayout> <taglayout> ... Defines the tag generation template </taglayout> <tagdescription> ... HTML-based documentation for the tag </tagdescription> </tag>
You can create the definition file in three ways:
The attributes
block defines attributes inside the main tag
block.
See attributes
in the VTML Reference for syntax and usage information.
The attributes
block can only contain attrib tags. The following example demonstrates the definition of four tag attributes:
<attributes>
<attrib name="value"> <attrib name="title"> <attrib name="alt"> <attrib name="align"> </attributes>
In most cases, features such as Tag Insight require more than just the names of the attributes. You can use the attrib
tag to define the following attributes:
align
attribute)
The optional caption
attribute specifies the form in which the option appears in the drop-down lists, while the value
attribute specifies the underlying value used by the attribute.
See attrib
in the VTML Reference for syntax and usage information.
Use the attribcategories
section to define attribute categories. The categories are used to organize the attributes when viewed in the Tag Inspector. The attribcategories
block can only contain attribgroup
tags. The following example demonstrates the definition of four categories.
<attribcategories>
<attribgroup name="appearance"
elements="background,bgproperties,leftmargin,,topmargin"/>
<attribgroup name="colors"
elements="bgcolor,vlivk,alink,link,text"/>
<attribgroup name="misc"
elements="gizmo"/>
</attribcategories>
See ../VTML_Reference/attribgroup.htmlattribgroup
/a in the VTML Reference for syntax and usage information.