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>"
If editor
textprop contains empty string, and I want to type "Lorem" and then undo it byctrl+z, first argument ofonChangecallback will be called with values:So, I can't undo typing of first letter "L".
Editor example with empty initial
textvalue: 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>: