From 3fcde0e95d9dd147696ff1f4d4c07546e2dce238 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sun, 1 Dec 2024 14:54:38 +0100 Subject: [PATCH] Add RichText Link --- package-lock.json | 24 ++++++++++++ package.json | 1 + .../rich-text-editor.component.html | 13 +++++++ .../rich-text-editor.component.ts | 39 ++++++++++++++++++- src/styles/_rich-text-editor.scss | 9 +++++ 5 files changed, 85 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index c19448cf..b4300c6e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ "@tiptap/extension-document": "^2.7.1", "@tiptap/extension-history": "^2.7.1", "@tiptap/extension-italic": "^2.7.1", + "@tiptap/extension-link": "^2.7.1", "@tiptap/extension-list-item": "^2.7.1", "@tiptap/extension-ordered-list": "^2.7.1", "@tiptap/extension-paragraph": "^2.7.1", @@ -6919,6 +6920,23 @@ "@tiptap/core": "^2.7.0" } }, + "node_modules/@tiptap/extension-link": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@tiptap/extension-link/-/extension-link-2.10.3.tgz", + "integrity": "sha512-8esKlkZBzEiNcpt7I8Cd6l1mWmCc/66pPbUq9LfnIniDXE3U+ahBf4m3TJltYFBGbiiTR/xqMtJyVHOpuLDtAw==", + "license": "MIT", + "dependencies": { + "linkifyjs": "^4.1.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/pm": "^2.7.0" + } + }, "node_modules/@tiptap/extension-list-item": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.10.3.tgz", @@ -14694,6 +14712,12 @@ "uc.micro": "^2.0.0" } }, + "node_modules/linkifyjs": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.1.4.tgz", + "integrity": "sha512-0/NxkHNpiJ0k9VrYCkAn9OtU1eu8xEr1tCCpDtSsVRm/SF0xAak2Gzv3QimSfgUgqLBCDlfhMbu73XvaEHUTPQ==", + "license": "MIT" + }, "node_modules/liquid-json": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/liquid-json/-/liquid-json-0.3.1.tgz", diff --git a/package.json b/package.json index 631f9712..1a96e75e 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "@tiptap/extension-bullet-list": "^2.7.1", "@tiptap/extension-ordered-list": "^2.7.1", "@tiptap/extension-code": "^2.7.1", + "@tiptap/extension-link": "^2.7.1", "uuid": "^10.0.0", "zone.js": "~0.14.2" }, diff --git a/src/app/features/spaces/contents/shared/rich-text-editor/rich-text-editor.component.html b/src/app/features/spaces/contents/shared/rich-text-editor/rich-text-editor.component.html index d188e83b..e931c184 100644 --- a/src/app/features/spaces/contents/shared/rich-text-editor/rich-text-editor.component.html +++ b/src/app/features/spaces/contents/shared/rich-text-editor/rich-text-editor.component.html @@ -73,6 +73,19 @@   + +