Library

Snippets

A snippet is reusable text, saved in the editor as a numbered revision.

The editor open on the API authentication snippet, with its review band along the bottom.
The editor takes pane 2 while it is open, and with three panes docked pane 3 previews the snippet you are editing.

Requires: a curator or an admin, not suspended. In a personal workspace any unsuspended member may also save a revision.

  1. Press Write in the library pane's footer.
  2. Type a Title and press Create snippet in the New snippet dialog. Pane 2 swaps the canvas for the editor.
  3. Write the body. Press ⌘S, or Save in the editor's footer.

Writing

  • The footer carries a Rich / Markdown switch over one buffer.
  • A fenced block keeps its language and whatever follows it on the fence line.
  • A mermaid fence is drawn as a diagram in the document preview, the one pane 3 shows with the editor closed and no prompter running; the editor's own preview does not draw it.
  • Summary and Tags save with the body, in the same revision.

The save line

UNSAVED — ⌘S saves a new revision while there is something to write, then SAVING…, then SAVED with a time, No changes where the save found nothing different, or NOT SAVED — with the reason and its code.

History

History is a band in the editor; Show opens it. Each revision is tagged where it applies: Current, Certified, metadata only for a save that changed no content, imported for one an import wrote. Preview puts one in pane 3; opened from the library list, which has no pane 3, it is off with a reason. Restore revision 3 writes that revision's text forward as a new revision, or reads Revision 3 matches the current text. Nothing was written.

Collections organize snippets; search finds them.