@@ -11,8 +11,8 @@ import { Formik } from 'formik';
1111import * as Yup from 'yup' ;
1212import classNames from 'classnames' ;
1313import moment from 'moment' ;
14-
15- import { WysiwygEditor } from '../../generic/WysiwygEditor ' ;
14+ import { useSelector } from 'react-redux' ;
15+ import TinyMceWidget , { prepareEditorRef } from '../../editors/sharedComponents/TinyMceWidget ' ;
1616import messages from '../messages' ;
1717import unsavedMessages from './unsaved-modal-messages' ;
1818import { TIME_FORMAT } from '../../constants' ;
@@ -25,6 +25,8 @@ const ReleaseNoteForm = ({
2525} ) => {
2626 const [ showUnsavedModal , setShowUnsavedModal ] = React . useState ( false ) ;
2727 const intl = useIntl ( ) ;
28+ const { editorRef, refReady, setEditorRef } = prepareEditorRef ( ) ;
29+ const { courseId } = useSelector ( ( state ) => state . courseDetail ) ;
2830 const tzName = React . useMemo ( ( ) => {
2931 try {
3032 const { timeZone } = Intl . DateTimeFormat ( ) . resolvedOptions ( ) ;
@@ -169,13 +171,23 @@ const ReleaseNoteForm = ({
169171 </ Form . Group >
170172
171173 < Form . Group className = "m-0 mb-3" >
172- < WysiwygEditor
173- initialValue = { values . description }
174- data-testid = "release-note-wysiwyw"
175- name = "description"
176- minHeight = { 200 }
177- onChange = { ( value ) => setFieldValue ( 'description' , value ) }
178- />
174+ { refReady && (
175+ < TinyMceWidget
176+ editorRef = { editorRef }
177+ editorType = "text"
178+ textValue = { values . description }
179+ initialValue = { initialValues . description || '' }
180+ minHeight = { 200 }
181+ editorContentHtml = { initialValues . description || '' }
182+ setEditorRef = { setEditorRef }
183+ onChange = { ( value ) => setFieldValue ( 'description' , value ) }
184+ initializeEditor = { ( ) => ( { } ) }
185+ learningContextId = { courseId }
186+ images = { { } }
187+ enableImageUpload = { false }
188+ showImageButton
189+ />
190+ ) }
179191 { touched . description && errors . description && (
180192 < p className = "invalid-feedback d-block" >
181193 { errors . description }
0 commit comments