From b536f040beb05954c023142474d75932a5dbe370 Mon Sep 17 00:00:00 2001 From: Sebastian Danielsson Date: Sun, 4 Oct 2026 18:24:23 +0200 Subject: [PATCH] fix(markdown-editor, unicode-formatter, pomodoro-timer): bundle editor extensions and fonts md-editor-v3 loaded highlight.js, katex, mermaid, prettier, cropper, screenfull and echarts from unpkg.com; the two other tools loaded Google Fonts. All of them now come from the app. Refs sharevb/it-tools#571 Co-Authored-By: Claude Opus 5.5 (1M context) --- src/tools/markdown-editor/markdown-editor.vue | 12 +++++++ .../markdown-editor/md-editor-extensions.ts | 31 +++++++++++++++++++ src/tools/pomodoro-timer/app/PomodoroApp.vue | 9 +++--- .../unicode-formatter/unicode-formatter.vue | 8 ++--- 4 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 src/tools/markdown-editor/md-editor-extensions.ts diff --git a/src/tools/markdown-editor/markdown-editor.vue b/src/tools/markdown-editor/markdown-editor.vue index 88af7dba..51dc4e1e 100644 --- a/src/tools/markdown-editor/markdown-editor.vue +++ b/src/tools/markdown-editor/markdown-editor.vue @@ -3,6 +3,7 @@ import type { Themes } from 'md-editor-v3'; import { MdEditor } from 'md-editor-v3'; import 'md-editor-v3/lib/style.css'; +import './md-editor-extensions'; import { useStyleStore } from '@/stores/style.store'; const theme = ref('light'); @@ -21,3 +22,14 @@ const markdown = ref('Sample _formatted_ *text*'); + + diff --git a/src/tools/markdown-editor/md-editor-extensions.ts b/src/tools/markdown-editor/md-editor-extensions.ts new file mode 100644 index 00000000..63702b01 --- /dev/null +++ b/src/tools/markdown-editor/md-editor-extensions.ts @@ -0,0 +1,31 @@ +import { config } from 'md-editor-v3'; +import hljs from 'highlight.js/lib/common'; +import katex from 'katex'; +import mermaid from 'mermaid'; +import * as echarts from 'echarts'; +import * as prettier from 'prettier/standalone'; +import * as prettierMarkdown from 'prettier/plugins/markdown'; +import Cropper from 'cropperjs'; +import screenfull from 'screenfull'; + +import 'cropperjs/dist/cropper.css'; + +// md-editor-v3 injects