Margin

A quiet text editor for the browser and the desktop. Open the editor

How it works

Margin keeps a list of documents in the sidebar. The first line of a document is its title. Everything is saved automatically as you type, on this device. Nothing is sent anywhere, and there is no account.

The view button in the toolbar cycles through Write (plain text), Split (text beside a formatted preview) and Read (preview only). Focus hides everything except the page. Aa sets the theme, typeface, text size and line width.

Keys

KeyDoes
Ctrl SSave the document to a file
Ctrl OOpen a file
Ctrl FFind and replace. Enter and Shift Enter step through matches
Ctrl B / IBold or italic. Press again to remove it
Tab / Shift TabIndent or outdent the selected lines
EnterInside a list, starts the next item. On an empty item, ends the list
Alt NNew document
Alt PSwitch view
Alt FFocus mode. Esc leaves it
Alt LShow or hide the document list
Ctrl PPrint the formatted document, or save it as a PDF

On a Mac, use Cmd where this says Ctrl and Option for Alt.

Files

Margin reads and writes plain text: .md, .markdown and .txt. You can also drag one of those files onto the window to open it.

WhereOpen and Save
Desktop appNative dialogs. After the first save, Ctrl S writes to the same file
Chrome, EdgeThe browser asks which file to use, then saves back to it
Firefox, SafariOpen uploads a copy; Save downloads one

Where your writing lives

The document list is stored on the device by the browser (or by the desktop app). It stays private, and it also means the list goes away if you clear site data or use a private window. For anything you want to keep, use Save.

Formatting

The preview understands a practical subset of Markdown:

TypeGet
# Title to ###### TitleHeadings
**bold** *italic* ~~struck~~Emphasis
`code` and ``` fencesInline code and code blocks
[text](https://…)Link
![alt](https://…)Image
- item, 1. itemLists. Indent by two spaces to nest
- [ ] task, - [x] doneTask list
> quoteBlock quote
---Rule

Tables, footnotes and raw HTML are not supported. HTML in a document is shown as text, never run.

Desktop app

The desktop app is the same editor in its own window, with native file dialogs. To run it from source you need Node.js 20 or newer:

git clone https://github.com/PyMite6941/margin
cd margin
npm install
npm run desktop

The README covers development and building an installer.