From c39691d6fe775b2c73e6980149dbdfa8fc17ad10 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 26 Jun 2023 21:33:59 +0800 Subject: [PATCH] feat: make default editor extensible (#4090) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /area console /kind feature /milestone 2.7.x #### What this PR does / why we need it: 默认编辑器支持扩展,包括输入类型、工具栏、Slash Command 等。 Ref https://github.com/halo-sigs/richtext-editor/pull/16 ## 定义方式 ```ts import ExtensionFoo from "./tiptap/extension-foo.ts" export default definePlugin({ extensionPoints: { "default:editor:extension:create": () => { return [ExtensionFoo]; }, }, }); ``` 其中,`ExtensionFoo` 是一个 Tiptap Extension,可以参考 [Tiptap 文档](https://tiptap.dev/) 和 [https://github.com/halo-sigs/richtext-editor/blob/main/docs/extension.md](https://github.com/halo-sigs/richtext-editor/blob/main/docs/extension.md)。 #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/4028 #### Does this PR introduce a user-facing change? ```release-note Console 端的默认编辑器支持被扩展 ``` --- .../default-editor\342\200\223extension.md" | 19 + console/package.json | 3 +- console/packages/shared/src/types/plugin.ts | 5 + console/pnpm-lock.yaml | 548 +++++++++--------- .../src/components/editor/DefaultEditor.vue | 470 ++++++--------- 5 files changed, 496 insertions(+), 549 deletions(-) create mode 100644 "console/docs/extension-points/default-editor\342\200\223extension.md" diff --git "a/console/docs/extension-points/default-editor\342\200\223extension.md" "b/console/docs/extension-points/default-editor\342\200\223extension.md" new file mode 100644 index 0000000000..b715ae7a50 --- /dev/null +++ "b/console/docs/extension-points/default-editor\342\200\223extension.md" @@ -0,0 +1,19 @@ +# 默认编辑器扩展点 + +该扩展点用于扩展默认编辑器的功能,包括 Tiptap Extension,以及工具栏、悬浮工具栏、Slash Command。 + +## 定义方式 + +```ts +import ExtensionFoo from "./tiptap/extension-foo.ts" + +export default definePlugin({ + extensionPoints: { + "default:editor:extension:create": () => { + return [ExtensionFoo]; + }, + }, +}); +``` + +其中,`ExtensionFoo` 是一个 Tiptap Extension,可以参考 [Tiptap 文档](https://tiptap.dev/) 和 [https://github.com/halo-sigs/richtext-editor/blob/main/docs/extension.md](https://github.com/halo-sigs/richtext-editor/blob/main/docs/extension.md)。 diff --git a/console/package.json b/console/package.json index 77626553df..5a0a9649f4 100644 --- a/console/package.json +++ b/console/package.json @@ -54,9 +54,10 @@ "@halo-dev/api-client": "workspace:*", "@halo-dev/components": "workspace:*", "@halo-dev/console-shared": "workspace:*", - "@halo-dev/richtext-editor": "0.0.0-alpha.22", + "@halo-dev/richtext-editor": "0.0.0-alpha.23", "@tanstack/vue-query": "^4.29.1", "@tiptap/extension-character-count": "^2.0.0-beta.220", + "@tiptap/vue-3": "^2.0.3", "@uppy/core": "^3.2.0", "@uppy/dashboard": "^3.4.0", "@uppy/drag-drop": "^3.0.2", diff --git a/console/packages/shared/src/types/plugin.ts b/console/packages/shared/src/types/plugin.ts index 2ea41584ab..0fa907e24f 100644 --- a/console/packages/shared/src/types/plugin.ts +++ b/console/packages/shared/src/types/plugin.ts @@ -3,6 +3,7 @@ import type { RouteRecordRaw, RouteRecordName } from "vue-router"; import type { FunctionalPage } from "../states/pages"; import type { AttachmentSelectProvider } from "../states/attachment-selector"; import type { EditorProvider } from ".."; +import type { AnyExtension } from "@tiptap/vue-3"; import type { CommentSubjectRefProvider } from "@/states/comment-subject-ref"; export interface RouteRecordAppend { @@ -20,6 +21,10 @@ export interface ExtensionPoint { "editor:create"?: () => EditorProvider[] | Promise; + "default:editor:extension:create": () => + | AnyExtension[] + | Promise; + "comment:subject-ref:create"?: () => CommentSubjectRefProvider[]; } diff --git a/console/pnpm-lock.yaml b/console/pnpm-lock.yaml index 43949e7423..eee40005e4 100644 --- a/console/pnpm-lock.yaml +++ b/console/pnpm-lock.yaml @@ -65,14 +65,17 @@ importers: specifier: workspace:* version: link:packages/shared '@halo-dev/richtext-editor': - specifier: 0.0.0-alpha.22 - version: 0.0.0-alpha.22(@tiptap/pm@2.0.0-beta.220)(vue@3.2.45) + specifier: 0.0.0-alpha.23 + version: 0.0.0-alpha.23(@tiptap/pm@2.0.3)(vue@3.2.45) '@tanstack/vue-query': specifier: ^4.29.1 version: 4.29.1(vue@3.2.45) '@tiptap/extension-character-count': specifier: ^2.0.0-beta.220 - version: 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) + version: 2.0.0-beta.220(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/vue-3': + specifier: ^2.0.3 + version: 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3)(vue@3.2.45) '@uppy/core': specifier: ^3.2.0 version: 3.2.0 @@ -2347,51 +2350,53 @@ packages: - windicss dev: false - /@halo-dev/richtext-editor@0.0.0-alpha.22(@tiptap/pm@2.0.0-beta.220)(vue@3.2.45): - resolution: {integrity: sha512-dFF3iHizY2T5/pkU8QvSZYGGp8/6OmpD/J3pWAuzXJiBlG4bVeyjh+DHkEde63mV6rEjmi93A1h/En5z/z2YqQ==} + /@halo-dev/richtext-editor@0.0.0-alpha.23(@tiptap/pm@2.0.3)(vue@3.2.45): + resolution: {integrity: sha512-SlvAD5NrBSGr2mRf9zr+1Bbj07yLgqDPWtmTEZgl/h4GhdeboMlvSApQFjR8KAPItrgSChUsMtniVksNGPXtnQ==} peerDependencies: vue: ^3.2.37 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-blockquote': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-bold': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-bullet-list': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-code': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-code-block': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-code-block-lowlight': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/extension-code-block@2.0.0-beta.220)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-document': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-dropcursor': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-gapcursor': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-hard-break': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-heading': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-highlight': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-history': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-horizontal-rule': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-image': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-italic': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-link': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-list-item': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-ordered-list': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-paragraph': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-placeholder': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-strike': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-subscript': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-superscript': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-table': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-table-cell': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-table-header': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-table-row': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-task-item': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-task-list': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-text': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-text-align': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217) - '@tiptap/extension-underline': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217) - '@tiptap/suggestion': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/vue-3': 2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220)(vue@3.2.45) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/extension-blockquote': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-bold': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-bullet-list': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-code': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-code-block': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-code-block-lowlight': 2.0.3(@tiptap/core@2.0.3)(@tiptap/extension-code-block@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-document': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-dropcursor': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-gapcursor': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-hard-break': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-heading': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-highlight': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-history': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-horizontal-rule': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-image': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-italic': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-link': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-list-item': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-ordered-list': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-paragraph': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-placeholder': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-strike': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-subscript': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-superscript': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-table': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-table-cell': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-table-header': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-table-row': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-task-item': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-task-list': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-text': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-text-align': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/extension-underline': 2.0.3(@tiptap/core@2.0.3) + '@tiptap/suggestion': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/vue-3': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3)(vue@3.2.45) floating-vue: 2.0.0-beta.20(vue@3.2.45) + github-markdown-css: 5.2.0 highlight.js: 11.7.0 - katex: 0.16.4 - lowlight: 2.8.1 + lowlight: 2.9.0 + prosemirror-model: 1.19.2 + prosemirror-view: 1.31.5 tippy.js: 6.3.7 vue: 3.2.45 vue-i18n: 9.2.2(vue@3.2.45) @@ -3393,340 +3398,339 @@ packages: vue-demi: 0.13.11(vue@3.2.45) dev: false - /@tiptap/core@2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-Vifwcg5SglkVjEmtFbnwHOKWU4UUenOhe7ke5fqGhh7FNfGkccu6sK8W1JTDbG4ARWZ1b/632kQ51YE+WuPe7g==} + /@tiptap/core@2.0.3(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-jLyVIWAdjjlNzrsRhSE2lVL/7N8228/1R1QtaVU85UlMIwHFAcdzhD8FeiKkqxpTnGpaDVaTy7VNEtEgaYdCyA==} peerDependencies: - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-blockquote@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-uE1VRU/doQzXsfsZ/JqsbSbXeZYTJnyQkSfHYA2ZYhbEM2XqDEsYkgcmZEJgunUZJpERf+3ZTfTpqaHq29iMMg==} + /@tiptap/extension-blockquote@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-rkUcFv2iL6f86DBBHoa4XdKNG2StvkJ7tfY9GoMpT46k3nxOaMTqak9/qZOo79TWxMLYtXzoxtKIkmWsbbcj4A==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.1 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-bold@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-KcEuKI85Drug/cCWbDy+HxhYrD+rLXHEBG10DmKPvgPpKHG/2wOau6LwUwyV4muWR8CR2mIO+mEc3yVBD8nNwQ==} + /@tiptap/extension-bold@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-OGT62fMRovSSayjehumygFWTg2Qn0IDbqyMpigg/RUAsnoOI2yBZFVrdM2gk1StyoSay7gTn2MLw97IUfr7FXg==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-bubble-menu@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-wthyec7s0vZlTSEAAZEgoFfx/1Arwg1zxDUrrE+YAost/Yn+w4xQksz/ts5Bx90iOk2qsJ+jzzttLRV17Ku7lA==} + /@tiptap/extension-bubble-menu@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-lPt1ELrYCuoQrQEUukqjp9xt38EwgPUwaKHI3wwt2Rbv+C6q1gmRsK1yeO/KqCNmFxNqF2p9ZF9srOnug/RZDQ==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - lodash: 4.17.21 + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) tippy.js: 6.3.7 dev: false - /@tiptap/extension-bullet-list@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-QQ/0ZlYy6Hgb+UAc79V+fxvI+AaQf20cbKtBXaR8TIZ0x4FotSma89bKh+CIXMhFiBGXTcYBaYhl7OwACsKtxw==} + /@tiptap/extension-bullet-list@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-RtaLiRvZbMTOje+FW5bn+mYogiIgNxOm065wmyLPypnTbLSeHeYkoqVSqzZeqUn+7GLnwgn1shirUe6csVE/BA==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-character-count@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): + /@tiptap/extension-character-count@2.0.0-beta.220(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): resolution: {integrity: sha512-D2AbDi7Q429Ua6U+MdEtxyIEue8KEATOGfmvDlSv5wS+EsUbh6fkG/6yUKFtke2DaePXqbpkxfwXgLT0JP4zTg==} peerDependencies: '@tiptap/core': ^2.0.0-beta.209 '@tiptap/pm': ^2.0.0-beta.209 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-code-block-lowlight@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/extension-code-block@2.0.0-beta.220)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-osfnTclcymplaks4a1vyh1qTFvkQ1ZERmXHq1t6XGdNeus7GrhIt3Lkd+1T0Ws4XdJu/Ut3GX+C1Zisnz7sNRQ==} + /@tiptap/extension-code-block-lowlight@2.0.3(@tiptap/core@2.0.3)(@tiptap/extension-code-block@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-thFXcFdFyHF0/dr9sqBedjj0Vt14k3m52YVc4l65+d65wRuHp4f8suu8T2ZGRJwqLCE3NIrvwQTSHhzjIqJVxQ==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/extension-code-block': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/extension-code-block': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-code-block': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/extension-code-block': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-code-block@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-fgA7yTfHqhBtMJF7I9FPJ6UWuZPtxOQiN45Iv9LNmFIB6YRucdpmF+daZ27sElu0a+eICZyXwVn4w4iJphifuw==} + /@tiptap/extension-code-block@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-F4xMy18EwgpyY9f5Te7UuF7UwxRLptOtCq1p2c2DfxBvHDWhAjQqVqcW/sq/I/WuED7FwCnPLyyAasPiVPkLPw==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-code@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-JKKDZoceagqVXeC1XF/gOkKhLtsbYJYV+MRDorLnQVz4tXcg/SMs5Ez7OM9MxSSior8fIbUFMNsj1/UNlG+tFw==} + /@tiptap/extension-code@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-LsVCKVxgBtkstAr1FjxN8T3OjlC76a2X8ouoZpELMp+aXbjqyanCKzt+sjjUhE4H0yLFd4v+5v6UFoCv4EILiw==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-document@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-2sja4ZvOb4iynHrzinnclCSFgLyo6fJc1fBV5fIYaOgZOYcvz9KK8fgKiq+wIpG58sJEmQ5kcwwBlkXv+NTK+g==} + /@tiptap/extension-document@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-PsYeNQQBYIU9ayz1R11Kv/kKNPFNIV8tApJ9pxelXjzcAhkjncNUazPN/dyho60mzo+WpsmS3ceTj/gK3bCtWA==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-dropcursor@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-BIaA4Lvb3xL9KFN+K6SO2IHqLO6hDmGN2/rGKHFaU3Eh+oiXM2G73KTSS5KIP1u872zY1RpAtswSc4kjv3cuVw==} + /@tiptap/extension-dropcursor@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-McthMrfusn6PjcaynJLheZJcXto8TaIW5iVitYh8qQrDXr31MALC/5GvWuiswmQ8bAXiWPwlLDYE/OJfwtggaw==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-floating-menu@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-+WfcBEedm82ntaVIEQAGz0Om96Rpav7a+4f7e8N4PrLKm6nZ3gBaEkZVQ6vjJ6S/1htiWCv1XosYIwRboPBG0w==} + /@tiptap/extension-floating-menu@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-zN1vRGRvyK3pO2aHRmQSOTpl4UJraXYwKYM009n6WviYKUNm0LPGo+VD4OAtdzUhPXyccnlsTv2p6LIqFty6Bg==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) tippy.js: 6.3.7 dev: false - /@tiptap/extension-gapcursor@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-W5N2Ey+thufUOrs2TFGpEGBGue7ZEhcUXvxcsZlGbrjVa9Y+4rEp68Du4y7yM0hCeSj2GGwiV+uPzkc0CSDE/g==} + /@tiptap/extension-gapcursor@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-6I9EzzsYOyyqDvDvxIK6Rv3EXB+fHKFj8ntHO8IXmeNJ6pkhOinuXVsW6Yo7TcDYoTj4D5I2MNFAW2rIkgassw==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-hard-break@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-oY3454o53YNFbuokzyGzG4PdMHkIYreY3nrALioZ0SwYeoFNcGA6Zcn4rDRfdp+QvbbiHfeBTR/CpWF13HZYTg==} + /@tiptap/extension-hard-break@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-RCln6ARn16jvKTjhkcAD5KzYXYS0xRMc0/LrHeV8TKdCd4Yd0YYHe0PU4F9gAgAfPQn7Dgt4uTVJLN11ICl8sQ==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-heading@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-7mrHRj++UaZ26C2Gjwb0WKWAzpiKb8TOYkVC2uMaCwaNhLDXpFEwZ7RtJRSTNBHkIGnMO46BH8Z0qlkFMmk9Jw==} + /@tiptap/extension-heading@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-f0IEv5ms6aCzL80WeZ1qLCXTkRVwbpRr1qAETjg3gG4eoJN18+lZNOJYpyZy3P92C5KwF2T3Av00eFyVLIbb8Q==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-highlight@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-JS+WJQrMOUfOAeNazi3FioaQ78MsuakMcZmSdy+tZuv3zwPhLPDZzlVj+K4wZtzPejxlucpE93BiW2FmJDyNgg==} + /@tiptap/extension-highlight@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-NrtibY8cZkIjZMQuHRrKd4php+plOvAoSo8g3uVFu275I/Ixt5HqJ53R4voCXs8W8BOBRs2HS2QX8Cjh79XhtA==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-history@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-qNL2a9UhnlmCs4y2iQYrfeMB8vEX3bHozBJanHu0PWNQJcj90R5xqorBp/bRcqZdi0kuQfxcTnGHtLUpN/U0TA==} + /@tiptap/extension-history@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-00KHIcJ8kivn2ARI6NQYphv2LfllVCXViHGm0EhzDW6NQxCrriJKE3tKDcTFCu7LlC5doMpq9Z6KXdljc4oVeQ==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-horizontal-rule@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-XMIs4R+4BoH5LpIxey513mZuus0XLHqjVayqtf03enmjBTLWzkixvvWLPLw4a47FJL5Q8l4REFHxjNifRzOKkg==} + /@tiptap/extension-horizontal-rule@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-SZRUSh07b/M0kJHNKnfBwBMWrZBEm/E2LrK1NbluwT3DBhE+gvwiEdBxgB32zKHNxaDEXUJwUIPNC3JSbKvPUA==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-image@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-8ibJOicpcqhFeiPLqYOY8SO9sxkz2bemzwhtzRvgkevy/QERe9D0mbAL0qm1gg88LtXy3z2eFUdwD8suq1xsPQ==} + /@tiptap/extension-image@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-hS9ZJwz0md07EHsC+o4NuuJkhCZsZn7TuRz/2CvRSj2fWFIz+40CyNAHf/2J0qNugG9ommXaemetsADeEZP9ag==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-italic@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-aWAgqoR8fql9fJ7T/ZrEqovkEjZXbUpvlvWEvdBDMG3id8ZTGNDpdDKdvI6J/Rl5ZGPIg1TpHJtd+UixheWQsQ==} + /@tiptap/extension-italic@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-cfS5sW0gu7qf4ihwnLtW/QMTBrBEXaT0sJl3RwkhjIBg/65ywJKE5Nz9ewnQHmDeT18hvMJJ1VIb4j4ze9jj9A==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-link@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-pC1UnK1OrbW+NDdBdHE8sfmZ+tOpIOsHVAeeX6pg1fkdP/FlbPFFvcvILgJc20dr7DiM6dRqYq16H473G9vyEg==} + /@tiptap/extension-link@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-H72tXQ5rkVCkAhFaf08fbEU7EBUCK0uocsqOF+4th9sOlrhfgyJtc8Jv5EXPDpxNgG5jixSqWBo0zKXQm9s9eg==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) - linkifyjs: 3.0.5 + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) + linkifyjs: 4.1.1 dev: false - /@tiptap/extension-list-item@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-+O0ivwxPP2l/m9PAowb2ytDT/cM5kwu0s1W5MUsHPIqf+M6ahnl4ESjhWZfDHUzvjqPq6MTbqoQLHbB1KS/N7w==} + /@tiptap/extension-list-item@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-p7cUsk0LpM1PfdAuFE8wYBNJ3gvA0UhNGR08Lo++rt9UaCeFLSN1SXRxg97c0oa5+Ski7SrCjIJ5Ynhz0viTjQ==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-ordered-list@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-j3DmxJfwmNxFfMnvO7glmGlhYeZSIUnRrKnZu2KkpD6OcGJSh9y/yfnYwcuK80XbzEG/jKKIw0M2yRveOvyVwA==} + /@tiptap/extension-ordered-list@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-ZB3MpZh/GEy1zKgw7XDQF4FIwycZWNof1k9WbDZOI063Ch4qHZowhVttH2mTCELuyvTMM/o9a8CS7qMqQB48bw==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-paragraph@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-ZGCzNGFYV4wa3l1nXtDIaYp7O6f0DrGTSl3alKkDTQe3SOmzXS2HjgWl9yPw8VXpU9W5mMGhXd+nGn/jUk+f/A==} + /@tiptap/extension-paragraph@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-a+tKtmj4bU3GVCH1NE8VHWnhVexxX5boTVxsHIr4yGG3UoKo1c5AO7YMaeX2W5xB5iIA+BQqOPCDPEAx34dd2A==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-placeholder@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-wk8HBzS02UzuPiai+UfuaFi2T0w/rBjWmULIG55DL9QzFWseIJCv/f7b+0A7ryVP0Idn1+QNCiAe6ymnsFb9Fg==} + /@tiptap/extension-placeholder@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-Z42jo0termRAf0S0L8oxrts94IWX5waU4isS2CUw8xCUigYyCFslkhQXkWATO1qRbjNFLKN2C9qvCgGf4UeBrw==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-strike@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-cIM2ma6mzk08pijOn+KS3ZoHWaUVsVT+OF3m6xewjwJdC0ILg9nApEOhPFrhbeDcxcPmJMlgBl/xeUrEu1HQMg==} + /@tiptap/extension-strike@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-RO4/EYe2iPD6ifDHORT8fF6O9tfdtnzxLGwZIKZXnEgtweH+MgoqevEzXYdS+54Wraq4TUQGNcsYhe49pv7Rlw==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-subscript@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-Xz9x0YUxGkADtGBP/74v3BCr6d+TFZ4E6BmwnzXSfSCjdJx8ycdNXtX4aZsOMu7Gj0cxXF4aTr+s4bm9RHWyjg==} + /@tiptap/extension-subscript@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-XFAEUaKxWRmTq7ePEF4aj7knelJPr2fTz0y/iSXydtS094LKwBHBzxatIZY3phrgfpDc+f51ycwarsgz27UJfg==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-superscript@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-ZMvUmXN3j3Qm25IRCe8QBkwFIk2r6bKl6qtedUO4R8Yk4xeYkaGp+FA3OHBME03SLEeuNHOoguIWyQ1GO2dCcA==} + /@tiptap/extension-superscript@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-5EBjUvkw2SXL1e8C1i0UF26/GBNHxEbiNQKw7Shy88omVa4HTY+D8KWC/j29ZW/IomUbGPlbpXp1z+1TETzmyw==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-table-cell@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-W5UxsZxQdBms916hHp4giXi6AOkwCEfSaTXfi3FQqxcg/EQnmzMNB82/9BcVqBUaoJrx1dIVm4ploIL+GikG/w==} + /@tiptap/extension-table-cell@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-d0vpwQfRIOhqKJdoiOJybwWhjnug3QA4Mkgccp378moDRyOer3hPKavG1Ljgz087qHrN4WfdUlMGEvasYsWE7w==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-table-header@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-oahTLhItvoPzCA9RuGLowZ0ZGro+Yn3+1NefXu/yGlp3twKQyhrwOv3+TqZ21L+8uKGOVLfLgPZnF6oNozEdJQ==} + /@tiptap/extension-table-header@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-SnGl1U6usRRS6LyAjSdhaCYLF6NWbGhjVFSmiPrjb0pOzsiVeDOiUNCyUAIYaDNnjAF2pfK6+H+uHzYPqTi+/w==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-table-row@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-6ie3YtnOliIzER4JtVh0T8HQl3Z2gwTBoCOvqoetsoKIk0zNdsai+ZjVjVN4ZiMLFNYm5xnCUfr83usp9kawhQ==} + /@tiptap/extension-table-row@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-tyqeXmQLNSBsYyiNsnQuJMxNbz6dYt+P5W58+h10mjbt+hERA5+alQQyP06O2DggsT3Z0LPt7QRAlNmOBe7cyQ==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-table@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-8PwfNXIRPy1zxZAk0kS+sqFeUE2M6al1y/mA6p0SA9YhSN0iWvjQfmq9Ds52hmRcL2Dv9QmLR97S7WGRmHKcQg==} + /@tiptap/extension-table@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-8swHqm8vRM1w9WzaAhLmY24gGoTozctz4KHKBjvFY/Ka0yXabT0+hoCCdkZLnXWi15H3pbHs2HnDBaTGL9bZTw==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-task-item@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-eLdIuLTDkTKPEzuy2uG7akv+M39/+vHK/7E115LtQ9KQiN3iLaE0RHXPb5vPvP8gX9U2gGeboRhhMxf/7yh/vg==} + /@tiptap/extension-task-item@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-13u1Q769WiSNcjFieYAMuJyWXNaY9yOdw6WFg9tQg4EZ5h6+2DaxB0qmu6I3pH+wwSn2UkCkXIirAo/k7wnzbw==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-task-list@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-d5+YkjPBjc4beVCOip+T1GW1HUo7vLwp9Mrec+PcxMSU1GDUwxvz3zpkKG3rrTnwK5QzEnvmSQC2SzSRp//OPQ==} + /@tiptap/extension-task-list@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-NdW0RtMF2L96qy+j946mTB5Av6Qn5L3vGVWFmJA6/JPXr9Uj/grItCmqUQKHfPBSFow7UqBY82ODblP+GQFgew==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-text-align@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-oFr1xkUFJKHGJkFA0CDcfkEA4z3jr1umFRkr6qejKiYqwAUdnn5YrtfdGICJzBEa6/1wOCZz0ODzCnv9XmGDkA==} + /@tiptap/extension-text-align@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-VlLgqncKdjMjVjbU60/ALYhFs0wUdjAyvjDXnH1OoM/HuzbILvufPMYz4DUieJIWVJOYUKHQgg4XwBWceAM2Tw==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-text@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-3tnffc2YMjNyv7Lbad6fx9wYDE/Buz8vhx76M2AOSrjYbzmTJf7mLkgdlPM0VTy7FGZD5CGgHJAgYNt5HIqPkQ==} + /@tiptap/extension-text@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-LvzChcTCcPSMNLUjZe/A9SHXWGDHtvk73fR7CBqAeNU0MxhBPEBI03GFQ6RzW3xX0CmDmjpZoDxFMB+hDEtW1A==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-underline@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-feakmZ8ek1maf4yBVd539AYIjv3hnLK1j/GLyT/SjRlwOryQb23xWIQ8I+nF5UWqXib1MkvfMe6Ff6zK5WqrYQ==} + /@tiptap/extension-underline@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-oMYa7qib/5wJjpUp79GZEe+E/iyf1oZBsgiG26IspEtVTHZmpn3+Ktud7l43y/hpTeEzFTKOF1/uVbayHtSERg==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/pm@2.0.0-beta.220(@tiptap/core@2.0.0-beta.217): - resolution: {integrity: sha512-O9mGcmwUpEr630HY9RylIyZJKnpXi3xWINWNiAEfRJ1br5j5pHRoVRJQ1HzU+6+Z+i/8qp3zRHGLTBqihaZETA==} + /@tiptap/pm@2.0.3(@tiptap/core@2.0.3): + resolution: {integrity: sha512-I9dsInD89Agdm1QjFRO9dmJtU1ldVSILNPW0pEhv9wYqYVvl4HUj/JMtYNqu2jWrCHNXQcaX/WkdSdvGJtmg5g==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) prosemirror-changeset: 2.2.0 prosemirror-collab: 1.3.0 prosemirror-commands: 1.5.0 @@ -3737,37 +3741,37 @@ packages: prosemirror-keymap: 1.2.0 prosemirror-markdown: 1.10.1 prosemirror-menu: 1.2.1 - prosemirror-model: 1.19.0 + prosemirror-model: 1.19.2 prosemirror-schema-basic: 1.2.1 prosemirror-schema-list: 1.2.2 prosemirror-state: 1.4.1 prosemirror-tables: 1.3.2 - prosemirror-trailing-node: 2.0.3(prosemirror-model@1.19.0)(prosemirror-state@1.4.1)(prosemirror-view@1.28.2) + prosemirror-trailing-node: 2.0.3(prosemirror-model@1.19.2)(prosemirror-state@1.4.1)(prosemirror-view@1.31.5) prosemirror-transform: 1.7.0 - prosemirror-view: 1.28.2 + prosemirror-view: 1.31.5 dev: false - /@tiptap/suggestion@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220): - resolution: {integrity: sha512-Z1hXr1giNQ/fkuRrsMICtfyBCbMV+ZPiYYfpKKqUC4uc/lqAeHiRwk3lozpnLZEImnOW42LsYbYug2jtRqrDgA==} + /@tiptap/suggestion@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-1y3palQStGZq13UtHjouZ50k4sotM+N56cIlFeygIv3gqdai2zGPaPQtqV9FOVVQizXpUbQMTlPSDC5Ej4SPnQ==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/vue-3@2.0.0-beta.217(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220)(vue@3.2.45): - resolution: {integrity: sha512-QHVc82A6lu4qF1Glz5Ne00Nwbj0A0U/6IEbG8u8/YQDy1XzQ7PZwR6FrwxPTrwLhJivy4/wVBiYTUygs9+vjbQ==} + /@tiptap/vue-3@2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3)(vue@3.2.45): + resolution: {integrity: sha512-2CtNUzt+e7sgvIjxPOyBwoiRcuCHNeJzW+XGxNK2uCWlAKp/Yw3boJ51d51UuIbj9RitGHJ5GpCdLJoL7SDiQA==} peerDependencies: - '@tiptap/core': ^2.0.0-beta.209 - '@tiptap/pm': ^2.0.0-beta.209 + '@tiptap/core': ^2.0.0 + '@tiptap/pm': ^2.0.0 vue: ^3.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.217(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-bubble-menu': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/extension-floating-menu': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217)(@tiptap/pm@2.0.0-beta.220) - '@tiptap/pm': 2.0.0-beta.220(@tiptap/core@2.0.0-beta.217) + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/extension-bubble-menu': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-floating-menu': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) vue: 3.2.45 dev: false @@ -5428,6 +5432,7 @@ packages: /commander@8.3.0: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} + dev: true /common-tags@1.8.2: resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} @@ -7173,6 +7178,10 @@ packages: assert-plus: 1.0.0 dev: true + /github-markdown-css@5.2.0: + resolution: {integrity: sha512-hq5RaCInSUZ48bImOZpkppW2/MT44StRgsbsZ8YA4vJFwLKB/Vo3k7R2t+pUGqO+ThG0QDMi96TewV/B3vyItg==} + dev: false + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -7354,6 +7363,11 @@ packages: engines: {node: '>=12.0.0'} dev: false + /highlight.js@11.8.0: + resolution: {integrity: sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg==} + engines: {node: '>=12.0.0'} + dev: false + /histoire@0.11.7(@types/node@18.13.0)(sass@1.60.0)(vite@3.2.4): resolution: {integrity: sha512-N1W5wIKXD8p26DydduiBJHewbi4t9MVA9ZNsnmMsiCfGLFUbtLbsC4/k1GKLuDuM8DhpEh4ItOEw5SLKupM5kw==} hasBin: true @@ -8097,13 +8111,6 @@ packages: resolution: {integrity: sha512-iLt/RPnrazs4D4IVaO1Hac2W/WH9SiCT3CuhX9hip0xWVnUe+28Lyse4w/OxjSwdZ0CzduimWPMZH/KwxnCAEw==} dev: true - /katex@0.16.4: - resolution: {integrity: sha512-WudRKUj8yyBeVDI4aYMNxhx5Vhh2PjpzQw1GRu/LVGqL4m1AxwD1GcUp0IMbdJaf5zsjtj8ghP0DOQRYhroNkw==} - hasBin: true - dependencies: - commander: 8.3.0 - dev: false - /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -8168,8 +8175,8 @@ packages: uc.micro: 1.0.6 dev: false - /linkifyjs@3.0.5: - resolution: {integrity: sha512-1Y9XQH65eQKA9p2xtk+zxvnTeQBG7rdAXSkUG97DmuI/Xhji9uaUzaWxRj6rf9YC0v8KKHkxav7tnLX82Sz5Fg==} + /linkifyjs@4.1.1: + resolution: {integrity: sha512-zFN/CTVmbcVef+WaDXT63dNzzkfRBKT1j464NJQkV7iSgJU0sLBus9W0HBwnXK13/hf168pbrx/V/bjEHOXNHA==} dev: false /lint-staged@13.2.2: @@ -8301,6 +8308,7 @@ packages: /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true /log-symbols@4.1.0: resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} @@ -8332,12 +8340,12 @@ packages: tslib: 2.4.0 dev: true - /lowlight@2.8.1: - resolution: {integrity: sha512-HCaGL61RKc1MYzEYn3rFoGkK0yslzCVDFJEanR19rc2L0mb8i58XM55jSRbzp9jcQrFzschPlwooC0vuNitk8Q==} + /lowlight@2.9.0: + resolution: {integrity: sha512-OpcaUTCLmHuVuBcyNckKfH5B0oA4JUavb/M/8n9iAvanJYNQkrVm4pvyX0SUaqkBG4dnWHKt7p50B3ngAG2Rfw==} dependencies: '@types/hast': 2.3.4 fault: 2.0.1 - highlight.js: 11.7.0 + highlight.js: 11.8.0 dev: false /lru-cache@4.1.5: @@ -9300,7 +9308,7 @@ packages: /prosemirror-commands@1.5.0: resolution: {integrity: sha512-zL0Fxbj3fh71GPNHn5YdYgYGX2aU2XLecZYk2ekEF0oOD259HcXtM+96VjPVi5o3h4sGUdDfEEhGiREXW6U+4A==} dependencies: - prosemirror-model: 1.19.0 + prosemirror-model: 1.19.2 prosemirror-state: 1.4.1 prosemirror-transform: 1.7.0 dev: false @@ -9310,16 +9318,16 @@ packages: dependencies: prosemirror-state: 1.4.1 prosemirror-transform: 1.7.0 - prosemirror-view: 1.28.2 + prosemirror-view: 1.31.5 dev: false /prosemirror-gapcursor@1.3.1: resolution: {integrity: sha512-GKTeE7ZoMsx5uVfc51/ouwMFPq0o8YrZ7Hx4jTF4EeGbXxBveUV8CGv46mSHuBBeXGmvu50guoV2kSnOeZZnUA==} dependencies: prosemirror-keymap: 1.2.0 - prosemirror-model: 1.19.0 + prosemirror-model: 1.19.2 prosemirror-state: 1.4.1 - prosemirror-view: 1.28.2 + prosemirror-view: 1.31.5 dev: false /prosemirror-history@1.3.0: @@ -9348,7 +9356,7 @@ packages: resolution: {integrity: sha512-s7iaTLiX+qO5z8kF2NcMmy2T7mIlxzkS4Sp3vTKSYChPtbMpg6YxFkU0Y06rUg2WtKlvBu7v1bXzlGBkfjUWAA==} dependencies: markdown-it: 13.0.1 - prosemirror-model: 1.19.0 + prosemirror-model: 1.19.2 dev: false /prosemirror-menu@1.2.1: @@ -9360,8 +9368,8 @@ packages: prosemirror-state: 1.4.1 dev: false - /prosemirror-model@1.19.0: - resolution: {integrity: sha512-/CvFGJnwc41EJSfDkQLly1cAJJJmBpZwwUJtwZPTjY2RqZJfM8HVbCreOY/jti8wTRbVyjagcylyGoeJH/g/3w==} + /prosemirror-model@1.19.2: + resolution: {integrity: sha512-RXl0Waiss4YtJAUY3NzKH0xkJmsZupCIccqcIFoLTIKFlKNbIvFDRl27/kQy1FP8iUAxrjRRfIVvOebnnXJgqQ==} dependencies: orderedmap: 2.1.0 dev: false @@ -9369,13 +9377,13 @@ packages: /prosemirror-schema-basic@1.2.1: resolution: {integrity: sha512-vYBdIHsYKSDIqYmPBC7lnwk9DsKn8PnVqK97pMYP5MLEDFqWIX75JiaJTzndBii4bRuNqhC2UfDOfM3FKhlBHg==} dependencies: - prosemirror-model: 1.19.0 + prosemirror-model: 1.19.2 dev: false /prosemirror-schema-list@1.2.2: resolution: {integrity: sha512-rd0pqSDp86p0MUMKG903g3I9VmElFkQpkZ2iOd3EOVg1vo5Cst51rAsoE+5IPy0LPXq64eGcCYlW1+JPNxOj2w==} dependencies: - prosemirror-model: 1.19.0 + prosemirror-model: 1.19.2 prosemirror-state: 1.4.1 prosemirror-transform: 1.7.0 dev: false @@ -9383,7 +9391,7 @@ packages: /prosemirror-state@1.4.1: resolution: {integrity: sha512-U/LBDW2gNmVa07sz/D229XigSdDQ5CLFwVB1Vb32MJbAHHhWe/6pOc721faI17tqw4pZ49i1xfY/jEZ9tbIhPg==} dependencies: - prosemirror-model: 1.19.0 + prosemirror-model: 1.19.2 prosemirror-transform: 1.7.0 dev: false @@ -9391,13 +9399,13 @@ packages: resolution: {integrity: sha512-/9JTeN6s58Zq66HXaxP6uf8PAmc7XXKZFPlOGVtLvxEd6xBP6WtzaJB9wBjiGUzwbdhdMEy7V62yuHqk/3VrnQ==} dependencies: prosemirror-keymap: 1.2.0 - prosemirror-model: 1.19.0 + prosemirror-model: 1.19.2 prosemirror-state: 1.4.1 prosemirror-transform: 1.7.0 - prosemirror-view: 1.28.2 + prosemirror-view: 1.31.5 dev: false - /prosemirror-trailing-node@2.0.3(prosemirror-model@1.19.0)(prosemirror-state@1.4.1)(prosemirror-view@1.28.2): + /prosemirror-trailing-node@2.0.3(prosemirror-model@1.19.2)(prosemirror-state@1.4.1)(prosemirror-view@1.31.5): resolution: {integrity: sha512-lGrjMrn97KWkjQSW/FjdvnhJmqFACmQIyr6lKYApvHitDnKsCoZz6XzrHB7RZYHni/0NxQmZ01p/2vyK2SkvaA==} peerDependencies: prosemirror-model: ^1 @@ -9408,21 +9416,21 @@ packages: '@remirror/core-constants': 2.0.0 '@remirror/core-helpers': 2.0.1 escape-string-regexp: 4.0.0 - prosemirror-model: 1.19.0 + prosemirror-model: 1.19.2 prosemirror-state: 1.4.1 - prosemirror-view: 1.28.2 + prosemirror-view: 1.31.5 dev: false /prosemirror-transform@1.7.0: resolution: {integrity: sha512-O4T697Cqilw06Zvc3Wm+e237R6eZtJL/xGMliCi+Uo8VL6qHk6afz1qq0zNjT3eZMuYwnP8ZS0+YxX/tfcE9TQ==} dependencies: - prosemirror-model: 1.19.0 + prosemirror-model: 1.19.2 dev: false - /prosemirror-view@1.28.2: - resolution: {integrity: sha512-uK28mJbu0GI8Oz7Aclt6BKL4g+C59EBShBXDB0Y9Y71H25p4bQgmLQLfDWjsT1J9XOw0bR8QQajZmdK8RvXI9g==} + /prosemirror-view@1.31.5: + resolution: {integrity: sha512-tobRCDeCp61elR1d97XE/JTL9FDIfswZpWeNs7GKJjAJvWyMGHWYFCq29850p6bbG2bckP+i9n1vT56RifosbA==} dependencies: - prosemirror-model: 1.19.0 + prosemirror-model: 1.19.2 prosemirror-state: 1.4.1 prosemirror-transform: 1.7.0 dev: false diff --git a/console/src/components/editor/DefaultEditor.vue b/console/src/components/editor/DefaultEditor.vue index 7620bd0fb4..66c6aeaf90 100644 --- a/console/src/components/editor/DefaultEditor.vue +++ b/console/src/components/editor/DefaultEditor.vue @@ -2,7 +2,6 @@ import { Extension, RichTextEditor, - useEditor, ExtensionBlockquote, ExtensionBold, ExtensionBulletList, @@ -15,14 +14,11 @@ import { ExtensionHistory, ExtensionHorizontalRule, ExtensionItalic, - ExtensionListItem, ExtensionOrderedList, - ExtensionParagraph, ExtensionStrike, ExtensionText, ExtensionImage, ExtensionTaskList, - ExtensionTaskItem, ExtensionLink, ExtensionTextAlign, ExtensionUnderline, @@ -35,46 +31,11 @@ import { ExtensionIframe, ExtensionVideo, ExtensionAudio, - CommandsSuggestion, - CommentParagraph, - CommandHeader1, - CommandHeader2, - CommandHeader3, - CommandHeader4, - CommandHeader5, - CommandHeader6, - CommandCodeBlock, - CommandIframe, - CommandVideo, - CommandAudio, - CommandTable, - CommandBulletList, - CommandOrderedList, - CommandTaskList, ExtensionCodeBlock, + ToolbarItem, lowlight, - UndoMenuItem, - RedoMenuItem, - BoldMenuItem, - ItalicMenuItem, - UnderlineMenuItem, - StrikeMenuItem, - QuoteMenuItem, - CodeMenuItem, - SuperScriptMenuItem, - SubScriptMenuItem, - CodeBlockMenuItem, - HeadingMenuItem, - AlignLeftMenuItem, - AlignCenterMenuItem, - AlignRightMenuItem, - AlignJustifyMenuItem, - TableMenuItem, - BulletListMenuItem, - OrderedListMenuItem, - TaskListMenuItem, - HighlightMenuItem, - Separator, + type AnyExtension, + Editor, } from "@halo-dev/richtext-editor"; import { IconCalendar, @@ -95,12 +56,13 @@ import MdiFormatHeader4 from "~icons/mdi/format-header-4"; import MdiFormatHeader5 from "~icons/mdi/format-header-5"; import MdiFormatHeader6 from "~icons/mdi/format-header-6"; import { - computed, inject, markRaw, nextTick, ref, watch, + onMounted, + shallowRef, type ComputedRef, } from "vue"; import { formatDatetime } from "@/utils/date"; @@ -113,6 +75,7 @@ import { useFetchAttachmentPolicy } from "@/modules/contents/attachments/composa import { useI18n } from "vue-i18n"; import { i18n } from "@/locales"; import { OverlayScrollbarsComponent } from "overlayscrollbars-vue"; +import { usePluginModuleStore, type PluginModule } from "@/stores/plugin"; const { t } = useI18n(); @@ -157,119 +120,181 @@ const selectedHeadingNode = ref(); const extraActiveId = ref("toc"); const attachmentSelectorModal = ref(false); -const editor = useEditor({ - content: props.raw, - extensions: [ - ExtensionBlockquote, - ExtensionBold, - ExtensionBulletList, - ExtensionCode, - ExtensionDocument, - ExtensionDropcursor, - ExtensionGapcursor, - ExtensionHardBreak, - ExtensionHeading, - ExtensionHistory, - ExtensionHorizontalRule, - ExtensionItalic, - ExtensionListItem, - ExtensionOrderedList, - ExtensionParagraph, - ExtensionStrike, - ExtensionText, - ExtensionImage.configure({ - inline: true, - allowBase64: false, - HTMLAttributes: { - loading: "lazy", - }, - }), - ExtensionTaskList, - ExtensionTaskItem, - ExtensionLink.configure({ - autolink: true, - openOnClick: false, - }), - ExtensionTextAlign.configure({ - types: ["heading", "paragraph"], - }), - ExtensionUnderline, - ExtensionTable.configure({ - resizable: true, - }), - ExtensionSubscript, - ExtensionSuperscript, - ExtensionPlaceholder.configure({ - placeholder: t( - "core.components.default_editor.extensions.placeholder.options.placeholder" - ), - }), - ExtensionHighlight, - ExtensionCommands.configure({ - suggestion: { - ...CommandsSuggestion, - items: ({ query }: { query: string }) => { - return [ - CommentParagraph, - CommandHeader1, - CommandHeader2, - CommandHeader3, - CommandHeader4, - CommandHeader5, - CommandHeader6, - CommandCodeBlock, - CommandTable, - CommandBulletList, - CommandOrderedList, - CommandTaskList, - CommandIframe, - CommandVideo, - CommandAudio, - ].filter((item) => - [...item.keywords, item.title].some((keyword) => - keyword.includes(query) - ) - ); +const editor = shallowRef(); + +const { pluginModules } = usePluginModuleStore(); + +onMounted(() => { + const extensionsFromPlugins: AnyExtension[] = []; + pluginModules.forEach((pluginModule: PluginModule) => { + const { extensionPoints } = pluginModule; + if (!extensionPoints?.["default:editor:extension:create"]) { + return; + } + + const extensions = extensionPoints[ + "default:editor:extension:create" + ]() as []; + + extensionsFromPlugins.push(...extensions); + }); + + editor.value = new Editor({ + content: props.raw, + extensions: [ + ExtensionBlockquote, + ExtensionBold, + ExtensionBulletList, + ExtensionCode, + ExtensionDocument, + ExtensionDropcursor, + ExtensionGapcursor, + ExtensionHardBreak, + ExtensionHeading, + ExtensionHistory, + ExtensionHorizontalRule, + ExtensionItalic, + ExtensionOrderedList, + ExtensionStrike, + ExtensionText, + ExtensionImage.configure({ + inline: true, + allowBase64: false, + HTMLAttributes: { + loading: "lazy", }, - }, - }), - ExtensionCodeBlock.configure({ - lowlight, - }), - ExtensionIframe, - ExtensionVideo, - ExtensionAudio, - ExtensionCharacterCount, - Extension.create({ - addGlobalAttributes() { - return [ - { - types: ["heading"], - attributes: { - id: { - default: null, + }), + ExtensionTaskList, + ExtensionLink.configure({ + autolink: true, + openOnClick: false, + }), + ExtensionTextAlign.configure({ + types: ["heading", "paragraph"], + }), + ExtensionUnderline, + ExtensionTable.configure({ + resizable: true, + }), + ExtensionSubscript, + ExtensionSuperscript, + ExtensionPlaceholder.configure({ + placeholder: t( + "core.components.default_editor.extensions.placeholder.options.placeholder" + ), + }), + ExtensionHighlight, + ExtensionCommands, + ExtensionCodeBlock.configure({ + lowlight, + }), + ExtensionIframe, + ExtensionVideo, + ExtensionAudio, + ExtensionCharacterCount, + ...extensionsFromPlugins, + Extension.create({ + addGlobalAttributes() { + return [ + { + types: ["heading"], + attributes: { + id: { + default: null, + }, }, }, - }, - ]; + ]; + }, + }), + Extension.create({ + addOptions() { + return { + getToolbarItems: ({ editor }: { editor: Editor }) => { + return { + priority: 220, + component: ToolbarItem, + props: { + editor, + isActive: false, + icon: markRaw(MdiFileImageBox), + title: i18n.global.t( + "core.components.default_editor.toolbar.attachment" + ), + action: () => (attachmentSelectorModal.value = true), + }, + }; + }, + }; + }, + }), + ], + autofocus: "start", + onUpdate: () => { + emit("update:raw", editor.value?.getHTML() + ""); + emit("update:content", editor.value?.getHTML() + ""); + emit("update", editor.value?.getHTML() + ""); + nextTick(() => { + handleGenerateTableOfContent(); + }); + }, + editorProps: { + handleDrop: (view, event: DragEvent, _, moved) => { + if (!moved && event.dataTransfer && event.dataTransfer.files) { + const images = Array.from(event.dataTransfer.files).filter((file) => + file.type.startsWith("image/") + ) as File[]; + + if (images.length === 0) { + return; + } + + event.preventDefault(); + + images.forEach((file, index) => { + uploadQueue.push({ + file, + process: (url: string) => { + const { schema } = view.state; + const coordinates = view.posAtCoords({ + left: event.clientX, + top: event.clientY, + }); + + if (!coordinates) return; + + const node = schema.nodes.image.create({ + src: url, + }); + + const transaction = view.state.tr.insert( + coordinates.pos + index, + node + ); + + editor.value?.view.dispatch(transaction); + }, + }); + }); + + return true; + } + return false; }, - }), - ], - autofocus: "start", - onUpdate: () => { - emit("update:raw", editor.value?.getHTML() + ""); - emit("update:content", editor.value?.getHTML() + ""); - emit("update", editor.value?.getHTML() + ""); - nextTick(() => { - handleGenerateTableOfContent(); - }); - }, - editorProps: { - handleDrop: (view, event: DragEvent, _, moved) => { - if (!moved && event.dataTransfer && event.dataTransfer.files) { - const images = Array.from(event.dataTransfer.files).filter((file) => - file.type.startsWith("image/") - ) as File[]; + handlePaste: (view, event: ClipboardEvent) => { + const types = Array.from(event.clipboardData?.types || []); + + if (["text/plain", "text/html"].includes(types[0])) { + return; + } + + const images = Array.from(event.clipboardData?.items || []) + .map((item) => { + return item.getAsFile(); + }) + .filter((file) => { + return file && file.type.startsWith("image/"); + }) as File[]; if (images.length === 0) { return; @@ -277,78 +302,28 @@ const editor = useEditor({ event.preventDefault(); - images.forEach((file, index) => { + images.forEach((file) => { uploadQueue.push({ file, process: (url: string) => { - const { schema } = view.state; - const coordinates = view.posAtCoords({ - left: event.clientX, - top: event.clientY, - }); - - if (!coordinates) return; - - const node = schema.nodes.image.create({ - src: url, - }); - - const transaction = view.state.tr.insert( - coordinates.pos + index, - node - ); - - editor.value?.view.dispatch(transaction); + editor.value + ?.chain() + .focus() + .insertContent([ + { + type: "image", + attrs: { + src: url, + }, + }, + ]) + .run(); }, }); }); - - return true; - } - return false; - }, - handlePaste: (view, event: ClipboardEvent) => { - const types = Array.from(event.clipboardData?.types || []); - - if (["text/plain", "text/html"].includes(types[0])) { - return; - } - - const images = Array.from(event.clipboardData?.items || []) - .map((item) => { - return item.getAsFile(); - }) - .filter((file) => { - return file && file.type.startsWith("image/"); - }) as File[]; - - if (images.length === 0) { - return; - } - - event.preventDefault(); - - images.forEach((file) => { - uploadQueue.push({ - file, - process: (url: string) => { - editor.value - ?.chain() - .focus() - .insertContent([ - { - type: "image", - attrs: { - src: url, - }, - }, - ]) - .run(); - }, - }); - }); + }, }, - }, + }); }); // image drag and paste upload @@ -417,65 +392,6 @@ const handleFetchPermalink = async ( }); }; -const toolbarMenuItems = computed(() => { - if (!editor.value) return []; - return [ - UndoMenuItem(editor.value), - RedoMenuItem(editor.value), - Separator(), - HeadingMenuItem(editor.value), - BoldMenuItem(editor.value), - ItalicMenuItem(editor.value), - UnderlineMenuItem(editor.value), - StrikeMenuItem(editor.value), - HighlightMenuItem(editor.value), - Separator(), - QuoteMenuItem(editor.value), - CodeMenuItem(editor.value), - SuperScriptMenuItem(editor.value), - SubScriptMenuItem(editor.value), - Separator(), - BulletListMenuItem(editor.value), - OrderedListMenuItem(editor.value), - TaskListMenuItem(editor.value), - Separator(), - CodeBlockMenuItem(editor.value), - TableMenuItem(editor.value), - Separator(), - AlignLeftMenuItem(editor.value), - AlignCenterMenuItem(editor.value), - AlignRightMenuItem(editor.value), - AlignJustifyMenuItem(editor.value), - { - type: "button", - icon: markRaw(MdiFileImageBox), - title: t("core.components.default_editor.toolbar.attachment"), - action: () => (attachmentSelectorModal.value = true), - isActive: () => false, - }, - ]; -}); - -const bubbleMenuItems = computed(() => { - if (!editor.value) return []; - return [ - BoldMenuItem(editor.value), - ItalicMenuItem(editor.value), - UnderlineMenuItem(editor.value), - StrikeMenuItem(editor.value), - HighlightMenuItem(editor.value), - QuoteMenuItem(editor.value), - CodeMenuItem(editor.value), - CodeBlockMenuItem(editor.value), - SuperScriptMenuItem(editor.value), - SubScriptMenuItem(editor.value), - AlignLeftMenuItem(editor.value), - AlignCenterMenuItem(editor.value), - AlignRightMenuItem(editor.value), - AlignJustifyMenuItem(editor.value), - ]; -}); - const handleGenerateTableOfContent = () => { if (!editor.value) { return; @@ -546,9 +462,7 @@ watch(