Open chea1tei opened 1 year ago
I'm using the EmailShareButton component body but i can't seem to bold the text.. its outputting [object Object] instead..
const body = <strong>Heading</strong> + '\n' + job?.description.replace(/<[^>]*>?/gm, '').replace(' ', ' ').slice(0, 100) + '... \n\n';
<strong>Heading</strong>
EmailShareButton url={${siteUrl}/${urlPrefix}/${post?.url_slug}} subject={'Our website | ' + post?.title} body={body} >
${siteUrl}/${urlPrefix}/${post?.url_slug}
Did you find any solution?
No, since the EmailShareButton just generates a mailto link with the body as a parameter. HTML tags are not supported.
EmailShareButton
mailto
https://github.com/Bunlong/next-share/blob/e7b23a1ff49b273db64f0d017b37c5ad07e2ce7c/src/components/buttons/EmailShareButton.ts#L10-L16
https://stackoverflow.com/a/21010507/7922166
I'm using the EmailShareButton component body but i can't seem to bold the text.. its outputting [object Object] instead..
const body =
<strong>Heading</strong>
+ '\n' + job?.description.replace(/<[^>]*>?/gm, '').replace(' ', ' ').slice(0, 100) + '... \n\n';EmailShareButton url={
${siteUrl}/${urlPrefix}/${post?.url_slug}
} subject={'Our website | ' + post?.title} body={body} >