Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo Redo doesn't work on paragraph with children. #261

Open
allanatorr opened this issue Mar 21, 2024 · 2 comments
Open

Undo Redo doesn't work on paragraph with children. #261

allanatorr opened this issue Mar 21, 2024 · 2 comments

Comments

@allanatorr
Copy link

allanatorr commented Mar 21, 2024

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!

@pubuzhixing8
Copy link
Collaborator

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

@theblackiki
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants