All articles

Elements

Work with elements

A Weft template is built from elements, which the app calls blocks: a heading, a table of line items, a two-column layout. In the hosted app, changing a template needs the editor role or higher.

You work on the canvas in its Flow view. The Paged view shows the printed pages, and you cannot select, add or move blocks on it. The left-hand panel, headed Outline, lists every block as a tree; the structure panel button at the far left of the app bar shows or hides it.

Add a block

Open the Add block menu from:

  • the + under the selected block on the canvas — the new block goes right after it;
  • the + at the end of the document — it goes last;
  • the dashed line and + that follow your pointer over the canvas — it goes above or below the block you point at, inside the same container;
  • Add block at the top of the outline — after the selected block, or last;
  • the + beside a column or grid cell in the outline, such as col 1 — at the end of that column or cell, even an empty one.

The menu has a Search blocks… box and three groups:

GroupItems
ContentHeading, Paragraph, List, Image, Barcode, Divider, Page break
DataTable, Repeat
Logic & LayoutConditional, Section, Columns, Grid
The Add block menu open beside the Outline panel. It has a Search blocks box, a Content group listing Heading, Paragraph, List, Image, Barcode, Divider and Page break, and a Data group listing Table and Repeat, each with an icon and a short description. The list scrolls on to the Logic & Layout group, out of view here.

Saved pieces appear under My components — see Reusable components. The new block arrives selected with placeholder content; a new Table or Repeat points at the first list it finds in your loaded data. For the page header, footer and covers, use Add header, Add footer, Add cover page or Add back cover in the outline — see Headers and footers and Cover pages.

Select a block

Click it on the canvas or click its outline row. Clicking an empty part of the page clears the selection. A block inside a repeat highlights every copy: they all come from one block.

A Repeat or Conditional draws only its contents and a Page break takes no space, so select those in the outline, as you would a block a condition is hiding.

The selection halo

A selected block shows a toolbar above it: a grip (Drag to move) and Formatting options, which expands it to:

  • Ask Buddy to change this — see Ask Buddy to edit;
  • Align left, Align center, Align right (headings, paragraphs, images) and Justify (headings, paragraphs);
  • Less space before, More space before, Less space after, More space after — 2 pt steps, for headings, paragraphs, lists and sections;
  • Duplicate and Save, which saves the block to your component library.
A selected paragraph on the canvas, with its toolbar expanded above it: a collapse arrow, a drag grip, a sparkle button for asking Buddy, alignment buttons L, C, R and J, minus and plus buttons for the space before and after, and Duplicate and Save.

The expanded toolbar keeps the grip and adds Collapse at its start. It stays expanded as you select other blocks, until you press Collapse.

In the Flow view, double-click the text of a heading, a paragraph or a cell in a table's ordinary rows to edit it in place; list items are edited in the properties panel — see Text runs.

Move, copy and delete

  • Drag the halo's grip; a line shows where the block lands, including inside a section, column or empty grid cell.
  • In the outline, drag a row's grip (Drag to reorder), use Move up or Move down in its ⋯ menu, or press Alt+↑ or Alt+↓ on a focused row.
  • Duplicate (halo, row menu, foot of the properties panel, ⌘D) puts a copy right after the original. ⌘C copies a block and ⌘V pastes it after the selection.
  • Delete (row menu), Delete block (properties panel) or the Delete or Backspace key removes it. A Section, Repeat or Conditional holding other blocks asks you to confirm.

Undo and Redo sit beside the template name in the app bar (⌘Z; ⌘⇧Z or ⌘Y). On Windows, use Ctrl in place of ⌘ in every shortcut here. Undo, redo, ⌘S, ⌘D, Delete and ⌘. work after a click on the canvas too, except while you are typing in text there: then ⌘Z undoes your typing and Delete removes characters, as in any text box (⌘S still saves, keeping what you typed). ⌘C and ⌘V copy and paste a block only when the canvas does not have keyboard focus: click the block's outline row first.

Select several blocks

Click one outline row, then ⌘-click others in the same container. The properties panel opens with Ask Buddy about 2 blocks, Group 2 blocks (wraps an unbroken run into a new Section) and Save 2 blocks to library — the number follows your selection. Ungroup section in a section's properties undoes a group.

The properties panel

Open or close it with ⌘. or the properties button at the far right of the app bar; selecting several blocks or a page region opens it for you. The switch at its head chooses Selection (the block's settings) or Document (theme, page and locale), and switching keeps your block selected. See Shared element properties and Document theme.

While you review a change Buddy proposed, editing pauses until you accept or discard it — see Review proposed changes.

Element kinds