feat: passing the resolveImageSrc parameter#1186
Open
separatrixxx wants to merge 2 commits into
Open
Conversation
Reviewer's GuideAdds a configurable resolveImageSrc hook to the ImgSize extension so hosts can transform image src values at render time without changing stored node attributes or serialized markup, by threading extension options into the image node view plugin and React node view. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Collaborator
|
@separatrixxx Hi! We need to add a new story for the image plugin and create a WYSIWYG demo. Please also add a Diplodoc parameter so we can see the markup mode in the preview. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
resolveImageSrchook.The host application may store files outside the browser-accessible filesystem (for example, VSCode webview). The relative path
./img.pngis not resolved there; the image is not displayed. The callback allows the host to convertsrcto a displayable URL without changing the Markdown source.resolveImageSrconly affects the displayedsrcin<img>. Node attributes and serialization in markupuse the original path.
ImgSettingsButtonand the serializer readnode.attrs, so the original path is not distorted.Summary by Sourcery
Introduce configurable image src resolution for the ImgSize extension to support non-browser-accessible file locations.
New Features:
Enhancements: