feat(MilkdownEditor): add file upload support for documents and text files

Added new upload functionality to the editor supporting doc/docx/ppt/pptx/pdf/zip/txt/json files. Includes:
- New upload button with file input
- File type detection utilities (isTextFile, isConvertibleFile)
- Initial markdown sync with trailing whitespace normalization
- Warning messages for unsupported file types
This commit is contained in:
2026-03-14 19:24:15 +08:00
parent d452d1747e
commit 1155de4867
5 changed files with 252 additions and 9 deletions
+6
View File
@@ -45,6 +45,11 @@ export const useSettingsStore = defineStore('settings', () => {
return translations[uiLanguage.value] || translations['en']
})
const initialMarkdown = computed(() => {
const lang = uiLanguage.value
return translations[lang]?.initialMarkdown || translations['en']?.initialMarkdown || ''
})
// --- Actions/Logic ---
// Load from localStorage
@@ -138,6 +143,7 @@ export const useSettingsStore = defineStore('settings', () => {
backgroundOpacity,
uiLanguage,
t,
initialMarkdown,
resetSettings
}
})