diff --git a/clinical-web/src/views/management/documents/components/editors/EditorWangPane.vue b/clinical-web/src/views/management/documents/components/editors/EditorWangPane.vue index 12c1180..3f97b58 100644 --- a/clinical-web/src/views/management/documents/components/editors/EditorWangPane.vue +++ b/clinical-web/src/views/management/documents/components/editors/EditorWangPane.vue @@ -18,8 +18,24 @@ const emit = defineEmits<{ const editorRef = shallowRef() const editorMode = 'default' +// 医疗文书用不到的工具栏能力直接移除,避免科室误用。 +// 注意菜单 key:分割线是 divider、表情是 emotion(不是 emoji)。 const toolbarConfig: Partial = { - excludeKeys: ['group-video', 'fullScreen'], + excludeKeys: [ + 'blockquote', + 'divider', + 'codeBlock', + 'insertLink', + 'emotion', + 'bgColor', + // todo 是 WangEditor 私有的待办列表,导出后能否还原可交互勾选取决于其 + // elemToHtml/parseHtml 实现(未验证、易随版本变化)。签署勾选统一由 + // SigningDocumentInteractive 识别的「勾选列表格」承载,保留 todo 只会让 + // 科室误用它做勾选、导致签署时静默失效。 + 'todo', + 'group-video', + 'fullScreen', + ], } const editorConfig: Partial = { @@ -37,6 +53,13 @@ const editorConfig: Partial = { return true }, + // 悬浮菜单独立于工具栏:excludeKeys 管不到它,这里单独去掉「链接」与「背景色」。 + // hoverbarKeys 按元素类型浅合并,只覆盖 text,图片/表格等其他类型保持默认。 + hoverbarKeys: { + text: { + menuKeys: ['headerSelect', 'bulletedList', '|', 'bold', 'through', 'color', 'clearStyle'], + }, + }, } function handleCreated(editor: IDomEditor) {