-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Turn A Row, Column or Block Into A Hyperlink #29136
Copy link
Copy link
Closed
Labels
[Block] ColumnsAffects the Columns BlockAffects the Columns Block[Block] GroupAffects the Group Block (and row, stack and grid variants)Affects the Group Block (and row, stack and grid variants)[Status] DuplicateUsed to indicate that a current issue matches an existing one and can be closedUsed to indicate that a current issue matches an existing one and can be closed[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Metadata
Metadata
Assignees
Labels
[Block] ColumnsAffects the Columns BlockAffects the Columns Block[Block] GroupAffects the Group Block (and row, stack and grid variants)Affects the Group Block (and row, stack and grid variants)[Status] DuplicateUsed to indicate that a current issue matches an existing one and can be closedUsed to indicate that a current issue matches an existing one and can be closed[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Fields
Give feedbackNo fields configured for issues without a type.
What problem does this address?
I want to make a whole column (or any Gutenberg element) to be a clickable hyperlink. I first encountered this challenge when I created a set of cards using Gutenberg columns. I wanted the cards to be clickable, but settled for adding a hyperlink to the heading and image of each card separately.
What is your proposed solution?
A function that dynamically wraps any Gutenberg element with anchor tags. Maybe the same as is currently on image, heading and paragraph tags.
A potential issue may be when a user tries to use this feature to wrap other hyperlinks. For example, if there is a paragraph with a link and the user tries to wrap it with a column that has a link. I could be solved by checking if wrapped items have anchor tags before allowing them to be wrapped in another link anchor tag.