Rich text
Rich text edits in place, styled exactly as it will be published. Each field allows only the tools its template lists, so nothing else can be typed, pasted or dropped in.
Click into a rich text field and a small dark toolbar appears above it. You're editing the page itself: headings, lists and quotes take on the site's own styles as you write.
Tools are set by the template
A rich field lists the tools it allows after its type:
<div>{{ body:rich:headings:lists:links:images:code }}</div>
Paragraphs, bold and italic are always on. Everything else is opt-in:
| Tool | What it adds |
|---|---|
headings | Headings at levels 2, 3 and 4. Level 1 belongs to the page's own title. |
lists | Bulleted and numbered lists. |
links | Links to other pages, sites, email addresses and phone numbers. |
images | Images with captions, kept in the page's folder. |
tables | Tables, with buttons to add and remove rows and columns. |
quotes | Block quotes. |
callouts | A set-apart box for notes and tips. |
embeds | YouTube and Vimeo videos. |
code | Inline code and code blocks. |
The toolbar only shows buttons for the tools the field allows. If you paste something the field doesn't allow, Verso keeps the words and drops the rest: a pasted heading in a field without headings becomes a paragraph, and pasted styles and classes are always removed.
Keyboard shortcuts
You can do most formatting without leaving the keyboard. On Windows and Linux, use Ctrl where this table says Cmd.
| Type or press | To get |
|---|---|
| Cmd+B | Bold |
| Cmd+I | Italic |
Cmd+E, or `text` | Inline code |
## then a space | Heading 2 (### for 3, #### for 4) |
- then a space | Bulleted list (* and + work too) |
1. then a space | Numbered list |
> then a space | Block quote |
``` then a space | Code block. Add a language first, like ```js, to label it. |
| Shift+Enter | A line break inside a paragraph |
| Cmd+Enter | Leave a code block |
| Tab | Indent inside a code block, or move to the next cell in a table |
| Cmd+Z, Cmd+Shift+Z | Undo and redo inside the field |
| Escape | Finish editing the field |
The shortcuts that start lists, headings, quotes and code blocks only work for fields that allow that tool.
Links
Select some text and press the link button. Type an address and press Enter. You can write a full address, an address on your own site like /journal/, or an anchor like #pricing. Verso fills in the rest when it can: hello@example.com becomes a mailto: link, and example.com becomes https://example.com. Click inside a link and press the button again to change or remove it.
Code
Inline code is for short things inside a sentence, like a file name. A code block keeps every space and line break exactly as you type it, and Enter adds a new line instead of a new paragraph. The language you type after ``` is saved on the block as data-lang, so a script on your site can highlight it. Verso doesn't highlight code itself.
Videos
In a field with embeds, paste a YouTube or Vimeo link onto an empty line and it becomes a video with a caption. Or use the video button and paste the link there. Verso stores one clean address for each video, using YouTube's privacy-enhanced domain, and loads it lazily. Links from other sites are turned down.
Tables
The table button adds a small table. While the cursor is in it, the toolbar grows buttons to add a row below, add a column to the right, and delete the row, the column or the whole table. Tab and Shift+Tab move between cells.
What's saved
Each rich field is saved as its own file next to page.json, named after the field, like body.html. It holds clean HTML with no classes, one block per line, so changes read well in git. The look comes from the "rich" map in verso.json, which gives each element its Elevate classes when the page is rendered. See Rich fields.