marmelab / react-admin

A frontend Framework for single-page applications on top of REST/GraphQL APIs, using TypeScript, React and Material Design
http://marmelab.com/react-admin
MIT License
25.06k stars 5.27k forks source link

Extra <p> inserted on each save #2091

Closed ikushlianski closed 5 years ago

ikushlianski commented 6 years ago

Please do not submit support requests or "How to" questions here. For that, go to StackOverflow.

What you were expecting: Expected no extra

markup to be inserted on each save.

What happened instead: Each time I save the vacancy with RichTextInput as one of the fields an extra

tag appears between one

and

lihop commented 6 years ago

This is related to https://github.com/marmelab/aor-rich-text-input/issues/11.

In https://github.com/marmelab/react-admin/commit/b65e697a5fc55d03e2de48df89a2aeaff029c126#diff-c8090629b5a5ba95a6f9c5154882be18R40 quill was upgraded from v1.1.9 to v1.3.6, meaning that we can now set the matchVisual option to false in the clipboard configuration.

I can confirm that this resolves the issue, but it changes the clipboard behaviour so we might want to reset the config after the clipboard has been used to set the content on form load.

https://github.com/marmelab/react-admin/blob/2d169154cb04c4c05899cfa534f437e4b9d776ef/packages/ra-input-rich-text/src/index.js#L31-L42