Skip to content

Markdown and diagrams

Documentation pages are written in an editor where headings, lists, tables and checklists look as they will on the page while you type. Pages are still saved as Markdown, with images and PDFs attached in place and diagrams drawn from a block of text.

Overview ​

The page editor shows the page as it will look: headings larger, lists and checklists as lists, tables as tables, code in a fixed width font with its language highlighted, and links to records as small chips. HTML typed into a page is shown as text rather than run.

Typing Markdown works too: # starts a heading, - a bulleted list, 1. a numbered list, [ ] a checklist item, > a quote, and three backticks a code block.

Three extras:

  • Diagrams. A code block in the mermaid language is drawn as a diagram, in the editor and on the page.
  • Attachments. Images and PDFs added in the editor are stored with the page.
  • Links to records. A name in double square brackets, such as [[IT-00042]], links to that equipment, person, place or page. See Links between records.

Pages are saved as Markdown, so the API, revisions and search see the same text as before. A page you open and save without changing anything keeps its text exactly, and adds no revision.

Markdown source, above the editor, switches to the page's Markdown and back, for anything easier to fix in the text itself. The What was done field of a change uses that same Markdown editor (see Change management), with the same diagrams and links. Attachments are for documentation pages only.

Requirements ​

  • Role: Write, archive and restore documentation (Admin, Manager and Technician by default).

Steps ​

Add a block ​

  1. On an empty line, type /, or click the + beside a line.
  2. Pick from the menu, or keep typing to narrow it, and press Enter:
GroupAdds
TextText, Heading 1 to Heading 6, Quote, Divider
ListBullet List, Ordered List, Task List (a checklist)
AdvancedCode, a code block with a language picker, and Table
LinksLink to a record
DiagramNetwork, Process, Sequence: an example diagram

Drag the handle beside a block to move it. In a table, the handles on its rows and columns add, move and delete them.

Format text ​

Select some text and a toolbar opens above it: Bold, Italic, Strikethrough, Inline code, Link, Link to a record, and the Network diagram, Process diagram and Sequence diagram starters.

KeysDoes
Ctrl BBold
Ctrl IItalic
Ctrl KLink to a record
Ctrl Z, Ctrl YUndo, redo
Tab, Shift TabMove a list item in or out

On a Mac, use Cmd in place of Ctrl.

  1. Type [[ where the link goes, then the first letters of a page title, an asset tag, a person, a location, a virtual machine, a file or a change. A list opens at the cursor and narrows as you type.
  2. Pick one with the arrow keys and Enter, or click it. The link goes in as a chip with the record's name, saved as [[IT-00042]]. Escape closes the list and keeps what you typed.

Or press Ctrl K (Cmd K on a Mac), choose Link to a record in the toolbar over selected text, or pick it from the / menu. A small search opens; type, pick one with the arrow keys and press Enter.

The list only offers records you can see, in the client you are working in, and only names that link back to that record. Files and changes are offered when your role and plan include them.

Draw a diagram ​

  1. Edit a page.
  2. Type / and pick Network, Process or Sequence under Diagram, or select text and pick a diagram in the toolbar. An example is added as a code block in the mermaid language, with the diagram drawn under it.
  3. Change its names and arrows to match yours. The drawing follows as you type; if Mermaid cannot read it, the error shows in its place until it can.
  4. Click Save. The page shows the drawing in place of the text.

Or add a Code block, pick mermaid as its language, and write the diagram yourself:

markdown
```mermaid
graph LR
  Office --> Firewall --> Switch
```

Diagrams use Mermaid syntax, so flowcharts (graph LR, graph TD) and Mermaid's other diagram types work. The ones used most are flowcharts and sequence diagrams; the syntax reference covers the rest.

Attach an image or a PDF ​

  1. Edit a page.
  2. Click Attach a file above the editor, drop the file into the page, or paste an image you copied, such as a screenshot. It is uploaded and added where the cursor or the drop was: an image shows in the page, a PDF as a link.
  3. Click Save.

Edit the Markdown source ​

  1. Edit a page and click Markdown source. The page's Markdown shows, highlighted as you type.
  2. Make the change, then click Markdown source again to go back to the page view.
  3. Click Save.

The Markdown editor has its own toolbar, from left to right: Bold, Italic, Strikethrough, Link, Heading, Quote, Code block, Bulleted list, Numbered list, Checklist, Table, Insert a diagram, Link to a record, Attach a file, Undo and Redo. The question mark at the end, Formatting help, opens the Markdown guide and Mermaid's diagram reference in a new tab. A change's What was done has the same toolbar, without Attach a file.

In the Markdown editor:

  • Type [[ for the record list, or press Ctrl Shift K (Cmd Shift K on a Mac) for the record search.
  • Right click for Cut, Copy, Paste, Paste as plain text, Bold, Italic, Link, Link to a record, Insert diagram, Insert table, Insert checklist and Formatting help. Hold Shift while you right click for your browser's own menu, with its spelling suggestions.
  • At the start of a line, type / for /heading, /table, /checklist, /diagram network, /diagram process, /diagram sequence, /code, /quote, /link and /record.
  • Ctrl K adds a link and Ctrl F finds and replaces in the text.

TekStacks renders GitHub's extended syntax: tables, task lists (- [ ] and - [x]) and strikethrough. GitHub's basic writing and formatting syntax shows all three.

Notes ​

Note: Attachments can be PNG, JPEG, GIF or WebP images, or PDFs, up to 10 MB each, or less if your plan's largest file is smaller. They are kept in TekStacks storage and count toward your plan's storage, even if you connect your own storage.

Note: TekStacks draws diagrams with Mermaid's strict security level, in the editor and on the page. Text in a diagram is shown as text, never run, and Mermaid's click events are turned off, so a diagram cannot run scripts or carry clickable links.

Note: Images load only from TekStacks. An image linked from another website shows as a plain link instead, so a page cannot track who reads it.

Troubleshooting ​

"The editor could not load." Your browser could not fetch the editor, often after a lost connection. The page's Markdown shows instead: edit it and save as usual, or reload the page to try again.

My diagram shows as text. Check that the code block's language is mermaid. In Markdown source, the block starts with exactly ```mermaid on its own line and is closed with three backticks.

An image from another site shows as a link. That is on purpose. Download the image and attach it to the page instead.

A file I dropped into a change was refused. The What was done field of a change takes no attachments. Add the file to Files and link it under Files, or with [[its name]].

The [[ list does not offer a record. It offers only records you can see, in the client you are working in. A record whose name is taken by something earlier in the order (a page with the same title as a person, say) is offered by another name, such as the person's email, or not at all.

An attachment is refused for size. It is over 10 MB, over your plan's largest file, or would pass your plan's storage. The Billing page shows your plan's limits.

Lithium Holdings, LLC dba TekStacks