From 0bf3bc9abd79c846b257e43455166d93520bfe57 Mon Sep 17 00:00:00 2001 From: undefined Date: Wed, 26 Feb 2025 16:59:57 +0800 Subject: [PATCH] ui: md editor: remove sub and sup --- packages/ui-default/components/editor/index.tsx | 4 ++-- packages/ui-default/components/editor/mdeditor.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/ui-default/components/editor/index.tsx b/packages/ui-default/components/editor/index.tsx index c1d6e0158..dfd5915b7 100644 --- a/packages/ui-default/components/editor/index.tsx +++ b/packages/ui-default/components/editor/index.tsx @@ -181,8 +181,8 @@ export default class Editor extends DOMAttachedObject { // '-', // 'strikeThrough', // 'title', - // 'sub', - // 'sup', + 'sub', + 'sup', // 'quote', // 'unorderedList', // 'orderedList', diff --git a/packages/ui-default/components/editor/mdeditor.ts b/packages/ui-default/components/editor/mdeditor.ts index 62e6ef4ac..88f934d7d 100644 --- a/packages/ui-default/components/editor/mdeditor.ts +++ b/packages/ui-default/components/editor/mdeditor.ts @@ -34,6 +34,10 @@ config({ }); } }, + markdownItPlugins(plugins) { + console.log('Active builtin mdit plugins', plugins); + return plugins.filter((plugin) => ['sub', 'sup'].includes(plugin.type)); + }, }); export { MdEditor };