-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
If editor text prop contains empty string, and I want to type "Lorem" and then undo it by ctrl+z, first argument of onChange callback will be called with values:
"L"
"<p>L</p>"
"<p>Lo</p>"
"<p>Lor</p>"
"<p>Lore</p>"
"<p>Lorem</p>"
"<p>Lore</p>"
"<p>Lor</p>"
"<p>Lo</p>"
"<p>L</p>"
"L"
"<p>L</p>"
"L"
"<p>L</p>"
"L"
"<p>L</p>"
...
So, I can't undo typing of first letter "L".
Editor example with empty initial text value: https://davidyuk.github.io/react-medium-editor/
Also, if I use <p></p> as initial value, I can undo all, but content places before <p>:
"L<p></p>"
"Lo<p></p>"
"Lor<p></p>"
"Lore<p></p>"
"Lorem<p></p>"
"Lore<p></p>"
"Lor<p></p>"
"Lo<p></p>"
"L<p></p>"
"<p></p>"
Metadata
Metadata
Assignees
Labels
No labels