{"id":19650954,"url":"https://github.com/codeskills-dev/md-to-react-email","last_synced_at":"2025-04-04T12:08:27.774Z","repository":{"id":172313319,"uuid":"648984430","full_name":"codeskills-dev/md-to-react-email","owner":"codeskills-dev","description":"Lightweight utility for converting Markdown into valid React Email templates","archived":false,"fork":false,"pushed_at":"2024-12-06T14:56:17.000Z","size":314,"stargazers_count":36,"open_issues_count":1,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T11:09:59.631Z","etag":null,"topics":["email","emailjs","markdown","react","react-email"],"latest_commit_sha":null,"homepage":"https://md2re.codeskills.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeskills-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-03T12:12:49.000Z","updated_at":"2024-12-20T08:32:48.000Z","dependencies_parsed_at":"2025-01-04T21:11:34.378Z","dependency_job_id":"74b5ed4a-c567-4d25-9606-5f0adfb44f44","html_url":"https://github.com/codeskills-dev/md-to-react-email","commit_stats":null,"previous_names":["codeskills-dev/md-to-react-mail","codeskills-dev/md-to-react-email"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeskills-dev%2Fmd-to-react-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeskills-dev%2Fmd-to-react-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeskills-dev%2Fmd-to-react-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeskills-dev%2Fmd-to-react-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeskills-dev","download_url":"https://codeload.github.com/codeskills-dev/md-to-react-email/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174421,"owners_count":20896078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","emailjs","markdown","react","react-email"],"created_at":"2024-11-11T15:04:27.819Z","updated_at":"2025-04-04T12:08:27.754Z","avatar_url":"https://github.com/codeskills-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# md-to-react-email\r\n\r\nRead the documentation [here](https://md2re.codeskills.dev/)\r\n\r\n## Description\r\n\r\nmd-to-react-email is a lightweight utility for converting [Markdown](https://www.markdownguide.org/) into valid JSX that can be used in [React-email](https://react.email) or [JSX-email](https://jsx.email) templates. This tool simplifies the process of creating responsive and customizable email templates by leveraging the power of React and Markdown.\r\n\r\n**Note**: Starting from `version 4`, `md-to-react-email` uses [`Marked`](https://marked.js.org/) for markdown transformation. see all changes [here](/CHANGELOG.md)\r\n\r\n### Support\r\n\r\nThe following markdown flavors are supported\r\n\r\n- Offical markdown flavour\r\n\r\n## Installation\r\n\r\nInstall from your command line.\r\n\r\n#### With yarn\r\n\r\n```sh\r\nyarn add md-to-react-email\r\n```\r\n\r\n#### With npm\r\n\r\n```sh\r\nnpm install md-to-react-email\r\n```\r\n\r\n## Features\r\n\r\n### Functions:\r\n\r\n- `camelToKebabCase`: converts strings from camelcase ['thisIsCamelCase'] to kebab case ['this-is-kebab-case']\r\n- `parseCssInJsToInlineCss`: converts css styles from css-in-js to inline css e.g fontSize: \"18px\" =\u003e font-size: 18px;\r\n- `parseMarkdownToJSX`: parses markdown to valid JSX for the client (i.e the browser)\r\n\r\n### Components:\r\n\r\n- `EmailMarkdown`: a react component that takes in markdown input and parses it directly in your code base\r\n\r\n## Usage:\r\n\r\n- Directly as [`React-email`](https://react.email) or [`JSX-email`](https://jsx.email) component\r\n\r\n        ```\r\n        import {EmailMarkdown} from \"md-to-react-email\"\r\n\r\n        export default function EmailTemplate() {\r\n        return (\r\n                \u003cEmail\u003e\r\n                        \u003cHead /\u003e\r\n                        \u003cSection\u003e\r\n                        \u003cEmailMarkdown markdown={`# Hello, World!`} /\u003e\r\n                        \u003c/Section\u003e\r\n                \u003c/Email\u003e\r\n        )\r\n        }\r\n        ```\r\n\r\n- Directly into react-email template\r\n\r\n        ```\r\n        import {parseMarkdownToJSX} from \"md-to-react-email\"\r\n\r\n        const markdown = `# Hello World`\r\n        const parsedReactMail = parseMarkdownToJSX({markdown})\r\n\r\n        console.log(parsedReactMail) // `\u003ch1 style=\"...valid inline CSS...\"\u003eHello, World!\u003c/h1\u003e`\r\n        ```\r\n\r\n## Components\r\n\r\nmd-to-react-email contains pre-defined react and html components for the email template structure and styling. You can modify these components to customize the look and feel of your email template.\r\n\r\nThe following components are available for customization:\r\n\r\n- Headers (h1 - h6)\r\n- BlockQuotes\r\n- Text: paragraphs, bold and italic text\r\n- Links\r\n- Code: Code blocks and inline code\r\n- Lists: ul, ol, li\r\n- Image\r\n- Line-breaks (br)\r\n- Horizontal-rule (hr)\r\n- Table: table, thead, tbody, th, td, tr\r\n- Strikethrough\r\n\r\n## Supported Email Clients\r\n\r\nThe provided React components and default styling are designed to work well across various email clients and providers. However, due to the inconsistent support for modern web standards in different email clients, it's recommended to test your email templates in multiple clients to ensure compatibility.\r\n\r\nThe following email clients are known to be supported:\r\n\r\n- Gmail\r\n- Apple Mail\r\n- Outlook (desktop and web)\r\n- Yahoo Mail\r\n- HEY Mail\r\n- Super Human\r\n\r\n| \u003cimg src=\"https://react.email/static/icons/gmail.svg\" width=\"48px\" height=\"48px\" alt=\"Gmail logo\"\u003e | \u003cimg src=\"https://react.email/static/icons/apple-mail.svg\" width=\"48px\" height=\"48px\" alt=\"Apple Mail\"\u003e | \u003cimg src=\"https://react.email/static/icons/outlook.svg\" width=\"48px\" height=\"48px\" alt=\"Outlook logo\"\u003e | \u003cimg src=\"https://react.email/static/icons/yahoo-mail.svg\" width=\"48px\" height=\"48px\" alt=\"Yahoo! Mail logo\"\u003e | \u003cimg src=\"https://react.email/static/icons/hey.svg\" width=\"48px\" height=\"48px\" alt=\"HEY logo\"\u003e | \u003cimg src=\"https://react.email/static/icons/superhuman.svg\" width=\"48px\" height=\"48px\" alt=\"Superhuman logo\"\u003e |\r\n| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |\r\n| Gmail ✔                                                                                            | Apple Mail ✔                                                                                            | Outlook ✔                                                                                              | Yahoo! Mail ✔                                                                                                 | HEY ✔                                                                                          | Superhuman ✔                                                                                                 |\r\n\r\n## Contributing\r\n\r\nContributions to md-to-react-email are welcome! If you find a bug, have suggestions for improvements, or want to add new features, feel free to open an issue or submit a pull request. Please make sure to follow the existing coding style and conventions.\r\n\r\nWhen submitting a pull request, provide a clear description of the changes made and ensure that all tests pass. Adding appropriate tests for new features or bug fixes is highly appreciated.\r\n\r\n## Bugs and Feature Requests\r\n\r\nFor bugs and feature requests, [please create an issue](https://github.com/codeskills-dev/md-to-react-mail/issues/new/choose).\r\n\r\n## Author\r\n\r\n- Paul Ehikhuemen ([@pauloe_me](https://twitter.com/pauloe_me))\r\n\r\n## License\r\n\r\n`md-to-react-email` is licensed under the MIT License.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeskills-dev%2Fmd-to-react-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeskills-dev%2Fmd-to-react-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeskills-dev%2Fmd-to-react-email/lists"}