feat(editor): add file upload and fix critical bugs

- Add markdown file upload functionality with upload button
- Fix error handling to throw errors instead of silently returning empty strings
- Fix memory leak by cleaning up debounceTimer in onUnmounted
- Update debounce timing from 150ms to 500ms for stability
- Enhance UI with floating action buttons and extensive style refinements
- Hide toolbar, menu, and line number elements for cleaner interface
This commit is contained in:
“ydy0615”
2026-02-12 08:55:37 +08:00
parent c2c87d24bf
commit 2432e78fe1
4 changed files with 243 additions and 75 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ import { Plugin, PluginKey } from '@milkdown/prose/state';
import { EditorView } from '@milkdown/prose/view';
const INLINE_SUGGESTION_KEY = new PluginKey('inline-suggestion');
const DEBOUNCE_MS = 150;
const DEBOUNCE_MS = 500;
interface InlineSuggestionOptions {
apiUrl?: string;