Replace textarea with CodeMirror 6 editor
- Add CodeMirror 6 with oneDark theme and markdown language support - Bundle via esbuild into public/vendor/ (built on deploy, not committed) - Add codemirror-entry.mjs as bundle entry point - Fix SPA fallback to only serve index.html for /, not all paths - Fix mime type handling by mutating mime-types registry - Add Write/Preview tabs; preview renders on tab switch only - Multi-cursor via Shift+Alt+Up/Down; Alt+Click adds cursor - gitignore package-lock.json and public/vendor/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
6
codemirror-entry.mjs
Normal file
6
codemirror-entry.mjs
Normal file
@@ -0,0 +1,6 @@
|
||||
export { EditorState } from '@codemirror/state';
|
||||
export { EditorView, keymap, placeholder, drawSelection } from '@codemirror/view';
|
||||
export { defaultKeymap, history, historyKeymap, indentWithTab, addCursorAbove, addCursorBelow } from '@codemirror/commands';
|
||||
export { markdown } from '@codemirror/lang-markdown';
|
||||
export { syntaxHighlighting } from '@codemirror/language';
|
||||
export { oneDark } from '@codemirror/theme-one-dark';
|
||||
Reference in New Issue
Block a user