RichTextKit icon indicating copy to clipboard operation
RichTextKit copied to clipboard

Editor start to get slow after inserting a single image / Limiting what can be pasted into editor

Open DavidAlvarezDev opened this issue 2 years ago • 1 comments

Hello!

I noticed that pictures and be directly pasted into the editor by the user. I am guessing that it is due to the size of the image taken by the phone's camera.

So, is there currently a way to regulate what gets entered into the editor or to see what is coming after the user hits 'Paste' but before it is applied to the NSAttributedString? I would possibly use this feature to compress the size of images before they are applied to the NSAttributedString.

Thanks! David Alvarez, [email protected]

DavidAlvarezDev avatar Jun 25 '23 03:06 DavidAlvarezDev

Hi @DavidAlvarezDev

Great find! I've been considering adding a byte size limit to the image, but haven't had time yet.

Images are currently jpeg compressed, but I also think there should be a max byte size to avoid this situation.

danielsaidi avatar Jun 29 '23 08:06 danielsaidi