Bug 26949 upgraded JS lib TinyMCE to 5.9.2 This version has a known issue on images drag and drop : https://stackoverflow.com/questions/64782955/tinymce-inline-drag-and-drop-image-upload-not-working
I set as major because several librarians are asking for this fix. They may use this feature in OPAC news very often.
Created attachment 140607 [details] [review] Bug 31558: Fix image drag and drop in TinyMCE Bug 26949 upgraded JS lib TinyMCE to 5.9.2 This version has a known issue on images drag and drop : https://stackoverflow.com/questions/64782955/tinymce-inline-drag-and-drop-image-upload-not-working Test plan : 1) Go to Tools > HTML customizations 2) Create a new entry (not using text editor) 3) Drag and drop an image => Without patch you see an error message from TinyMCE 'Dropped file type is not supported' => With patch : It works !
There are other places with TinyMCE (wysiwyg prefs, branches description ...) but looks like they do not need images drag and drop.
Created attachment 140609 [details] [review] Bug 31558: Fix image drag and drop in TinyMCE Bug 26949 upgraded JS lib TinyMCE to 5.9.2 This version has a known issue on images drag and drop : https://stackoverflow.com/questions/64782955/tinymce-inline-drag-and-drop-image-upload-not-working Test plan : 1) Go to Tools > HTML customizations 2) Create a new entry (not using text editor) 3) Drag and drop an image => Without patch you see an error message from TinyMCE 'Dropped file type is not supported' => With patch : It works ! Signed-off-by: David Nind <david@davidnind.com>
This adds a bunch of base64 encoded stuff into the additional_contents table in the DB, not my favorite but likely not harmful. I tried renaming a JS file to JPG and it comes out looking like this: <img src="data:image/jpeg;base64," alt="" /> The fix is trivial so I am passing QA.
Created attachment 140686 [details] [review] Bug 31558: Fix image drag and drop in TinyMCE Bug 26949 upgraded JS lib TinyMCE to 5.9.2 This version has a known issue on images drag and drop : https://stackoverflow.com/questions/64782955/tinymce-inline-drag-and-drop-image-upload-not-working Test plan : 1) Go to Tools > HTML customizations 2) Create a new entry (not using text editor) 3) Drag and drop an image => Without patch you see an error message from TinyMCE 'Dropped file type is not supported' => With patch : It works ! Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Pushed to master for 22.11. Nice work everyone, thanks!
Backported to 22.05.x for upcoming 22.05.07 release
applied to 21.11 for 21.11.14
Missing dependencies for 21.05.x, it shouldn't be affected, no backport. Nothing to document it seems, marking resolved.