From 7e346ed2b43f11838e2b93af85fb40e353129da1 Mon Sep 17 00:00:00 2001 From: zhengyi Date: Fri, 22 Dec 2023 14:33:22 +0800 Subject: [PATCH] :bug: Fix https://git.mczhengyi.top/zhengyi/halo-plugin-vditor/issues/22 --- console/src/utils/vditor-utils.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/console/src/utils/vditor-utils.ts b/console/src/utils/vditor-utils.ts index e3fa74d..d88da83 100644 --- a/console/src/utils/vditor-utils.ts +++ b/console/src/utils/vditor-utils.ts @@ -3,11 +3,15 @@ import { mdiImage } from "@/utils/icon"; import { t } from "@/utils/i18n-utils"; export function getOptions(options: Options): IOptions { + const cdn = + `${window.location.protocol}//${window.location.host}` + + `/plugins/vditor-mde/assets/static`; + console.log(`Your CDN IS: ${cdn}`); return { height: "100%", mode: options.defaultRenderMode, typewriterMode: options.typeWriterMode, - cdn: "/plugins/vditor-mde/assets/static", + cdn: cdn, icon: "material", lang: getLanguage(options.language), toolbarConfig: { @@ -27,6 +31,10 @@ export function getOptions(options: Options): IOptions { toc: true, codeBlockPreview: options.codeBlockPreview, }, + theme: { + current: "light", + path: `${cdn}/dist/css/content-theme`, + }, }, outline: { enable: true,