Add settings for vditor debugger
Build Plugin JAR File / build (push) Waiting to run Details
Build Plugin JAR File / github-release (push) Blocked by required conditions Details

Fix: #56
This commit is contained in:
zhengyi 2024-01-27 17:39:06 +08:00
parent d9f364ad49
commit 8cf103932e
6 changed files with 23 additions and 4 deletions

View File

@ -9,6 +9,7 @@
### v1.5.2
- ✨ 添加Vditor Debugger设置
- 🐛 修复行内公式渲染的问题 #22
### v1.5.1

View File

@ -1,3 +1,5 @@
import type {EditorConfig} from "@/utils/config-utils";
export declare type Options = {
defaultRenderMode: "ir" | "wysiwyg" | "sv" | undefined;
typeWriterMode: boolean;
@ -10,6 +12,7 @@ export declare type Options = {
openModal: (schema: Schema) => void;
quickInsertList: QuickInsert[];
enableQuickInsert: boolean;
config: EditorConfig;
};
export interface Schema {

View File

@ -11,6 +11,9 @@ export declare type EditorConfig = {
extension: {
allowImageType: string;
};
developer: {
debugger: boolean;
};
};
export const defaultEditorConfig: EditorConfig = {
@ -25,5 +28,8 @@ export const defaultEditorConfig: EditorConfig = {
},
extension: {
allowImageType: "png,jpg,jpeg,bmp,gif,webp,svg",
}
}
},
developer: {
debugger: false,
},
};

View File

@ -65,6 +65,7 @@ export function getOptions(options: Options): IOptions {
upload: {
handler: options.uploadImage,
},
debugger: options.config.developer.debugger,
};
}

File diff suppressed because one or more lines are too long

View File

@ -88,4 +88,12 @@ spec:
name: onlyMarkdown
label: "仅在Markdown模式下渲染"
help: "启用该功能将仅在Markdown格式的文章下注入渲染脚本"
value: true
value: true
- group: developer
label: 开发者设置
formSchema:
- $formkit: checkbox
name: debugger
label: "启用Debugger"
help: "启动Vditor编辑器的Debugger模式一般用于开发者使用"
value: false