Apply formatting
If only the preview is visible, press F1 to switch to source mode. Select the text you want to format, then use a shortcut, the Format menu, or the formatting toolbar (Ctrl+T).
| Formatting | Markdown example | Default keys |
|---|---|---|
| Heading | # Heading / ## Heading | Ctrl+1 / Ctrl+2 / Ctrl+3 |
| Bold | **important** | Ctrl+B |
| Italic | *emphasis* | Ctrl+I |
| Strikethrough | ~~removed~~ | Alt+Shift+5 |
| Highlight | ==look here== | Ctrl+R |
| Inline code | `code` | Ctrl+Shift+K |
| Link | [label](https://example.com) | Ctrl+K |
| Bullet list | - item | Ctrl+Shift+8 |
| Numbered list | 1. item | Ctrl+Shift+7 |
Formatting that toggles, such as bold, is removed by repeating the same command. Images and tables are covered in Images and tables.
Code blocks and input helpers
Add a language name after the opening code fence to apply syntax highlighting for that language.
```javascriptconst message = 'Hello';```In a list, press Enter to add the next item. In an unfinished code block, Enter adds the closing Markdown fence. Shift+Tab removes the Markdown markers at the start of a line. A plain Tab inserts four spaces.
On Windows, formatted HTML copied from a browser is converted to Markdown when you paste it, including headings, tables and lists. To paste the text only, use Ctrl+Shift+V.
Move lines and tidy the document
| Operation | Keys |
|---|---|
| Move line up / down | Alt+↑ / Alt+↓ |
| Duplicate line up / down | Alt+Shift+↑ / Alt+Shift+↓ |
| Insert a blank line below | Ctrl+Enter |
| Insert a blank line above | Ctrl+Shift+Enter |
| Format the document | Alt+Shift+F |
| Undo / redo | Ctrl+Z / Ctrl+Y |
Formatting adjusts table column widths, surplus blank lines, the blank line before a heading, the trailing newline and similar details. It applies to the whole document rather than to tables alone, so check the result afterwards. The contents of code blocks and HTML blocks are left untouched.
Undo and redo are kept per tab. Reopening a file discards its edit history.
Things worth knowing while you edit
- If you use an input method editor (IME), text still being composed is not shown in the preview. Finish the conversion and confirm the text first, then check the preview.
- Links in the editor open with Ctrl and a click.
- Ctrl and the mouse wheel change the text size. Fonts and line spacing are changed in Settings.
- If you cannot edit, check that you are in source mode, that the file is not locked, and that your license allows editing.