Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chea1tei opened this issue Feb 27, 2023 · 2 comments
Open

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

chea1tei opened this issue Feb 27, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@chea1tei
Copy link

chea1tei commented Feb 27, 2023

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
Copy link

Did you find any solution?

@joemcbroom
Copy link
Contributor

joemcbroom commented Jun 30, 2023

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

function emailLink(url: string, { subject, body, separator }: Options) {
return (
'mailto:' +
transformObjectToParams({
subject,
body: body ? body + separator + url : url,
})

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

@Bunlong Bunlong added documentation Improvements or additions to documentation question Further information is requested labels Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants