Bunlong / next-share

Social media share buttons and share counts for your next React apps.
https://next-share.js.org
MIT License
242 stars 34 forks source link

Is it possible to bold text on EmailShareButton body component ? #74

Open chea1tei opened 1 year ago

chea1tei commented 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';

EmailShareButton url={${siteUrl}/${urlPrefix}/${post?.url_slug}} subject={'Our website | ' + post?.title} body={body} >

Screenshot 2023-02-27 at 10 01 15 AM

domanskyi commented 1 year ago

Did you find any solution?

joemcbroom commented 1 year ago

No, since the EmailShareButton just generates a mailto link with the body as a parameter. HTML tags are not supported.

https://github.com/Bunlong/next-share/blob/e7b23a1ff49b273db64f0d017b37c5ad07e2ce7c/src/components/buttons/EmailShareButton.ts#L10-L16

https://stackoverflow.com/a/21010507/7922166