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

[ Fix : URL Copied from Image Drawer And Pasted To Quill Editor Shows Image In Preview Or View Mode ] #1165

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rohitPandey469
Copy link

Description

What was happening?
The Copy URL button from Image Drawer is used to paste a particular formatted string in the quill editor. But it won't inject the image i.e. just shows the URL from Copy Url button in preview or view mode.
What is happening?
When the Copy URL is pasted then the Editor uses custom matcher to handle the pasted URL i.e. as soon as you paste the image by doing ctrl + v, then it parse the URL and injects the corresponding image.
If we want to have a functionality like Git Hub where the image URL, will be shown like this ![alt=image; scale=1.0](URL) in editor mode and image in preview mode then to do this I'll be using a blob package so do tell me if that functioning would be more OK.
First copy changes from #1158, then from this file to see it's working

Related Issue

Fixes #1161

Motivation and Context

The Copy URL wasn't working, so made it work!!! And.....

How Has This Been Tested?

Tested locally on my machine.

Video:

codelabz-google-chrome-2024-02-04-18-42-07_9P96PldB.mp4

The copied URL now directly injects the image from firebase to Quill Editor.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

NOTE:

If the image is not uploading then, there might be a CORS related issue - see in console. As the URL from firebase is directly used to upload the image to Editor and it must be happening everywhere in the app ( we can handle it by rolling a small server then fetching), but for now,
To handle it need to do some basic steps like setting up a firebase bucket in your Codelabz firebase project. Do look it up how to set it or, refer to issue #1053.

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

Successfully merging this pull request may close these issues.

[ Fix : Image URL Pasted in Quill Editor Not Rendering in Preview or View Mode ]
1 participant