-
Notifications
You must be signed in to change notification settings - Fork 52
feat: register images from paste + HTML insertion, fixes #790 #834
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
Conversation
…to register-images
packages/super-editor/src/extensions/image/imageHelpers/imageRegistrationPlugin.js
Show resolved
Hide resolved
packages/super-editor/src/extensions/image/imageHelpers/imageRegistrationPlugin.js
Show resolved
Hide resolved
artem-harbour
left a comment
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.
Added a couple of comments for consideration.
Note: also need to pay extra attention to adding new appendTransaction so that it doesn't lead to infinite loops and affect performance.
artem-harbour
left a comment
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.
LGTM
cc @harbournick
I believe I answered all of those.
True, that is always important to consider. But as long as one has it limited to only acting in very specific cases and filtering out all other cases and not performing any dom lookups/operations before determining that another If one would want to limit the number of appendTransactions in the future, one could turn this into a single function that is executed to find all relevant content that enters through |
|
I moved everything to an internal PR and merged from there FYI: #1010 |
This takes care of images inserted by means of insertContent, pasting or potentially other means. Note: Images with a
src-attribute linking to an image on another website will run into CORS issues. This is handled gracefully, but it means that these images will not actually end up in the document. Base64 encoded images should work fine.