-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Make pasting an image in CodeEditor work #818
Conversation
This feature works even if the image is jpg or something that are not png. I used |
|
||
reader.readAsDataURL(blob) | ||
reader.onloadend = () => { | ||
base64data = reader.result.replace(/^data:image\/png;base64,/, '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure the reason why the image is copied as png even if it's jpg. So this line works fine even if it's jpg.
EDITED: I guess it's because of the program I used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm, got the same problem. |
I think it's important to check if the images are in use and remove those that are no longer necessary. By the way great feature. 👍 |
context
I made pasting an image work.
before
Nothing happens when I paste an image.
after
I can paste an image from clipboard.
For tests