[Question] Add link to an image using traits? #5439
-
I have a block to add images to my canvas. I want the possibility of adding a link to this image, for instance, when the image component is selected, I want an input field in the traits panel called "href" and when it's not empty, my image component will be wrapped in a Is it possible? I know that it's possible to drag and drop a link block and then put an image inside this link block, but I don't want to do it this way because it's difficult for my users. I already read some questions similar to this, but the solution was to create a link block. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I'd suggest creating a custom component where the root is an |
Beta Was this translation helpful? Give feedback.
I think you can set the img url as part of the custom component traits and have the img src be set from there.