Canvas workspace and document page

The workspace, the page, the preview frame, scrolling and how selection overlays work.

The canvas is the large area in the middle of the designer. It shows a preview of the document, with the selection and editing handles drawn on top.

Parts of the canvas

Part Description
Workspace The gray area around the page. It is the scrolling container
Document page The white page with a soft shadow. Its size comes from the page settings
Preview frame The page content is drawn by the real renderer inside a sandboxed frame
Overlay Selection outlines, hover outline, frame handles, guides and the drop indicator, drawn above the preview
Rulers Along the top and left edges, see Rulers

The preview is the real renderer

The canvas does not draw its own approximation. It compiles the template with the sample data and renders it with the same renderer that produces the output. Two small differences exist, both only in the canvas:

  • The gray backdrop and shadow that the Screen output adds around the sheet are removed, so the page edge you see is the true page edge. The real output is unchanged.
  • The frame is sized to the document, so a page never scrolls inside itself.

The frame is sandboxed: it has no scripts, a strict content security policy and cannot be focused with Tab.

Sample data and large lists

The preview uses the sample data from the Data tab. To keep the editor fast, every list in the sample is limited to its first 50 rows in the canvas (the host can change this with previewRows). A notice above the page names the lists that were shortened. The Data tab and the output are not shortened.

Scrolling

The workspace scrolls when the page is larger than the visible space at the current zoom. When the whole page fits, scrolling is switched off in that direction, so no scrollbar appears. Mouse wheel and trackpad scrolling work over the page as well as over the gray area. Ctrl or Cmd with the wheel zooms instead, see Zoom.

What you see in the overlay

Overlay Meaning
Dashed outline The element under the pointer
Blue outline and tint A selected element, with its id as a small label
Handles and a circle The frame editor for a selected element in a fixed region
Red lines Alignment guides while you drag
Blue line Where a dragged tool or layer will be inserted
Dashed card "Start designing" Shown on an empty document

Previews

The Screen, Print and PDF buttons choose the render target used by the canvas. See Screen, Print and PDF views. In Print and PDF the header and footer are printed in the page margins, so they are not drawn in the canvas and a notice says so.

Limits

  • The canvas shows one continuous page. It does not draw page breaks.
  • On-canvas text editing is not available. Edit text in the inspector.
  • Above the template node limit (5,000 nodes by default) the editor refuses the change and the canvas shows no document.

Binding a text element from the canvas

When one text element is selected, a blue label with its id sits above it. Drag the label to move the element. Click it to open the Bind to a data field popover that lists the binding paths of the sample data (for an element inside a repeater, the fields of the current row). Choose a path to replace the text with that binding. Other element types do not show the popover. The popover closes with Escape or a click elsewhere.

Scrollbars

Scrollbars inside the designer are 5 px thin.