{"version":"2.1.268","anchor":"text-component-supports-custom-link-href-mapping-linkhref-p","canonical_anchor":"text-component-supports-custom-link-href-mapping-linkhref-p","heading":"Text component supports custom link-href mapping (linkHref prop)","tier":"internal","area":"Elsewhere","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.268\/e\/text-component-supports-custom-link-href-mapping-linkhref-p","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.268","markdown":"### Text component supports custom link-href mapping (linkHref prop)\n\nText rendering can now customize or suppress the link target for auto-detected URLs via a linkHref function\n\n**What**\n\nThe component that automatically turns URLs found in text into clickable links now accepts an optional `linkHref` function. When provided, each detected URL is passed through this function to decide its actual link destination, and if the function returns nothing (undefined), that particular match is not turned into a link at all.\n\n**Why**\n\nThis lets code using the text renderer redirect, rewrite, or selectively disable auto-linking of URLs, rather than always linking to the exact raw URL text that was detected.\n\n- Area: Elsewhere\n- Names: `linkHref`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 1\/5"}