Skip to content
Folio Wiki

Folio 0.4.7: the editor, reworked. Toggles, callouts, richer table cells and link cards

· Sergii Kravtsov · Folio

Folio (foliowiki) 0.4.7 is mostly an editor release. You can fold a block in Markdown, give a callout your own emoji and colour, put headings, lists and images into table cells, and find and replace in a panel that matches the app. We also attacked the editor with random clicks and keystrokes in real Chrome, and fixed what broke. The full list is in the release notes.

Fold a block, in plain Markdown

A collapsible block is a callout of type toggle. It is closed for readers unless you write a plus. It can hold tables, code, diagrams, images and dividers, and the frame draws around them. Old <details> blocks still render.

Markdown
> [!toggle]- Rollback steps
> Run `make rollback` on the staging host.
A Folio page in the editor with a closed block, Known issues, and an open block, Rollback steps, that holds a paragraph and a table
Click the chevron or the title to fold. The /expand command inserts one.

Callouts you can change in place

Click the icon to change the type. The same menu sets an emoji and a colour, and they are saved in the Markdown. Click the label to write a title right there. A double click selects the title, a triple click the whole callout. The four callout buttons on the toolbar are now one button with a menu.

Markdown
> [!note|🚀|purple] Launch week
> Freeze on Monday, ship on Friday.
A purple Launch week callout with its type menu open: Note, Tip, Important, Warning, Caution, Toggle, an emoji button and eleven colour swatches
The type menu: type, emoji and colour in one place.
Two copies of a Warning callout in the editor: in the first only the title is selected, in the second the whole callout is selected
Double click selects the title. Triple click selects the callout.

One palette everywhere

Highlights, status badges and callouts now share one palette of 11 colours: grey, brown, orange, yellow, green, teal, blue, indigo, purple, pink and red. The picker is the same in all three places. Colours you already used keep their look.

The highlight colour picker open under the toolbar, above eleven highlighted words, eleven status badges and a pink callout, all in the same colours
The same eleven colours for highlights, badges and callouts.

Table cells that hold more

A cell takes headings (:h1[…] to :h3[…]) and quotes (:quote[…]), lists that start at any number, and images. The pinned toolbar works inside a cell, and block buttons that cannot go in a cell are greyed out. You can comment on selected text in a cell with the Comment button or ⌘⌥M. The table bar is now a + menu for rows and columns and a width dropdown, and it no longer wraps on narrow tables.

A table in the editor with a heading and a quote in one cell, a numbered list starting at 3 in another, and a picture in a third
Heading, quote, a list from 3 and an image, all in cells.

Select cells with shift-click and copy: they go to the clipboard as a Markdown table, and one cell goes as its text. Paste a Markdown table into text and it becomes a table of its own.

Two cells wide by two rows of a table selected in the editor, and below it the same cells pasted as a new table
Copied cells become a Markdown table when pasted.

Hover a link while you edit. A page link shows a preview with Open and Open in new tab. An e-mail address shows a card with Write. A web address shows a card with Open in a new tab. Cmd-click (Ctrl-click) opens any link without leaving the editor. Page previews now work in Reading too.

Two small cards over links in the editor: one with the address team@example.com and a Write button, one with a GitHub address and an Open button
E-mail gets Write, web addresses get Open.
A page preview card titled Release checklist with Open and Open in new tab buttons, shown over a link in the editor and over the same link in Reading
The page preview in the editor and in Reading.

Smaller changes

  • Images: a pasted image shows at once, and the image editor has a Delete button.
  • Numbered lists: click a number to choose where the list starts.
  • Clear formatting (⌘\) removes bold, italic, underline, strike, code and highlight, and keeps links.
  • ⌘D duplicates the selected lines.
An image on a page with its editor open: a description field, a size menu, and Delete, Cancel and Save buttons
The image editor, now with Delete.

Find and replace that matches the app

⌘F opens a panel with a match counter, case, regular-expression and whole-word toggles and a replace row. It is translated, and it no longer pushes the toolbar down.

The find panel at the top of a page with the word release typed, a count of 6 found, and toggles for case, regular expression and whole word
⌘F: counter, toggles and a replace row.

We tried to break it with random clicks

Hand testing does not find the strange cases. So we ran tens of thousands of randomised clicks, keystrokes, toolbar presses and IME compositions against the live editor in real Chrome, and fixed what broke. Four examples:

  • A caret could land before a hidden Markdown marker, such as the # of a heading.
  • A table could flip to its Markdown source on a click or a selection.
  • Formatting over several blocks could write raw markup into the page.
  • IME text could appear twice, and Backspace could merge two callouts.
A bar chart of failures found by the same random runs: 64 before the fixes and 11 after, beside a list of five bugs that were fixed
One run, same seeds: 64 failures before, 11 after.

In that run the failures went from 64 to 11 on the same seeds. The 11 that remain are known cases. This does not prove the editor is free of bugs. It shows that most of the cases we could generate no longer break it, and we keep running it.

Get Folio 0.4.7

Read the 0.4.7 release notes or pull the image ghcr.io/evergreen-it-dev/folio:0.4.7. For a first install, start with the install guide. To see the editor first, open the public demo; it is shared and resets daily. The code is on GitHub under the MIT license.

See it in a running Folio

Open the live demo and click through a real Folio instance, or install it and move one space over. Folio is open source and stores everything in Git.

All posts