From fbbee2f417cd6bbd21628b8f925d7a41dc778442 Mon Sep 17 00:00:00 2001 From: Sam Arbid Date: Wed, 3 Jul 2024 21:32:56 +0200 Subject: [PATCH] editor: fix jumping cursor to the top * see https://www.tiny.cloud/docs/tinymce/6/react-ref/#initialvalue --- src/lib/forms/RichEditor.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/forms/RichEditor.js b/src/lib/forms/RichEditor.js index 9025b419..55415a19 100644 --- a/src/lib/forms/RichEditor.js +++ b/src/lib/forms/RichEditor.js @@ -1,6 +1,7 @@ // This file is part of React-Invenio-Forms // Copyright (C) 2022 CERN. // Copyright (C) 2020 Northwestern University. +// Copyright (C) 2024 KTH Royal Institute of Technology. // // React-Invenio-Forms is free software; you can redistribute it and/or modify it // under the terms of the MIT License; see LICENSE file for more details. @@ -19,7 +20,7 @@ import PropTypes from "prop-types"; export class RichEditor extends Component { render() { - const { id, value, disabled, minHeight, onBlur, onChange, onFocus, editorConfig } = + const { id, value, disabled, minHeight, onBlur, onChange, onFocus, editorConfig, inputValue, onEditorChange } = this.props; const config = { branding: false, @@ -40,12 +41,14 @@ export class RichEditor extends Component { return ( ); }