JiHong88 / suneditor

Pure javascript based WYSIWYG html editor, with no dependencies.
http://suneditor.com
MIT License
1.67k stars 308 forks source link

Spaces removed on pasting #1350

Open oaknorton opened 6 months ago

oaknorton commented 6 months ago

Describe the bug I'm copy/pasting text into a SunEditor window and it removes spaces in the text.

To Reproduce Steps to reproduce the behavior: 1) Go to: https://veritypublishing.com/resource?id=MjU2&show=0&para=1 2) Copy the last line of the first paragraph 3) Paste it into a SunEditor window 4) Notice how it inserts a leading line break and then removes spaces in "taught somewhat in all the" so it appears as "taughtsomewhatinallthe"

Expected behavior It shouldn't insert a leading space or remove spaces

Screenshots https://prnt.sc/JOYQM1_q_3-_

Desktop (please complete the following information): Windows 11, Firefox (latest)

redfellow commented 6 months ago

Happens to me too. It's enough to copy paste back to back formatted words from suneditor itself.

redfellow commented 6 months ago

Original copied HTML:

<h2 id="sasd">sasd</h2><p>jee <strong>strreee xaaa </strong><em>basdasdasd </em><strong>asdeweafeaf </strong><sup>asdc </sup>xacsa</p>

Becomes:

<h2 id="sasd">sasd</h2><p>jee<strong>strreee xaaa</strong><em>basdasdasd</em><strong>asdeweafeaf</strong><sup>asdc</sup>xacsa</p>
jordan-salesfloor commented 2 days ago

Having the same issue