From 683b8e330b7a61f087c2de421c6b5571faae6bd8 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Mon, 22 Jan 2024 10:25:18 +0800 Subject: [PATCH] feat: provide find and replace functionality for the default rich text editor --- .../editor/src/components/EditorHeader.vue | 9 +- .../src/components/toolbar/ToolbarItem.vue | 1 + console/packages/editor/src/dev/App.vue | 2 + .../packages/editor/src/extensions/index.ts | 3 + .../search-and-replace/SearchAndReplace.vue | 354 +++++++++++++++ .../SearchAndReplacePlugin.ts | 403 ++++++++++++++++++ .../extensions/search-and-replace/index.ts | 295 +++++++++++++ console/packages/editor/src/locales/en.yaml | 14 + .../packages/editor/src/locales/zh-CN.yaml | 14 + console/packages/editor/src/styles/index.scss | 1 + .../packages/editor/src/styles/search.scss | 11 + .../src/components/editor/DefaultEditor.vue | 2 + 12 files changed, 1106 insertions(+), 3 deletions(-) create mode 100644 console/packages/editor/src/extensions/search-and-replace/SearchAndReplace.vue create mode 100644 console/packages/editor/src/extensions/search-and-replace/SearchAndReplacePlugin.ts create mode 100644 console/packages/editor/src/extensions/search-and-replace/index.ts create mode 100644 console/packages/editor/src/styles/search.scss diff --git a/console/packages/editor/src/components/EditorHeader.vue b/console/packages/editor/src/components/EditorHeader.vue index 19615242dc..a22c3f502b 100644 --- a/console/packages/editor/src/components/EditorHeader.vue +++ b/console/packages/editor/src/components/EditorHeader.vue @@ -63,7 +63,7 @@ function getToolboxItemsFromExtensions() { >