nhn / tui.editor

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

Problem when copy paste table from internet (backslash (\) added) #1077

Open Oxynos opened 4 years ago

Oxynos commented 4 years ago

Describe the bug

When I copy a table from an html page on internet and i paste it ine the tui-editor I can see my table. Then I go on the markdown tab and some backslash () are added before some character. When I go back on the WYSIWYG tab i can't see my table anymore.

Expected behavior

Don't add unwanted backslash ()

Screenshots

Screen Recording 2020-07-06 at 05 52 05 29 PM

For example I use theses tables : https://developer.airfranceklm.com/docs/read/opendata/offers/Errors_Code An I use the last version of TUI editor and angular 9.

seonim-ryu commented 4 years ago

@Oxynos I'm curious, where did you copy the table from? The strange thing is that if you copy the original table and paste it into the WYSIWYG editor, it looks like this.

wwe

But the table you pasted is wrong. I think only the table body was created.

wrong-table

In the current situation, the table syntax is broken when changing to markdown. And when you change to the WYSIWYG editor, | is recognized as a special character and escaped.

First, I need to check if the table data pasted into WYSIWYG is correct. Would you like to show the html once with the element view of the developer tools?

Oxynos commented 4 years ago

I found the problem, it's because we used tag in the tag instead of , can you adapt the behaviour of the convertor to take this case into account?

vmangelovv commented 3 years ago

@seonim-ryu Do we have a fix for this? When i write mathml, again we have backslash \ added. E.g. Copy paste this:

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mi>a</mi><mo>≠</mo><mn>0</mn>
</math>

and the output is this ->

<math xmlns="[http://www.w3.org/1998/Math/MathML](http://www.w3.org/1998/Math/MathML)" data-tomark-pass="">
&nbsp; \<mi>a\</mi>\<mo>≠\</mo>\<mn>0\</mn>
\</math>
kino3 commented 1 year ago

When is this bug scheduled to be fixed? We are also having the same problem.