tinymce / tinymce-react

Offical TinyMCE React component
MIT License
937 stars 152 forks source link

Uncontrolled react component: no value #437

Closed jacob-orbiit closed 1 year ago

jacob-orbiit commented 1 year ago

What is the current behavior?

The editor generates a <textarea> but does not synchronise its value, so when an encasing <form> is submitted, the editor's content is missing.

jsx ```jsx setDirty(true)} /> ```

Also, the editor ignores a name prop (accepting only id).

What is the expected behavior?

The editor's value should be available in SubmitEvent.target.elements (the textarea is present, but it has no value).

Which versions of TinyMCE, and which browser / OS are affected by this issue?

tinymce-react: 4.3.0 browser: Vivaldi 5.6.2867.62 macOS: 12.6

Did this work in previous versions of TinyMCE or tinymce-react?

It did not work in tinymce-react v3.14.0.

exalate-issue-sync[bot] commented 1 year ago

Ref: INT-3135

jacob-orbiit commented 1 year ago

Ahh, sorry, yes the value is present in SubmtEvent.target.elements. The problem is the missing name attribute.