User Guide

152
you can have multiple ATTRIB tags with the same NAME. This is common for more
complex tag editor dialog boxes where a single attribute value may have to be filled
into multiple controls.
Special ATTRIB tag variable names
The following special variables can be used:
$$TAGBODY This special tag attribute name is used when a control needs to be
populated by the body of a tag. An example of such a tag editor is the editor for the
HTML tag
TEXTAREA. The body of the TEXTAREA tag is filled into the txtTextAreaContent
control using the following
ATTRIB tag.
<ATTRIB NAME="$$TAGBODY" CONTROL="txtTextAreaContent"/>
$$TAGSTRING and $$WHOLETAGSTRING These attributes can be used to populate
controls with the start-tag string or the whole tag including its start-tag, body and the
end-tag. This allows ActiveX controls to be passed the entire tag for custom processing
and specialized tag editor behavior.
$$EmbeddedCodeString Represents just the text within a tag. It excludes the tag
name, delimiters, and white space outside the text block.
Generating a tag
The final stage in the process of building a tag editor is the definition of how a tag gets
generated from the date entered into the editor controls. The tag generation logic is
stored in the TAGLAYOUT block. This block contains a short template used to generate
the final tag string. The markup language used the
TAGLAYOUT template that was
originally designed for wizards and was therefore called Wizard markup language
(WIZML). Because of this, all the tags in this section begin with the WIZ prefix.
See Building Custom Wizards on page 173 for more info on WIZML. A good way to
get started is to have a look at the TAGLAYOUT sections of existing HTML tag editors
located in the \Extensions\TagDefs\HTML directory.
Variables passed to the layout template
WIZML is described in a separate section though a few things should be noticed.
WIZML supports variables as well as functions. The value of each control of the tag
editor is passed to the template using a variable with the same name. Therefore, a
ColorPicker named colorBGColor will pass its value in colorBGColor variable. The
TAGLAYOUT template can then use this data to generate the tag string.
<TAGLAYOUT>
<MYTAG COLOR="$${colorBGColor}">
</TAGLAYOUT>
The above example shows a simple layout template for a hypothetical tag with a single
attribute
COLOR. Notice that in WIZML variables are embedded using the $${}
delimiters. If the user chose
White in the colorBGColor ColorPicker, the above
template would generate the following tag:
<MYTAG COLOR="White">