Toolbars
The main editing space simulates a word processor. Common tasks are
supported by toolbars which are above the main editing space.
This screenshot shows the start template is still selected. That means
when the *.docx document is generated, it will start with the content
specified here. The following sections discuss toolbars which can help
you edit this content.
Document toolbar
The top tool on the Doc toolbar opens a header/footer editing
space.
When the header/footer editing space is showing it adds a new toolbar
as wide as the page, just above the typing space. The Show
menu lets you swap between different headers and footers.
Because the Different page 1 header/footer checkbox is
selected, there are four different objects that can be edited as shown
in the open menu above. Each object is optional. If the checkbox is not
selected, the editing choices are Header or Footer .
The Insert menu lets you insert page number or page count
values. Note that these values aren't used while editing in Tag, however
they get converted to page number and total
number of page fields in generated *.docx documents.
The header/footer editing space is closed by clicking the X (right of
the Show dropdown list), or by clicking the header/footer
tool once again to toggle it off.
The bottom tool on the Doc toolbar opens a Default
format settings dialog with multiple tabs. The This document
tab lets you set the default font, font size and paragraph alignment for
the current document.
The All documents tab provides access to global preferences
that work on all template documents.
The Bottom margin is picked up whenever you create a new
paragraph using the Enter key. The Font size multiplier
is used to change the appearance of fonts within Tag without changing
the specified font size that ends up in generated content.
The Remove empty paragraphs in output checkbox is helpful
because sometimes when you use conditional logic, you end up with an
empty paragraph. If this checkbox is true (recommended), empty
paragraphs are removed during generation.
The Block style updates tab creates custom named styles. More
precisely, it creates named bundles of format properties that you can
apply to blocks (paragraphs) with a simple menu selection.
You can modify font-related, alignment and margin format properties,
and save them as a group using any name you want. You can then apply
them to blocks while typing using a tool on the Block toolbar
as discussed below.
Editing toolbar
The Editing toolbar contains familiar editing tools including
cut/copy/paste . It also has placeholders for undo
and redo commands.
The find/replace menu has two options.
The Find/replace in displayed content... menu item opens a Find
and replace dialog. It works much like other find/replace dialogs
with one important difference. If you select the Use templates
checkbox, the replace-with part of the command will insert a
call-template instruction instead of typed characters.
An example of how this works is provided in the DOCX Import step-by-step
guide . It shows how to replace all occurrences of "She" with calls
to the He-She template, which will insert "He" or "She"
according to the current gender value when generating content.
The Search all templates within document... menu item opens a
Search dialog with a wider scope than find/replace. It searches
through all templates in a document rather than just the displayed
content. It can also search multiple files in a folder, or search for
expression fragments instead of text.
Inline toolbar
The Inline toolbar contains familiar inline text tools
including font , font size , bold , italic
and text color .
It also has a more menu (three vertical dots) which has a Force
a space menu item. This is sometimes needed when you have two
adjacent logic instructions, and want to ensure a space is inserted
between them in generated content.
The more menu also has an Inline properties... menu item
which provides a way to modify inherited properties for inline spans of
text. For example, if you bold a few words and select some of the bold
characters, you are selecting an inline span of text. This inline span
can also be used to change inherited format properties for all
characters in that span. This is shown below.
The Inherited value (Normal ) is shown read-only for
reference. You can change the Current value and it will only
affect the selected inline span of characters. You can also change font,
font size, italic and text color properties which are all inherited.
While inherited properties may not be commonly used on inline spans of
text, the same mechanism works on blocks and tables as discussed below.
Block toolbar
The Block toolbar contains familiar editing tools for block
(paragraph level) content including ordered/unordered lists , margins
and text alignment . It also has a block style update
tool (pen tip) that lets you apply block style updates to selected text
as discussed earlier.
The more menu has several items including Block
properties... , which works just like Inline properties...
above except these inherited properties are applied to selected blocks
instead of inline spans. The same list of inherited properties are
supported (font, font size, bold, italic and text color).
The Clear inline formatting menu item does what you would
expect, and removes all formatting instructions from the selected
blocks.
The next two menu items require a bit of explanation. Blocks are used
to group lines of text, just like paragraphs in a word processor.
Sometime you want this, and sometimes you want to work with text that is
buried within a block (e.g., create a dynamic phrase, or insert a name).
If your report contains a mix of block and inline level templates, then
you may get unexpected results in the generated *.docx file (e.g.,
vertical spacing that is too large or too small).
These menu items let you fix this issue. If the selected text already
has blocks, the Change blocks to plain text menu item will be
available, otherwise the Change plain text to block menu item
will be.
Finally, the Add space before and Remove space after
menu items are shortcuts for changing the space before/after of selected
blocks. When space is added, the default Bottom margin setting
discussed above is used as a space value.
Image toolbar
The Image toolbar allows you to insert images using the image
(top) tool.
If you select an image that is already in text, you can open the Image
properties dialog using the properties tool (bottom,
three horizontal dots).
The Image properties dialog lets you change height, width or
both of the selected image. If the Preserve aspect ratio
checkbox is selected, the original width-height proportion will be
maintained as image size changes.
Table toolbar
The Table toolbar handles all table editing commands. It
allows you to insert tables using the table (top) tool. When
inserting a table, you specify the number of columns/rows, table width,
table style, columns widths and inherited properties.
The more menu (three vertical dots) is enabled if you select
any text within a table. It contains several options for modifying a
table.
The Table/Row/Cell properties... menu items all work the
same. They open a properties dialog that focuses on only one part of the
table's structure (table, row or cell level). Inherited properties can
be assigned at all three levels, allowing you to easily create some nice
table formatting effects.
The Insert and Delete menus will add or remove
columns and rows based on the current selection. For example, if three
columns are selected and you select Insert / Column to right ,
three new columns will be inserted instead of one. The Delete /
Table menu item will delete the entire table.
The Select table and Copy table menu items are
convenience items to save you some mouse actions.
Logic toolbar
The Logic toolbar is where things stop working like a normal
word processor. It supports four kinds of logic instruction:
call-template (insert content from a named template)
value-of (insert the value of an expression, which may
include or combine data field values)
if (only insert fragment if an expression resolves to true)
choose/when/otherwise (insert the first when fragment with
an expression that resolves to true; if none do, insert the optional
otherwise fragment)
All of these instructions look the same when inserted within text - we
call them logic bubbles. They behave just like small images and flow
within text as you type.
When a document is generated, each logic bubble is replaced by the
content it represents. Instructions can be nested and combined in many
ways.
When a logic bubble is clicked, action buttons display to provide more
options.
Much of the power of logic instructions comes from expressions
which are discussed in the next section.
When several logic instructions are combined together, it can be tricky
to keep track of all the possible processing paths. The Decision
Tree graph provides a visual representation of logical flow as
described below.
When calling named templates, it is possible to pass additional data
(parameters) to the template using expressions. This is explained in the
Templates section below.
Each tool on the Logic toolbar remembers the last 10 ways
that you used it, and includes them as convenience menu items as
follows.
The Samples app
includes several examples that use templates like his-her and
he-she . The same technique is easily adapted for other,
different data setup files.