ckeditor
This commit is contained in:
@ -12,6 +12,9 @@ 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";
|
||||
@ -370,17 +373,22 @@ export const ModalTiсket = ({
|
||||
)}
|
||||
<div className="content__description">
|
||||
{editOpen ? (
|
||||
<textarea
|
||||
value={inputsValue.description}
|
||||
onChange={(e) => {
|
||||
<CKEditor
|
||||
editor={ ClassicEditor }
|
||||
data={inputsValue.description}
|
||||
config={{
|
||||
removePlugins: ['CKFinderUploadAdapter', 'CKFinder', 'EasyImage', 'Image', 'ImageCaption', 'ImageStyle', 'ImageToolbar', 'ImageUpload', 'MediaEmbed', 'BlockQuote', ]
|
||||
}}
|
||||
onChange={ ( event, editor ) => {
|
||||
const data = editor.getData();
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
description: e.target.value,
|
||||
}));
|
||||
}}
|
||||
description: data,
|
||||
}))
|
||||
} }
|
||||
/>
|
||||
) : (
|
||||
<p>{inputsValue.description}</p>
|
||||
<p dangerouslySetInnerHTML={{__html: inputsValue.description}} />
|
||||
)}
|
||||
{/*<img src={taskImg} className="image-task"></img>*/}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user