Markdown Editor
Write with live preview, rich formatting, voice input, real-time collaboration, and AI-powered selection actions.
Omnilib's Markdown Editor provides a live preview writing experience. As you type, formatting is applied in real-time, hiding the markdown syntax while preserving precise cursor control.
Overview
The Markdown Editor offers:
- Live preview — See formatted text as you type
- Full keyboard support — Format with shortcuts
- Interactive elements — Clickable checkboxes and links
- Mathematical formulas — LaTeX math with KaTeX
- Mermaid diagrams — Render flowcharts and sequence diagrams
- Selection actions — AI tools on any text selection
- Real-time collaboration — Remote cursors and live sync
- Security — Built-in XSS protection
Getting Started
Opening a Markdown File
Click any .md file in the sidebar, or create a new one:
- Right-click in the sidebar
- Select "New File"
- Name it with a
.mdextension
Writing Your First Document
Start typing and see the formatting apply immediately:
# My Document
This is **bold** and this is *italic*.
- Item one
- Item two
- Item three
The formatting appears as you type, with syntax markers hidden.
Text Formatting
Inline Styles
| Format | Syntax | Shortcut |
|---|---|---|
| Bold | **text** | Cmd+B (Windows: Ctrl+B) |
| Italic | *text* | Cmd+I (Windows: Ctrl+I) |
| Underline | ++text++ | Cmd+U (Windows: Ctrl+U) |
~~text~~ | Cmd+Shift+S (Windows: Ctrl+Shift+S) | |
| Highlight | ==text== | Cmd+H (Windows: Ctrl+H) |
Code | `text` | Cmd+` (Windows: Ctrl+`) |
Toggle Formatting
All formatting shortcuts toggle on and off:
- Select text
- Press the shortcut (e.g.,
Cmd+B) - Text becomes bold
- Press again to remove bold
Headings
Create headings with # symbols:
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
Shortcuts: Cmd+Shift+1 through Cmd+Shift+4 (Ctrl+Shift+1–4 on Windows).
Lists
Bullet Lists
- First item
- Second item
- Nested item
- Third item
Shortcut: Cmd+Shift+L (Windows: Ctrl+Shift+L)
Task Lists
- [ ] Unchecked task
- [x] Completed task
Shortcut: Cmd+Shift+T (Windows: Ctrl+Shift+T)
Task checkboxes are interactive — click to toggle. Changes update the markdown source.
Block Elements
Block Quotes
> This is a quote
> that spans multiple lines
Shortcut: Cmd+Shift+Q (Windows: Ctrl+Shift+Q)
Code Blocks
```javascript
function hello() {
console.log("Hello, world!");
}
```
Code blocks display with syntax highlighting, a monospace font, and a language label.
Mermaid Diagrams
Render diagrams using Mermaid syntax:
```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Output A]
B -->|No| D[Output B]
```
Flowcharts, sequence diagrams, Gantt charts, and other Mermaid diagram types are all supported. The diagram renders inline in the preview.
Mathematical Formulas
Inline Math
The equation $E = mc^2$ was discovered by Einstein.
Shortcut: Cmd+Shift+M (Windows: Ctrl+Shift+M)
Block Math
$$
\int_{a}^{b} f(x) dx = F(b) - F(a)
$$
Shortcut: Cmd+Shift+E (Windows: Ctrl+Shift+E)
Formulas render with KaTeX.
Links and Images
Links
[Link Text](https://example.com)
Shortcut: Cmd+K (Windows: Ctrl+K)
Use Cmd+Click (Windows: Ctrl+Click) to open links in a browser tab. Regular clicks do not open links.
Images

Images load lazily and scale responsively.
Selection Action Toolbar
Select any text to reveal the selection action toolbar above your selection. It provides quick actions:
| Action | What it does |
|---|---|
| Add as Context | Sends the selected text to the AI as context |
| Explain | AI explains the selected passage |
| Synthesize | AI condenses the selection into a shorter form |
| Rephrase | AI rewrites the selection in clearer language |
| Comment | Adds a review comment anchored to the selection |
Voice Input
Desktop only.
Press and hold Cmd+R to dictate. The microphone activates while you hold the key and transcribes your speech into the document at the cursor position when you release. This is a push-to-talk model — audio is captured only while the key is held.
In-Editor Search and Replace
Press Cmd+F (Windows: Ctrl+F) to open the search bar inside the editor. Type to highlight matches. Available options:
| Option | Description |
|---|---|
| Case sensitive | Match exact capitalization |
| Whole word | Match complete words only |
| Regex | Treat the search term as a regular expression |
Click the arrow buttons to navigate between matches. Open the replace field by clicking the expand arrow next to the search bar. Replace a single match with Enter or replace all with the Replace All button.
Export
Export to PDF
Click Export to PDF in the toolbar to render the document and open a save dialog. The PDF reflects the current preview formatting including math, diagrams, and code blocks.
Publish to Community
Click Publish in the toolbar to share the document as a post on the Omnilib Community. A dialog lets you set a title, choose a category, and preview the post before publishing.
Real-Time Collaboration
When multiple collaborators have the same file open, remote cursors appear as colored carets with name labels. Text insertions and deletions from other users appear in real time. Conflicts are resolved automatically by the sync engine.
Configurable Content Width
Adjust the content width from the editor settings panel. The width is measured in characters and can be set between 60 and 120 ch. Wider settings suit reference documents; narrower settings improve focus for writing.
Toolbar
The formatting toolbar provides quick access to:
- Bold, Italic, Underline
- Heading dropdown
- Bullet and task lists
- Link insertion
- Block quote
- Export to PDF
- Publish to Community
Buttons highlight when the cursor is inside formatted text.
Keyboard Shortcuts
Text Formatting
| Action | Mac | Windows |
|---|---|---|
| Bold | Cmd+B | Ctrl+B |
| Italic | Cmd+I | Ctrl+I |
| Underline | Cmd+U | Ctrl+U |
| Strikethrough | Cmd+Shift+S | Ctrl+Shift+S |
| Highlight | Cmd+H | Ctrl+H |
| Inline code | Cmd+` | Ctrl+` |
Structure
| Action | Mac | Windows |
|---|---|---|
| Heading 1–4 | Cmd+Shift+1–4 | Ctrl+Shift+1–4 |
| Bullet list | Cmd+Shift+L | Ctrl+Shift+L |
| Task list | Cmd+Shift+T | Ctrl+Shift+T |
| Block quote | Cmd+Shift+Q | Ctrl+Shift+Q |
Special
| Action | Mac | Windows |
|---|---|---|
| Insert link | Cmd+K | Ctrl+K |
| Inline formula | Cmd+Shift+M | Ctrl+Shift+M |
| Block formula | Cmd+Shift+E | Ctrl+Shift+E |
| Search/replace | Cmd+F | Ctrl+F |
| Voice input | Cmd+R (hold) | — |
| Indent | Tab | Tab |
| Outdent | Shift+Tab | Shift+Tab |
Troubleshooting
Formatting Not Appearing
- Ensure you're using the correct syntax
- Check for extra spaces in markers
- Try removing and reapplying the formatting
Links Not Opening
- Use
Cmd+Clickto open links - Regular clicks are disabled intentionally
Math Not Rendering
- Check LaTeX syntax is correct
- Ensure
$markers are properly paired - Block math needs
$$on separate lines
Mermaid Diagram Not Rendering
- Check that the diagram type is supported
- Look for syntax errors in the Mermaid block
- Ensure the code fence is labeled
mermaid