During integration of TinyMCE in a react/next-js app, I was getting input value in reserve order, even while typing.
To fix it you must replace component attribute 'initialValue' by 'value'.
At end you’ll get something like this bellow:
<Editor
onInit={(evt, editor) => editorRef.current = editor}
value={value}
init={{
height: 200,
menubar: false,
plugins: [
'advlist autolink lists link charmap anchor'
],
toolbar: 'undo redo | formatselect | ',
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
}}
onEditorChange={(content) => {
setFieldValue(content);
}}
apiKey="xxx-yyy-zzz"
disabled={disabled}
id={id}
key={id}
/>
