Alex-D / Trumbowyg

A lightweight and amazing WYSIWYG JavaScript editor under 10kB
https://alex-d.github.io/Trumbowyg
MIT License
4.03k stars 615 forks source link

Pasting leads to "apple-" span tags #10

Closed Bratzilla closed 10 years ago

Bratzilla commented 10 years ago

DISCLOSURE: I'm evaluating editors for use by heavy-duty writers (novelists) who will do very evil things like copy and paste from Word. I'm testing the paste behavior of this editor very carefully because of the types of end-users it will be subjected to.

I noticed when copying and pasting from Word that the source code generated within the editor contains the "apple-" span tags. I've never seen this before in any of the other WYSIWYG editors I've evaluated. Not sure what is triggering this behavior, and this is happening in Chrome, Firefox AND IE (hard to believe those three editors are consistent on ANYTHING).

TO REPLICATE: Copy and paste anything into the editor - pasting from Word is a GREAT stress test. Then, look at the raw HTML code. It doesn't matter if the underlying structure is a textarea or div, the results are the same - you will have text peppered with "apple-" span tags.

Once these issues are more sorted I can then focus on porting my Word Cruft remover functions. :)

Alex-D commented 10 years ago

Thanks for reporting.

I have take a look on that and I have make the choice to do not considerate this like a problem. I want to create a lightweight WYSIWYG editor. If you want this functions, you can use TinyMCE or CKEditor.

It is possible that be supported in near futur but as an plugin, not in the native version because this problem is complexe and heavy.

matzke commented 10 years ago

+1 for pasting from word plugin (autoclean plugin)