learning-unlimited / ESP-Website

A website to help manage the logistics of large, short-term educational programs
82 stars 57 forks source link

Handle Base64 images in rich editor #3612

Open milescalabresi opened 1 year ago

milescalabresi commented 1 year ago

Northwestern was able to paste an images encoding into the rich text editor, but the content was so large that it caused a memory error when saved. We should either totally disable this capability (ctrl+v with an image on the clipboard does nothing) or preferably enable it fully (paste an inline rendered image like a rich document).

willgearty commented 1 year ago

We definitely not NOT want to allow the use of base64 images. As I discussed in https://github.com/learning-unlimited/ESP-Website/pull/2665 (and has also been discussed on stackoverflow and elsewhere), base64 images can become extremely large bits of text, which we then need to store in the database, which then can cause memory issues.

We could/should look into the ability to upload images without having to go to the filebrowser. There is documentation and some examples on their website: https://xdsoft.net/jodit/docs/modules/modules_uploader.html. It's also possible that upgrading to a newer version may help (we're currently on v.3.2.36)?

Also, maybe this issue is related? https://github.com/xdan/jodit/issues/665