-
-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When pasting images, editing of text becomes very slow #1440
Comments
Commenting to note that I have experienced this too, and limiting the size of the images down to a quite small 500px maximum on either side has helped a lot, though it will still be an issue if your users fill the text box with a bunch of images. This can be done in the trumbowyg.base64.js file down around line 143 within the
That being said, the issue was not apparent until we launched with the editor and it's definitely a pain point! |
Is it only on Safari? |
From my perception this is not only a Safari issue but also seen in Chrome: it seems solely to be an issue with slightly larger pictures. Question is why it slows it so much down, as while typing the image is simply "moved" and should ideally not consume so much CPU power. |
I think it's due to the synchronization between contenteditable and textarea, which makes a lot of data to transfer on each keystroke and update in the DOM. |
Hi. |
@Alex-D Just a few thoughts (but frankly not being in the details of your code):
Base64 is really powerful to implement nice-looking texts with images without hassle; would be great if we could speed up the editing of the remaining texts dramatically, otherwise it is not usable with pics larger than 500px x 500px. |
Description
I am mostly using Trumbowyg on macOS Safari an have enabled the respective plugins to allow pasting images into the editor which are stored as base64 HTMLs.
However, when pasting an image, the text editing becomes very laggy and slow.
How to reproduce?
You can try it yourself on the trumbowyg demos webpage where after an image was pasted, text editing becomes very slow.
Any chance to speed this up, so it is still realistically usable for HTMLs with pasted images?
The text was updated successfully, but these errors were encountered: