From 2a71d139ea822069ffd8e849bed852faee9aa1fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Tue, 13 Jan 2026 13:04:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/js/commonJS.js | 27 ++++++++++++++++++- .../page/components/table/content.vue | 2 +- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/common/js/commonJS.js b/src/common/js/commonJS.js index 011f49c..7b859a4 100644 --- a/src/common/js/commonJS.js +++ b/src/common/js/commonJS.js @@ -2148,7 +2148,32 @@ export default { ed.insertContent('–'); } }); - + ed.ui.registry.addMenuButton('MoreSymbols', { + text: '···', // 按钮显示的三个点 + tooltip: 'More Special Characters', + onAction: () => {}, // 菜单主按钮点击通常不执行操作,由子菜单执行 + fetch: (callback) => { + const items = [ + { + type: 'menuitem', + text: 'en-dash (短划线)',//短划线 + onAction: () => ed.insertContent('–') + }, + { + type: 'menuitem', + text: 'minus sign (减号)',//减号 + onAction: () => ed.insertContent('−') + }, + { + type: 'menuitem', + text: 'hyphen (连接符)', + onAction: () => ed.insertContent('-') + }, + + ]; + callback(items); + } + }); ed.ui.registry.addButton('removeBlue', { text: 'Blue', // 按钮文本 diff --git a/src/components/page/components/table/content.vue b/src/components/page/components/table/content.vue index cae86b5..810a740 100644 --- a/src/components/page/components/table/content.vue +++ b/src/components/page/components/table/content.vue @@ -16,7 +16,7 @@ :value="value" :typesettingType="typesettingType" class="paste-area text-container" - :toolbar="!isAutomaticUpdate?['bold italic |customBlue removeBlue|LateX| myuppercase myuppercasea Line|subscript superscript|clearButton|searchreplace']:['bold italic |customBlue removeBlue| myuppercase myuppercasea Line|subscript superscript|clearButton|searchreplace']" + :toolbar="!isAutomaticUpdate?['bold italic |customBlue removeBlue|LateX| myuppercase myuppercasea Line MoreSymbols|subscript superscript|clearButton|searchreplace']:['bold italic |customBlue removeBlue| myuppercase myuppercasea Line|subscript superscript|clearButton|searchreplace']" style=" /* white-space: pre-line; */ line-height: 12px;