nhn / tui.editor

🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
http://ui.toast.com/tui-editor
MIT License
17.21k stars 1.76k forks source link

Paste From Word Document Causes Invalid HTML/Markdown #2321

Open jeromebridge opened 2 years ago

jeromebridge commented 2 years ago

Describe the bug

When copying a table from Word into the ToastUI in WYSIWYG mode it seems to produce HTML that is not valid. This only happens when the color-syntax plugin is being used.

To Reproduce

Steps to reproduce the behavior:

  1. Open this word document (ToastUiCopyPasteIssue.docx) in Microsoft Word (Note: If you use LibreOffice, it will not reproduce the issue)
  2. Select and copy the table in the document Screenshot from 2022-02-21 19-49-46
  3. Paste into the TOASTUI WYSIWYG editor Screenshot from 2022-02-21 19-51-01
  4. Select the "Markdown" tab in the editor. You will see the badly formatted span elements. Screenshot from 2022-02-21 19-51-39

Expected behavior

The pasted content should be valid HTML span tags. It appears there are "new line" characters in the style attribute of the span elements causing the issue.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

Add any other context about the problem here.

jwlee1108 commented 2 years ago

@jeromebridge Thank you for the issue.

I can reproduce it. It's hard to tell you the exact time because I'm doing other tasks together. I'll fix it as soon as possible.

eric-draperi commented 1 year ago

Hi all,

Any news for this bug ?