User Guide
Building Tag Editors 179
Using OPTIONLinearLayout
Here is a version of the mytag layout template that responds to user preferences for
single line or indented layout:
<taglayout>
<WIZIF OPTIONLinearLayout EQ ’true’>
<WIZSET Spacer = ’ ’>
<WIZELSE>
<WIZSET Spacer = Chr(13) & Chr(10) & ’ ’>
</WIZIF>
<mytag color="$${clrBGColor}"$${Spacer}face="$${fontFace}
"$${Spacer}size="$${txtSize}">
</taglayout>
The template would generate a tag based on the following user layout preference:
LINEAR:
<mytag color="White" face="Arial" SIZE="10">
NONLINEAR:
<mytag color="White"
face="Arial"
size="10">
Using TAGDATAUnknownAttributes
The TagDataUnknownAttributes tag contains the list of attributes that are contained
in the original tag string but are not supported by the editor. For example, you can
write an editor for the HTML tag input. that provides editing capabilities for all basic
attributes, however, the editor will not cover JavaScript event attributes such as,
onCLick). To prevent loss of what are in effect unknown attributes during the editing
process, the editor engine creates the TagDataUnknownAttributes variable
containing a list of unknown attributes together with their original values. You can
use this variable to “stamp” all the unsupported attributes at the end of the tag you
are generating.
<taglayout>
<mytag color="$${colorBGColor}">
<wizif TagDataUnknownAttributes NEQ’’> $$TagDataUnknownAttributes
</wizif>
</taglayout>
If you edit a tag <mytag color="Blue" onClick="CallThis">, the above template
preserves the
onClick attribute even though it is not supported in the editor.