Skip to content

Editor & Markdown

Claspt’s editor is built on CodeMirror 6, a modern, extensible code editor. It provides rich markdown editing with live syntax highlighting, inline secret block cards, and a rendered preview mode.

Claspt offers three ways to view your pages:

ModeShortcutDescription
Edit(default)Full markdown editor with syntax highlighting
SplitCmd+\ / Ctrl+\Side-by-side editor and rendered preview
PreviewCmd+/ / Ctrl+/Read-only rendered markdown (no editor)

Toggle between modes using the keyboard shortcuts or the view buttons in the toolbar.

Claspt supports standard markdown formatting with live syntax highlighting in the editor.

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

The editor displays headings with styled font sizes that reflect the heading level — h1 is the largest, h6 the smallest. A heading gutter along the left edge provides additional visual indicators for each level, making it easy to scan document structure at a glance.

**bold text**
*italic text*
~~strikethrough~~
`inline code`
[link text](https://example.com)

Keyboard shortcuts for inline formatting:

FormatmacOSWindows/Linux
BoldCmd+BCtrl+B
ItalicCmd+ICtrl+I
CodeCmd+ECtrl+E
LinkCmd+KCtrl+K
- Unordered item
- Another item
- Nested item
1. Ordered item
2. Another item
1. Nested ordered
- [ ] Task (unchecked)
- [x] Task (completed)
- [ ] Another pending item

Task lists render with interactive checkboxes in preview mode. Click a checkbox to toggle its state — the markdown updates automatically.

```javascript
const greeting = "Hello, Claspt!";
console.log(greeting);
```

Syntax highlighting is supported for common languages.

| Name | Role | Access |
|---------|-----------|---------|
| Alice | Admin | Full |
| Bob | Developer | Read |
| Charlie | Viewer | Limited |
> This is a blockquote.
> It can span multiple lines.
>
> > Nested blockquotes work too.
---
![Alt text](image-url.png)
[Link text](https://example.com)

Drag and drop images or paste them directly into the editor to attach them to your page.

  1. Drag an image file onto the editor area, or paste an image from your clipboard.
  2. Claspt copies the image into a _media/ folder within your vault.
  3. A markdown image reference is inserted at the cursor position.
FormatExtension
PNG.png
JPEG.jpg, .jpeg
GIF.gif
WebP.webp

Media files are stored in the _media/ folder at the root of your vault:

~/Claspt/
_media/
2025-01-15-screenshot.png
2025-01-16-diagram.webp
general/
my-page.md

Images are referenced with relative paths in your markdown, so they work both in Claspt and in any standard markdown renderer.

Press Cmd+Shift+S / Ctrl+Shift+S to open the secret template picker. Choose from pre-built templates:

TemplateUse Case
PasswordWebsite logins, app passwords
API KeyService tokens, developer keys
Credit CardCard numbers, expiry, CVV
SSH KeyPrivate keys
Env VariableEnvironment config values
License KeySoftware licenses
Recovery Code2FA backup codes
CustomAnything else

The secret is immediately encrypted with AES-256-GCM and rendered as an interactive card in the editor. See the Secret Blocks guide for full details.

Beyond individual secret blocks, Claspt supports full-body encryption — encrypting the entire page content, not just :::secret blocks.

  1. Open a page in the editor.
  2. Click the lock icon in the toolbar (or use the page context menu).
  3. The entire page content is encrypted with AES-256-GCM.

When full-body encryption is enabled:

  • The page content on disk is fully encrypted (not readable as plain markdown).
  • The page title in frontmatter remains in plaintext for navigation.
  • You must unlock your vault to read the page at all.
Use CaseRecommendation
A few passwords in an otherwise normal noteUse :::secret blocks
An entire page of sensitive informationUse full-body encryption
A page with many secret fieldsEither approach works

Every change you make is auto-committed to Git (batched in 5-second windows), giving you a complete version history for every page.

  1. Open the Inspector panel with Cmd+I / Ctrl+I.
  2. Scroll to the Version History section.
  3. Browse the list of commits for the current page, each showing a timestamp and summary.

Click a commit in the version history to view its content. If you want to restore that version, click Restore to replace the current page content with the selected version.

Customize the editor experience from Settings > General:

SettingDescription
Line numbersShow or hide line numbers in the gutter
Word wrapWrap long lines to fit the editor width
Editor fontMonospace font used in the editor

Pages are saved automatically as you type. There’s no save button — changes are persisted immediately. Every save triggers a Git auto-commit (batched in 5-second windows), so you can always revert to a previous version.

Standard undo/redo works within the editor session:

ActionmacOSWindows/Linux
UndoCmd+ZCtrl+Z
RedoCmd+Shift+ZCtrl+Shift+Z

For history beyond the current session, use the version history in the Inspector panel to browse and restore previous Git commits.

When you add a :::secret block, the editor renders it as an interactive card rather than showing raw markdown. You can:

  • Click to reveal/hide the secret value
  • Copy the value with one click
  • Edit the label or value inline

See the Secret Blocks guide for full details.