NuxtN
Nuxt12mo ago
13 replies
grose5729

How to create a markdown mailto link using a bound value containing an email address

Have no problem binding an email value, such as doe@example.com, through use of the :data prop for presentation in a markdown document using {{ email }}.

The question is how to create a clickable mailto link using the email value. Have tried

[{{ email }}](mailto:{{ email }})

Result is just the literal text of the email value, i.e., not rendered into an a tag.

Have also tried

<a href="mailto:{{ email }}">{{ email }}</a> --> clickable link with the literal target of mailto:{{ email }}

<a href="mailto:"{{ email }}>{{ email }}</a> --> clickable link with the literal target of mailto:

So, any suggestion as to the correct way to achieve a clickable mailto link would be appreciated.
Was this page helpful?