Link component to render href
only if href == text
#2077
Closed
StephaneTurquay
started this conversation in
Ideas
Replies: 1 comment
-
@njakob actually found a solution using htmlToTextOptions as mentioned in the doc:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
The goal of this feature request is to enhance the plain text output of emails. Specifically, when the
href
value of a component is identical to its visibletext
, only thehref
should be rendered in the plain text version. Currently, both thehref
and thetext
are included, which results in redundancy.Background
This feature request originates from the need to include a plain text version of a reset password link within an email template. This is a common fallback practice to ensure users can still access the link in case the primary button is not rendered or clickable in certain email clients.
For example, the following JSX:
Currently renders in plain text as:
This creates unnecessary duplication. In such cases, when the
href
and the linktext
are identical, the plain text output should include only the URL once.Proposal
I propose that when the href and text of a component are identical, the plain text output should render the URL only once to avoid redundancy.
Beta Was this translation helpful? Give feedback.
All reactions