Closed rkok closed 1 month ago
Merging this would be a breaking change. Happy to accept an optional prop to disable the trim
Hi @petyosi, prop is now added :+1:
:tada: This PR is included in version 3.12.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
When using diffSourcePlugin with viewmode=source, this trim() would cause MDXEditor's onChange to fire immediately. This in turn would dirty the field when used in combination with a form wrapper like react-hook-form.
I think the initial markdown does not need to be trimmed; the user should be free to initialize the editor with trailing or leading newlines as they see fit, the editor should not care.