quill icon indicating copy to clipboard operation
quill copied to clipboard

Add getSemanticHTML options & Add preserveWhitespace option to getSem…

Open MaciejDabek opened this issue 10 months ago • 5 comments

As many people, I was also using quill for it HTML content, so it can be displayed somewhere else.

The addition of conversion from whitespace to   was needed for consecutive copying and pasting, so my proposition is to add options object that can be extended for other cases. For now, I added preserveWhitespace that preserve all whitespaces if true, otherwise all whitespaces are changed to   (default: false).

I hope that this can be a middle ground between pushing Quill forward and providing compatibility for all people using it for a long time.

MaciejDabek avatar Feb 04 '25 20:02 MaciejDabek

I think this is the best solution for the problem and is future proof due to extensibility.

jankapunkt avatar Mar 10 '25 10:03 jankapunkt

Would love to see this PR approved, just like many others we are having troubles with the &nbsp chars.

PieterJanCl avatar Mar 27 '25 10:03 PieterJanCl

This is quite good. Would you mind creating a PR to this repo: https://github.com/vincentdchan/quill-next

Because the official Quill repository isn't active, I created a fork and have been maintaining it. Please take a look. If you submit a PR to my repository, I'll be happy to merge it!

vincentdchan avatar May 08 '25 12:05 vincentdchan

@vincentdchan based on what information you do assume this repo is not active? I'd like to know and potentially kick off a discussion

jankapunkt avatar May 08 '25 12:05 jankapunkt

@jankapunkt I think it ready has discussions about it. You can check this #4622 #4636

vincentdchan avatar May 09 '25 15:05 vincentdchan