OscarGodson / EpicEditor

EpicEditor is an embeddable JavaScript Markdown editor with split fullscreen editing, live previewing, automatic draft saving, offline support, and more. For developers, it offers a robust API, can be easily themed, and allows you to swap out the bundled Markdown parser with anything you throw at it.
http://epiceditor.com
MIT License
4.25k stars 334 forks source link

Copypaste multiple spaces does not work #308

Open W4RH4WK opened 10 years ago

W4RH4WK commented 10 years ago

just checked out this editor, looks very promising, probably gonna use this in the near future.

apparently copying a text segment containing multiple spaces and inserting it again does not work properly.

copy : a              b
paste: a b
OscarGodson commented 10 years ago

Ugh, yeah. This is probably because we strip out everything on paste so it doesn't paste formatted HTML. Looks like we're ripping out spaces too, but maybe we can preserve just those.

Kryptonit3-zz commented 10 years ago

@W4RH4WK - if you want to attempt it yourself in the uncompressed epiceditor.js it is lines 994,995

        content = content.replace(/\s\s\s/g, '   ')
        content = content.replace(/\s\s/g, '  ')
W4RH4WK commented 10 years ago

removing the lines would be a working solution but it might not have the desired effect for all people.

what do you guys think about toggling the pasteHandler on or off?