This commit is contained in:
Николай Полтщук 2023-06-26 13:24:20 +03:00
parent 1c8af369f3
commit b200a7a4a2
2 changed files with 27 additions and 10 deletions

View File

@ -1,3 +1,5 @@
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import { CKEditor } from "@ckeditor/ckeditor5-react";
import React, { useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { Link } from "react-router-dom";
@ -12,9 +14,6 @@ import { apiRequest } from "@api/request";
import TrackerModal from "@components/Modal/Tracker/TrackerModal/TrackerModal";
import TrackerTaskComment from "@components/TrackerTaskComment/TrackerTaskComment";
import { CKEditor } from '@ckeditor/ckeditor5-react';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import archive from "assets/icons/archive.svg";
import arrow from "assets/icons/arrows/arrowStart.png";
import fullScreen from "assets/icons/arrows/inFullScreen.svg";
@ -374,21 +373,34 @@ export const ModalTiсket = ({
<div className="content__description">
{editOpen ? (
<CKEditor
editor={ ClassicEditor }
editor={ClassicEditor}
data={inputsValue.description}
config={{
removePlugins: ['CKFinderUploadAdapter', 'CKFinder', 'EasyImage', 'Image', 'ImageCaption', 'ImageStyle', 'ImageToolbar', 'ImageUpload', 'MediaEmbed', 'BlockQuote', ]
removePlugins: [
"CKFinderUploadAdapter",
"CKFinder",
"EasyImage",
"Image",
"ImageCaption",
"ImageStyle",
"ImageToolbar",
"ImageUpload",
"MediaEmbed",
"BlockQuote",
],
}}
onChange={ ( event, editor ) => {
onChange={(event, editor) => {
const data = editor.getData();
setInputsValue((prevValue) => ({
...prevValue,
description: data,
}))
} }
}));
}}
/>
) : (
<p dangerouslySetInnerHTML={{__html: inputsValue.description}} />
<p
dangerouslySetInnerHTML={{ __html: inputsValue.description }}
/>
)}
{/*<img src={taskImg} className="image-task"></img>*/}
</div>

View File

@ -509,7 +509,12 @@ export const ProjectTracker = () => {
{task.title}
</p>
</div>
<p dangerouslySetInnerHTML={{__html: task.description}} className="tasks__board__item__description"></p>
<p
dangerouslySetInnerHTML={{
__html: task.description,
}}
className="tasks__board__item__description"
></p>
<div className="tasks__board__item__info">
<div className="tasks__board__item__info__more">
<img src={commentsBoard} alt="commentsImg" />