quill icon indicating copy to clipboard operation
quill copied to clipboard

Spaces are not being preserved while copying in HTML format

Open amigup opened this issue 10 months ago • 0 comments

Spacing between words are not being preserved while copying and pasting to a destination app via HTML format.

Steps for Reproduction

  1. Visit https://codesandbox.io/p/sandbox/quill-copy-space-issue-5j6t64?file=%2Fsrc%2Findex.tsx
  2. Type a word and add few spaces and type another word.
  3. Copy the message from quill Editor
  4. Paste to a app which reads the HTML format
<html>
<body>
<!--StartFragment--><span style="color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">FirstWord                                         AnotherWord</span><!--EndFragment-->
</body>
</html>

Expected behavior: Spacing between word should be preserved on pasting via HTML format image

Actual behavior: Spacing between word are not preserved on pasting via HTML format image

Platforms: Chrome, windows

Version: Quill version 1.3.1

amigup avatar Apr 09 '24 07:04 amigup