Daobox Book

Tips

Tips

2026-09-16

0. Conventions

  • Unless noted otherwise, MD means a Markdown file.
  • The shortcut key Mod means Command on macOS and Ctrl on other platforms.

1. Quick MD editing

DaoBox is preview-first by design, so Markdown opens as the rendered result. While browsing, if you need a quick change, double-click where you want to edit—a pop-up editor opens and jumps to that spot. When you’re done, press Mod+Enter to save and close, or Mod+S to save only. Press Esc twice to leave the pop-up editor. For editing several places at once in source, see Tips.

2. Private zones

Tag blocks with #tag in extended attributes. #private is the system default private zone: it’s stripped during site preview / export, so readers never see it.

{#private}
This stays in the source file and is invisible in public rendering.

{#private}
## An entire private section

When placed on a heading, it covers content until the next heading of the same or higher level.

Other tags (such as {#draft}) can be added as needed; themes / templates control show/hide via an exclude list (exclude_tags) without editing the body. In-library writing preview has a separate title-bar toggle for whether excluded zones are shown—independent of public rendering.

3. What we add on top of common MD

Beyond standard Markdown / GitHub Flavored Markdown, DaoBox mainly adds:

Extended attributes {…}

Use curly braces to attach attributes to headings, paragraphs, links, images, and more; separate multiple items with spaces or commas:

SyntaxMeaningExample
#nameTag (not an HTML id){#private} {#draft}
.nameCSS class{.notice}
keyFlag with no value{tc underline}
key=valueKey-value; quote values that contain spaces or commas{color=red wh=1.5em}

Common attachment points:

{color=red tc}
# Red, centered heading

A styled [link](https://everkm.cn){color=orangered new-tab}

![Image](./a.png){corner=1em}

I am {color=red}#this# text.

Handy shortcut names: tl / tc / tr (alignment), ul / underline, color / bgcolor, pa / px / py, corner, wh / w / h, new-tab (open links in a new tab). For stable in-page anchors, write {id=section-name}.

While editing inside {, you can complete by prefix: # → tags in the library, . → classes, bare words → attribute names, key= → values already used for that key.

For private zones and tag exclusion, see Tips.

Prefer [[target]] so the system resolves the final URL—hand-written relative paths can break on export.

[[quick-start]]                 # slug or title (case-insensitive)
[[./faq/]]                      # relative to the current file’s directory
[[/docs/guide/quick-start.md]]  # logical path from the library root
[[./page#section-id]]           # with anchor (use a stable {id=...} on the target)
[[./faq/|FAQ]]                  # text after | is the display label

Rough match order: slug → title → path. With no prefix, the whole library is searched by path suffix; if multiple hits collide, use [[./…]] or [[/…]]. A trailing / resolves to the directory’s default page. You can also link to non-MD assets such as PDFs and images.

Division of labor with standard links: use [text](https://…) for external URLs; use internal links for in-library references.

5. Multi-cursor & bulk edits

In source editing (split view or the pop-up editor), you can change several places at once. After that, typing, backspace, and writing commands like bold / italic / lists apply to every cursor and selection.

On Mac, Alt is Option. Following an internal link is still Mod+click—separate from adding cursors.

ActionWhat it does
Alt+clickAdd a cursor at the click
Alt+dragRectangle / column select. Drag down along the end of lines to place a cursor at each line end (short lines land at their real end)
Select text, then Mod+DSelect the next identical match and keep accumulating; press again to keep going
Mod+Shift+LSelect every occurrence of the current selection (or word)
Mod+UUndo the last selection change (drop the cursor / selection you just added)—not the text; press again to step back further
EscCollapse all multi-cursors to a single cursor

Esc peels layers from nearest to farthest: dismiss completion first if it’s open; then find if it’s open; then collapse multi-cursors; in the pop-up editor, press twice more to close (see Tips).

Mod+U vs Mod+Z: the former only walks the cursor/selection stack; the latter undoes text edits.

With multiple selections, the right side of the status bar shows “N selections”; click it to collapse to one cursor (same as Esc). It stays hidden for a single selection.

6. Export PDF / Word, or share one post

With a Markdown file open, use the menu to export the current preview as PDF (including print preview; multi-column, landscape, and base body font size) or Word. You don’t need a full site export first.

To put one note online for others, use single-post sharing to Youlog: publish to youlog.net, optionally with an expiry. Full-library sites still go through site preview and publish.

7. Files outside a library & Quick Open

You don’t need a full workspace first: drag Markdown or a folder into the window, or use the system context menu Open with DaoBox on .md files. Loose files open in Guest-style windows.

Quick Open in the command palette also accepts an absolute path to jump straight to a note.