From 4c8cc0fc6ce599f6617db8c52c46d4626154458d Mon Sep 17 00:00:00 2001 From: vimal1083 <vimal1083@gmail.com> Date: Wed, 25 Aug 2021 11:44:51 +0530 Subject: [PATCH] Fix cursor position in rich text editor --- .../TinyMCE/__tests__/__snapshots__/index.test.js.snap | 4 ++-- .../static_src/src/app/src/common/components/TinyMCE/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hypha/static_src/src/app/src/common/components/TinyMCE/__tests__/__snapshots__/index.test.js.snap b/hypha/static_src/src/app/src/common/components/TinyMCE/__tests__/__snapshots__/index.test.js.snap index b7b8f7c10..2fd5250a3 100644 --- a/hypha/static_src/src/app/src/common/components/TinyMCE/__tests__/__snapshots__/index.test.js.snap +++ b/hypha/static_src/src/app/src/common/components/TinyMCE/__tests__/__snapshots__/index.test.js.snap @@ -23,8 +23,8 @@ exports[`Test tinymce component render a TinyMCE component 1`] = ` "menubar": false, } } - initialValue="abc" onEditorChange={[Function]} + value="abc" /> </div> `; @@ -57,8 +57,8 @@ exports[`Test tinymce component with required render a TinyMCE component with re "menubar": false, } } - initialValue="abc" onEditorChange={[Function]} + value="abc" /> </div> `; diff --git a/hypha/static_src/src/app/src/common/components/TinyMCE/index.js b/hypha/static_src/src/app/src/common/components/TinyMCE/index.js index c838f1c89..694c4840d 100644 --- a/hypha/static_src/src/app/src/common/components/TinyMCE/index.js +++ b/hypha/static_src/src/app/src/common/components/TinyMCE/index.js @@ -13,7 +13,7 @@ const TinyMCE = props => { </label> <HelperComponent {...props.helperProps} /> <Editor - initialValue={props.value} + value={props.value} init={{ ...(props.init), menubar: false -- GitLab