peterpeterparker / stylo

Another kind of rich text editor
https://stylojs.com
MIT License
714 stars 28 forks source link

fix: reevaluate node depths when moving element from undo to redo queue #90

Closed peterpeterparker closed 2 years ago

peterpeterparker commented 2 years ago

For example in

<h2>
   <span>a\nb\n</span>

It had for effect to redo b on position 0

<h2>
   <span>ba\n\n</span>

Reevaluate the node depths when moving the element to the redo queue fixes the right index