Skip to content
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

V8: TinyMCE - Images upload, drag & drop, and resize #14500

Merged
merged 9 commits into from Jul 5, 2023

Conversation

iOvergaard
Copy link
Contributor

@iOvergaard iOvergaard commented Jul 4, 2023

Description

This updates v8 with the latest bug fixes from v10 that we were able to cherry-pick regarding the TinyMCE editor and related media handlers.

What was fixed

  • Drag & Drop images will now correctly call the imageProcessHandler and get a temporary file location for the image to append to a data attribute. If this process fails, TinyMCE will revert to storing the image as base64 which can get rather large, so this fix is very important.
  • Resizing images will now call a new endpoint to get an updated crop URL to use in the editor ensuring, that we not only set width & height on the img element but also reflect that in the URL.
  • Sometimes the rich text editor could not be activated on a grid editor if the id started with a number, which is not supported in HTML out-of-the-box, but by wrapping the selector in clams it works again.

@bergmania
Copy link
Member

Can we do something in the client to check if there already is an embedded image and do the same as when it is dropped?

@iOvergaard
Copy link
Contributor Author

V8 will now handle blobs as well after @Zeegaan managed to backport the fix from V10.

We will look into base64 -> blob migrations in their own pull requests. We will have to do individual fixes for client-side migrations for V7, V8, and V11+.

@iOvergaard iOvergaard changed the title V8: TinyMCE - drag & drop images should upload to correct temporary path V8: TinyMCE - Images upload, drag & drop, and resize Jul 5, 2023
Copy link
Member

@Zeegaan Zeegaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@iOvergaard iOvergaard merged commit 3cbff23 into v8/dev Jul 5, 2023
5 of 7 checks passed
@iOvergaard iOvergaard deleted the v8/bugfix/tinymce-dragdrop-images branch July 5, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants