-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat: Add support for image scaling via markdown #2239
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
base: v4
Are you sure you want to change the base?
Conversation

built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
|
@saberzero1 for the wikilink parser I have this implemented already, but for current Quartz we can also merge this one. We should probably freeze development on v4 soon. |
Agreed. |
|
Also closes: #2160 |
V5 is in the works?? |
| if (numberMatch) { | ||
| const width = numberMatch[1] | ||
| node.properties.style = `width: ${width}px;` | ||
| node.properties.alt = "" // or should we keep the alt text the number? |
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 think we can keep it like this, having a number as alt is kinda confusing especially accessibility-wise.
Adds #625.
With this change, you can select the width of an image like
and. This is a feature from obsidian syntax.See below an image of the feature.
This is the markdown that was used to create this above example:
When a user does
instead of, thealttext of an image will be empty, cause it does not seem logical to keep the width as alt text.See the dev-tools of the above example: