From a1fe8c3f6baa3630a833f9db5152db817d9b2f84 Mon Sep 17 00:00:00 2001 From: Takagi <1103069291@qq.com> Date: Sun, 24 Dec 2023 22:40:08 +0800 Subject: [PATCH] pref: export necessary extensions externally (#5104) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement /area editor /milestone 2.12.x #### What this PR does / why we need it: 导出一些必要的默认编辑器扩展及工具类,例如 `Paragraph` #### Which issue(s) this PR fixes: Fixes #5103 #### Does this PR introduce a user-facing change? ```release-note 导出必要的默认编辑器扩展及工具类 ``` --- console/packages/editor/src/extensions/index.ts | 4 ++++ console/packages/editor/src/index.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/console/packages/editor/src/extensions/index.ts b/console/packages/editor/src/extensions/index.ts index a0229802a3..f2c6bff202 100644 --- a/console/packages/editor/src/extensions/index.ts +++ b/console/packages/editor/src/extensions/index.ts @@ -15,6 +15,7 @@ import ExtensionOrderedList from "./ordered-list"; import ExtensionTaskList from "./task-list"; import ExtensionTable from "./table"; import ExtensionTextAlign from "./text-align"; +import ExtensionTextStyle from "@tiptap/extension-text-style"; import ExtensionLink from "./link"; import ExtensionColor from "./color"; import ExtensionFontSize from "./font-size"; @@ -23,6 +24,7 @@ import ExtensionGapcursor from "@tiptap/extension-gapcursor"; import ExtensionHardBreak from "@tiptap/extension-hard-break"; import ExtensionHorizontalRule from "@tiptap/extension-horizontal-rule"; import ExtensionDocument from "@tiptap/extension-document"; +import ExtensionParagraph from "./paragraph"; import ExtensionPlaceholder from "@tiptap/extension-placeholder"; import { i18n } from "@/locales"; @@ -118,10 +120,12 @@ export { ExtensionTaskList, ExtensionLink, ExtensionTextAlign, + ExtensionTextStyle, ExtensionUnderline, ExtensionTable, ExtensionSubscript, ExtensionSuperscript, + ExtensionParagraph, ExtensionPlaceholder, ExtensionHighlight, ExtensionCommands, diff --git a/console/packages/editor/src/index.ts b/console/packages/editor/src/index.ts index db3bc68cc1..c33012e06a 100644 --- a/console/packages/editor/src/index.ts +++ b/console/packages/editor/src/index.ts @@ -17,3 +17,4 @@ export default plugin; export * from "./tiptap"; export * from "./extensions"; export * from "./components"; +export * from "./utils";