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

Problem with copy/paste from word. #68

Open
bmaisonneuve opened this issue Apr 11, 2024 · 0 comments
Open

Problem with copy/paste from word. #68

bmaisonneuve opened this issue Apr 11, 2024 · 0 comments

Comments

@bmaisonneuve
Copy link

Hello,

When we copy a nested list form the editor to word it works correctly. But if we copy back the list from word to the editor, the nested element are not working (this can be tester on the demo of editor js).

After some digging, this is because the HTML paste into the editor is incorrect. It looks like this :

<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <ul>
    <li>Black tea</li>
  </ul>
</ul>

Instead of this :

<ul>
  <li>Coffee</li>
  <li>Tea
    <ul>
      <li>Black tea</li>
    </ul>
  </li>
</ul>

The problem is that the sub ul tag is not inside the li tag. For now I discovered the problem only with Word but there might be the problem with other copy paste. I think fixing this might be a good idea to make the copy/paste more resilient.

To fix this we can a code that fixes the HTML before calling the pasteHandler.

I'll make a pull request/

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

1 participant