Build a page in the visual editor

v0.0.3

The visual editor builds a page on a live canvas: you place ready-made sections and your site's components, edit them in place, and check each screen size. The editor keeps your work in a draft while you edit, so visitors see nothing until you publish. This guide takes a new page from an empty canvas to a published page.

Before you begin

  • Sign in with an account that can open the page builder. It needs admin:dashboard:runtime:page or admin:dashboard:code, or a wildcard that covers one of them, such as admin:dashboard:*. See How permissions work.
  • Have a site to put the page on. The install wizard creates the first one.
  • To place components, install a UI kit on the site. The Blocks tab works without one, because its sections are plain HTML with Tailwind classes.

Create the page

  1. In the admin sidebar, under Runtime, click Pages.
  2. Click + Add Page. The editor opens with the Name your page dialog.
  3. Enter a Title and a Path. The path starts with /. For a page in each of the site's languages, start it with /:lang, as the Home page and the sign-in pages the install wrote do: /:lang/pricing.
  4. If you are signed in as a master admin, choose the Site too.
  5. Click Create.

the Name your page dialog over the editor, with Title "Pricing" and Path "/:lang/pricing" filled in and the Create button visible

The Name your page dialog asks only for what a page needs to be saved.

To edit a page that already exists, click View on its row in the Pages list, then click Visual Editor.

Add sections and components

A new page opens on This page is empty. Pick a structure: Single column, Two columns, Three columns or Hero + content. To start with nothing, click Start from scratch.

Two tabs of the left panel hold what you can place:

  • Blocks has whole sections, such as Hero, Features ×3, Pricing, Call to action, Contact form and Footer.
  • Components lists the components installed for your site. Type in Search components… to find one. A G badge marks a global component, which every site has, and T marks one only this site has.

Drag a block or a component onto the canvas. You can also click it, then click the spot on the canvas, or the layer in Layers on the right, where it goes.

the Blocks tab open in the left panel with the Pricing block picked and a blue drop line on the canvas, and the Layers tab open in the right panel

Drag a block onto the canvas, or click it and then click where it goes.

Edit text and settings

  • To change words, double-click the text on the canvas and type. Click outside the text to finish.
  • To change anything else, click the element. The Inspector tab opens with its settings under State, Layout, Typography, Appearance, Behavior, Attributes and Custom CSS. A component also shows its own properties above them. State, Behavior and Attributes start collapsed.
  • The toolbar above the selected element starts with a grip that carries the element's name. Drag the grip to move the element. Next come a four-arrow button, Layout, for columns, direction and spacing, then Ask AI, Comment, Duplicate and Delete. Hover an icon to see its name. A run of text has no Layout button.

The Custom CSS box takes rules for the selected element. The CMS checks them before it keeps them and refuses CSS with an error, naming the line and the column, such as That CSS has an error on line 2, column 22. It also refuses an @apply of a utility that does not exist, in Tailwind's words. While the stage says Draft, the CSS you apply is written into the draft beside the markup, so a reload of the editor brings it back and the new-tab preview shows it. It goes live when you publish.

Press ⌘Z to undo, ⇧⌘Z to redo, and ⌘K to open the command palette. On Windows and Linux, use Ctrl in place of ⌘. While you type in inline text, a text field or the Code window's editor, ⌘Z undoes the typing there. With the focus anywhere else, it undoes the page.

Hold several elements, and place them where they fit

  • ⌘-click or Ctrl-click holds a second element beside the selection, a link, a submit button or anything in a form included. A bar reads N elements held. A right-click on one of the held elements runs Duplicate, Wrap in a container, Delete or Paste styles on all of them as one undo step. A right-click outside the held ones acts on that element alone.
  • A box that will not take what you drag is outlined in red, with a chip that gives the rule, such as A <p> can only hold text and inline elements. A paragraph, a heading, a span and the other text elements hold only text and inline elements, such as a link, an image or an icon. A form, a list, a section or a div goes beside them, not inside. A <textarea>, a <title>, a <script> and a <style> hold text only.
  • Apply in the Code window follows the same rules. It refuses markup that breaks one, with the line and the column, such as Line 1, column 12: A <p> can only hold text and inline elements. It also names an EEx tag left open, a closing tag that does not match the element open there, and Elixir that does not parse, each at its line.
  • A drawer, a modal or a sidebar that opens over the page shows on the canvas as a chip. Click the chip to select it, or drag it to move it. To edit it in place, click Open on canvas in the Inspector's header, or the pin on its row in Layers. It stays open for this session only. A sidebar that stays docked on the screen from a breakpoint up is drawn in place already.

the Hero headline selected on the canvas, the element toolbar above it, and the Inspector tab open with its settings sections including Appearance

Selecting an element opens its settings in the Inspector tab.

Check each screen size

The device buttons in the top bar show the canvas as Desktop, Tablet (834px), Mobile (390px) or All breakpoints, the three side by side.

Desktop lays the page out at least 1180px wide and scales it to fit the canvas, so the canvas no longer shows the site's tablet layout. Tablet and Mobile scale down in the same way when the canvas is narrower than they are.

The device you pick also sets which screens a style change applies to. On Mobile, a change applies to screens up to 560px wide, and on Tablet, up to 900px. A change made on Desktop applies at every width that has no change of its own.

Preview the draft

To click through the page the way a visitor sees it, use Preview, then Open in a new tab, once a draft is saved. The tab opens at once under a Building preview… overlay and builds its stylesheet from the draft as it is, so what you changed shows in it. A page with no layout is drawn bare, in the preview, on the canvas and on the live page alike. See Share a draft and collect comments.

Publish the page

While you work, the button at the top right reads Draft, and the editor keeps each change in a draft. To make the page live:

  1. Click Draft, then choose Published. The button changes to Publish.
  2. Click Publish. The editor confirms with Page published.

Publishing makes the page active and writes the canvas to the live page. The CMS then compiles the page in a background job, and visitors get the new version.

the stage menu open at the top right, with Published selected and the button beside it reading Publish

Choose Published in the stage menu, then click Publish.

A red dot with a count sits beside the saved dot in the top bar. It says what Publish would refuse: a required property left empty, a required slot never added, text where a component takes a list or a map, a layout that no longer shows the page it wraps, an error page that shows nothing, and markup that will not compile. Click the dot to see the problems listed by element. Click one to select that element, with the Inspector on the property. A problem in the markup opens the Code window.

If you click Publish with problems, the editor answers Not published and names them. Drafts, autosave and Apply in the Code window still save a document with problems, so you lose nothing. If a draft cannot be saved, the editor says Can't be saved with the reason, and your edits stay on screen. The next change tries again.

Example: a pricing page

  1. Create a page titled Pricing at the path /:lang/pricing.
  2. Click Start from scratch, then drag Hero, Pricing and Call to action from Blocks onto the canvas, in that order.
  3. Double-click the hero headline, Build the site you already pictured, and type Plans for every team.
  4. Double-click $29 under Team and type your price.
  5. Click Mobile to see the three plans stack in one column.
  6. Click Draft, choose Published, then click Publish.

Next steps