diff options
| author | Clawd <ai@clawd.bot> | 2026-02-28 13:51:38 -0800 |
|---|---|---|
| committer | Clawd <ai@clawd.bot> | 2026-02-28 13:51:38 -0800 |
| commit | 812702aa9afbfe8de7672520852a6066341a4dc0 (patch) | |
| tree | 17f778c2989b49b43ecb4a5975fe6f2979fe509b /renderer/src/styles | |
| parent | c386a1acfab0db99af57a9a18a49c72b89184f15 (diff) | |
Add CodeMirror 6 for markdown editing
- Install CodeMirror 6 with markdown language support
- Add MarkdownEditor component with:
- Syntax highlighting for markdown
- Line numbers
- Active line highlighting
- History (undo/redo)
- One Dark theme
- Code block language highlighting
- Keep react-markdown for preview mode
- Add CSS for CodeMirror integration
Diffstat (limited to 'renderer/src/styles')
| -rw-r--r-- | renderer/src/styles/globals.css | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/renderer/src/styles/globals.css b/renderer/src/styles/globals.css index 384ebc5..f115734 100644 --- a/renderer/src/styles/globals.css +++ b/renderer/src/styles/globals.css | |||
| @@ -152,6 +152,20 @@ body { | |||
| 152 | color: var(--text-primary); | 152 | color: var(--text-primary); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | .codemirror-editor { | ||
| 156 | flex: 1; | ||
| 157 | overflow: hidden; | ||
| 158 | } | ||
| 159 | |||
| 160 | .codemirror-editor .cm-editor { | ||
| 161 | height: 100%; | ||
| 162 | } | ||
| 163 | |||
| 164 | .codemirror-editor .cm-gutters { | ||
| 165 | background: var(--bg-secondary); | ||
| 166 | border-right: 1px solid var(--border); | ||
| 167 | } | ||
| 168 | |||
| 155 | .document-content.rendered { | 169 | .document-content.rendered { |
| 156 | line-height: 1.7; | 170 | line-height: 1.7; |
| 157 | } | 171 | } |
