slate-angular icon indicating copy to clipboard operation
slate-angular copied to clipboard

Undo Redo doesn't work on paragraph with children.

Open allanatorr opened this issue 1 year ago • 2 comments
trafficstars

Hello!

I have this object for the initial editor value, given from the official slate example:

initialValue = [
{
      type: 'paragraph',
      children: [
          { text: 'This is editable ' },
          { text: 'rich', bold: true },
          { text: ' text, ' },
          { text: 'much', bold: true, italic: true },
          { text: ' better than a ' },
          { text: '<textarea>' },
          { text: '!' }
      ]
  }
]

When I mark in the editor for example "text, much" and remove it, then press ctrl+z and after it ctrl+y multiple times, more text gets removed then I initially removed ("text, much").

Thank you for possible solutions!

allanatorr avatar Mar 21 '24 16:03 allanatorr

I couldn't understand this issue, could you record a GIF or VIEDO showing the issue happening? @allanatorr

pubuzhixing8 avatar Mar 30 '24 10:03 pubuzhixing8

I think what he said can be described in the following steps: (1) remove the "text,much"; (2)ctrl + z only once time, "text,much" shows up again; (3)ctrl + y several times, only the "text,much" would be removed in theory, but he said more texts be removed ,rather than only the "text,much" one.

theblackiki avatar Nov 13 '24 08:11 theblackiki