🚧 Refactor markdown preview extension

This commit is contained in:
2025-12-01 00:00:05 +08:00
parent 60d1494d45
commit dd3dd4ddb2
12 changed files with 487 additions and 769 deletions

View File

@@ -6,7 +6,6 @@ import { useConfigStore } from './configStore';
import { useEditorStore } from './editorStore';
import type { ThemeColors } from '@/views/editor/theme/types';
import { cloneThemeColors, FALLBACK_THEME_NAME, themePresetList, themePresetMap } from '@/views/editor/theme/presets';
import { refreshMermaidTheme } from '@/views/editor/extensions/markdown/plugins/mermaid';
type ThemeOption = { name: string; type: ThemeType };
@@ -139,10 +138,6 @@ export const useThemeStore = defineStore('theme', () => {
const refreshEditorTheme = () => {
applyThemeToDOM(currentTheme.value);
// Refresh mermaid diagrams with new theme
refreshMermaidTheme();
const editorStore = useEditorStore();
editorStore?.applyThemeSettings();
};