Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: WYSIWYG Editor getting very slow after pasting an image

twoeyes priority asked 2 years ago


Hi mdb team,

we use your WYSIWYG editor in a project as a mail client - it works as expected!

But... after inserting an image, like a screenshot or something, it gets very slow. The image doesn't have to be very large — e.B. 800 x 600 px is enough — to slow it down.

You can test it here: https://mdbootstrap.com/docs/standard/plugins/wysiwyg-editor/

Do you have any suggestions?

Thanks and best regards Roland


Grzegorz Bujański staff commented 2 years ago

What do you mean as slow down? When you insert a picture and then try to type the letters appear very slowly? I insert 4 different pictures with 4 different resolutions and I didn't notice anything like that. How can i reproduce this error? You can send a link to a sample image that slows down WYSIWYG?


twoeyes priority commented 2 years ago

Hi Grzegorz, I created a "short" video where you can see the delay. I took it from your site by using the editor in the playground area.

https://tom.twoeyes.net/upload/sample/mdb-editor.mp4

I first type some random letters, then I paste a picture (screenshot of your mail) and after that I type again .... and the I wait .... wait ....

I use the Microsoft Edge browser ... in firefox it is not that slow but there is also a delay!

Thanks and best regards Roland


Grzegorz Bujański staff answered 2 years ago


I have nowhere found any information as to what may be causing this behavior. But I think it is related to the fact that this file is encrypted with base64 and it takes a lot of processing power. To be honest, we did not consider adding images from disk at all (because browsers block this action by default). To prevent this, the image should be uploaded to the server and then added. Unfortunately, we are unable to guarantee this option. You would have to handle it on your side. But unfortunately, there is currently no possibility of listening to an event that will be triggered before adding the image

I will add it to our to-do list so that such an event will be added. At the moment you must first upload the image to the server.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.10.2
  • Device: All
  • Browser: All
  • OS: Windows 11
  • Provided sample code: No
  • Provided link: Yes