# Write > Write is a Markdown editor that runs entirely in the browser: one long document shown formatted as you write, with LaTeX math, pictures, tables, footnotes and callouts. Documents are stored only in the visitor's own browser (IndexedDB). There is no server, account or API: the page is static files, and nothing about a document is sent anywhere. Each document is plain Markdown, readable and editable in the page's Raw panel, which is how an assistant working in the page alongside the user can read and change it precisely. This file describes the app for LLM agents (for example a browser agent) that use it together with a user. The page links to it from the bar at its bottom right ("AI assistants: llms.txt"). ## Working with the app as an agent - **Raw panel:** the document's Markdown source, as a second editor on the left. It opens and closes with ⌥⌘R (rebindable in ⌘/) or the arrow tab on the left edge of the page, whose accessible name starts "Raw Markdown". - **Syncing:** edits in the panel apply to the page as they are typed, and changes made on the page show in the panel, keeping its caret and scroll. - **Escaping:** the formatted page (rich editing, the default) treats typed text literally. It escapes Markdown characters, so a `*` typed there is saved as `\*`. The Raw panel takes Markdown as written: use it to add formatting as Markdown. - **Undo:** ⌘Z and ⌘⇧Z (or ⌘Y) undo and redo, in the panel or on the page. Both share the document's one history, in which a run of typing is one step. - **View only:** ⌘⇧L locks the document, and changes are refused in the panel too. - **Tab:** Tab is not captured in the panel (it moves the focus); indent with spaces. Tables are drawn as tables on the page and edited cell by cell there; in the panel they are plain pipe text. - **Script handle:** - `window.write.getMarkdown()` returns the document's text. - `window.write.setMarkdown(text)` replaces it as an edit in the panel does: refused in View only, saved like any edit, and one undo step of its own. - `setMarkdown` returns `{ ok: true }` or `{ ok: false, error }`. - **Reading the Markdown:** the Raw panel always holds the whole document as text. If a browser tool blocks or cuts short a script's output (some do when the output looks like it holds URL query strings or cookie-like data, as a document with such links may), read the text in the panel instead. - **Documents:** the ☰ menu (top right) has Switch document… (⌘O), History… (⌘⇧Y), Insert picture…, and Export, import & print… (⌘⇧E). - There you can download the document as .md (optionally with its pictures inside) and import a .md file (insert, replace or as a new document). - You can also print or save as PDF, and export or import every document as a zip. ## Markdown dialect GitHub-flavoured Markdown (headings, emphasis, strikethrough, inline and fenced code, links, lists, task lists, quotes, rules, pipe tables), plus: - **Highlight:** `==text==`. - **Subscript and superscript:** `H~2~O`, `x^2^`. Emoji shortcodes such as `:smile:`. - **Math (KaTeX):** - `$…$` or `\(…\)` inline, and `$$…$$` or `\[…\]` on lines of their own. - Money such as `$5 and $6` stays text: the inline `$` needs no space just inside it and no digit right after the closing `$`. - `\$` is a literal dollar. - **Callouts:** a quote whose first line is `[!NOTE]`, `[!TIP]`, `[!IMPORTANT]`, `[!WARNING]` or `[!CAUTION]`: ```markdown > [!NOTE] > Text of the note. ``` - **Footnotes:** `[^label]` in the text, defined by a line starting `[^label]: text`. Lines after it continue the note, lazily or indented four spaces past a blank line. - **Front matter:** a YAML block between `---` lines at the very start of the document, shown as it is. - **Pictures:** `![alt](images/.png){width=320 align=left crop=x,y,w,h}`. - The attribute block is optional (Pandoc's syntax). `width` is in CSS pixels, never shown wider than the column. `align=left` places it left; centred is the default and isn't written. `crop` is the part shown, as fractions (0–1) of the picture's natural size. - `images/<16 hex digits>.` names a picture stored in this browser; `data:` and `https:` addresses work too. - New pictures are added by pasting or dropping image files on the page (or Insert picture… in the ☰ menu), which stores the file and writes the path. Typing a path to a file that isn't stored shows nothing. ## Keys - ⌥⌘R: Raw panel. ⌘\: the right-hand panel (name, counts, outline). ⌘F: find (⌥⌘F: replace). - ⌘B, ⌘I, ⌘⇧X, ⌘⇧H, ⌘E, ⌘K: bold, italic, strikethrough, highlight, code and link on the page. - Hold ⌥ Option to see every shortcut. ⌘/ opens the shortcut editor, where any of them can be rebound. ## Storage - Every document, folder, version and picture lives in this browser's IndexedDB, for this site only. Another browser or device has its own documents. - Clearing the site's data deletes them. Export everything (in the Export panel) keeps a copy as a zip.