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

"Download" attribute for links in button, image or paragraph blocks #57871

Open
microteq opened this issue Jan 16, 2024 · 2 comments
Open

"Download" attribute for links in button, image or paragraph blocks #57871

microteq opened this issue Jan 16, 2024 · 2 comments
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) Needs Decision Needs a decision to be actionable or relevant [Type] Enhancement A suggestion for improvement.

Comments

@microteq
Copy link

What problem does this address?

What is your proposed solution?

@microteq microteq added the [Type] Enhancement A suggestion for improvement. label Jan 16, 2024
@skorasaurus
Copy link
Member

skorasaurus commented Jan 16, 2024

Thanks for reporting.

In my opinion, this should probably be implemented by a custom plugin. The download attribute is fraught: the exact behavior of an element with that tag will depend on the browser, the user's preferences on the browser, the OS, and even most importantly - ref https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a

#11471

@skorasaurus skorasaurus added the Needs Decision Needs a decision to be actionable or relevant label Jan 16, 2024
@jordesign jordesign added the [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) label Jan 16, 2024
@Mayank-Tripathi32
Copy link
Contributor

Mayank-Tripathi32 commented Jan 6, 2025

While #11471 suggests using the "core/file" block instead, the file component is essentially a hardcoded anchor block with minimal customization options. I believe a more flexible approach, incorporating InnerBlocks (e.g., core/button), would be ideal for creating a customized appearance.

The main issue is the inability to dynamically set the download attribute via the link. I think we should have a way to manage this attribute, either by adding an option in the interface or by including the attribute directly in the blocks.json configuration and making it available in some capacity. This approach would enable the use of InnerBlocks for a download button without complicating the file block or requiring the attribute to be added through alternative means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) Needs Decision Needs a decision to be actionable or relevant [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants