bencarr / statamic-hyperlink

Hyperlink is a Statamic addon that expands the default Link fieldtype and allows you to store link text and target options alongside the link destination.
https://statamic.com/addons/bencarr/hyperlink
3 stars 1 forks source link

[Feature Request] Allow link text to be inferred but overwritten #15

Closed aaronbushnell closed 4 months ago

aaronbushnell commented 5 months ago

I realize this might be a tall order and I'd be willing to help with a pull request for this one!

I'd love if the "Link Text" field was optional and. by default, this text was automatically supplied by the link itself. Here's a couple examples:

Screenshot 2024-04-11 at 4 47 11 PM

This would save content authors a bit of time where the link and the link text should be the same, but also allow it to be overwritten when necessary.

This would be backwards-compatible with the current setup because the text in the "Link Text" field is used, no matter what the selected link is.

aaronbushnell commented 4 months ago

Took a stab at this one and stubbed out some tests for it!

bencarr commented 4 months ago

v3.0.0 is out now with Statamic 5 support and optional link text!

aaronbushnell commented 4 months ago

giphy