Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR to fix the problem with abstract field. I have followed the solution used in react-invenio-forms https://github.com/inveniosoftware/react-invenio-forms/blob/42b93636be95177f1d7845e4f55c8bb63a1d9b92/src/lib/forms/RichInputField.js#L16
Which is a hacky solution and causes console errors, as this prop is not supposed to be a function. It even causes an uncaught type error, as the library inside tries to strip white text from the value. This amazingly does not crash the app (i don't understand why). This is screenshot from zenodoo (live):
On the other hand, the problem is deeper as it is not recommended to make the editor actual controlled input, which is the paradigm that we use and is used most often in react (https://www.tiny.cloud/docs/tinymce/latest/react-ref/#using-the-tinymce-react-component-as-a-controlled-component).
To summarize, it works, but it is not pretty and I don't like it. Alternative would be to make it actual controlled input with onChange handler, which could be inefficient in case someone writes a lot of text into the input.
Please take a look. If it is ok, I can use this component in restauration repo as well.