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

Add support for blob URL images #4207

Open
didix16 opened this issue May 14, 2024 · 1 comment
Open

Add support for blob URL images #4207

didix16 opened this issue May 14, 2024 · 1 comment

Comments

@didix16
Copy link

didix16 commented May 14, 2024

Expected behavior:

Expects that the following code

// file is a file opened with image dialog selector
let blobUrl = URL.createObjectURL(file); // url will contain something like blob:http://HOST/BLOB-UUID
quill.insertEmbed(quill.getSelection(), 'image', blobUrl);

Inserts an image with the blob url specified.

Actual behavior:

Actually the editor is inserting an image with src = '//:0'

Platforms:
Any

Version:

2.0.2 and below

BTW, I've noticed that this code

https://github.com/quilljs/quill/blob/9f4e18540de93e8dec7cb7f53d8d0493714b7a09/packages/quill/src/formats/image.ts#L34-L36

is where the url is being sanitized. What about adding 'blob' to the current array to allow blob urls?

Thanks in advance

@didix16
Copy link
Author

didix16 commented May 14, 2024

I just added a PR #4208 that allows blob urls for inserted images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant