From 104f538e3ac3ca909e83508d22cf373e9f28abc9 Mon Sep 17 00:00:00 2001 From: Gubar Nikita Date: Tue, 23 Jul 2024 13:34:05 +0300 Subject: [PATCH] fix CKEditor links --- src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx | 6 +++++- src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx | 5 ++++- src/components/TrackerTaskComment/TrackerTaskComment.jsx | 6 +++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx index 3989e6c0..82d780a1 100644 --- a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx +++ b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx @@ -684,6 +684,7 @@ export const ModalTiсket = ({ editor={ClassicEditor} data={inputsValue.description} config={{ + toolbar: ["link"], removePlugins: [ "CKFinderUploadAdapter", "CKFinder", @@ -695,7 +696,10 @@ export const ModalTiсket = ({ "ImageUpload", "MediaEmbed", "BlockQuote" - ] + ], + link: { + addTargetToExternalLinks: true + } }} onChange={(event, editor) => { const data = editor.getData(); diff --git a/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx b/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx index 248cc110..e6fedca0 100644 --- a/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx +++ b/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx @@ -625,7 +625,10 @@ export const TrackerModal = ({ "numberedList" ], removePlugins: ["BlockQuote"], - placeholder: "Описание задачи" + placeholder: "Описание задачи", + link: { + addTargetToExternalLinks: true + } }} onChange={(event, editor) => { const data = editor.getData(); diff --git a/src/components/TrackerTaskComment/TrackerTaskComment.jsx b/src/components/TrackerTaskComment/TrackerTaskComment.jsx index e6601d56..8bd49920 100644 --- a/src/components/TrackerTaskComment/TrackerTaskComment.jsx +++ b/src/components/TrackerTaskComment/TrackerTaskComment.jsx @@ -121,6 +121,7 @@ export const TrackerTaskComment = ({ editor={ClassicEditor} data={commentsEditText} config={{ + toolbar: ["link"], removePlugins: [ "CKFinderUploadAdapter", "CKFinder", @@ -132,7 +133,10 @@ export const TrackerTaskComment = ({ "ImageUpload", "MediaEmbed", "BlockQuote" - ] + ], + link: { + addTargetToExternalLinks: true + } }} onChange={(event, editor) => { const data = editor.getData();