f6d7568d0a
* fix description in email * add styling for lists * sanitize editor input before saving * sanitize eventTypeDescription * santize html when used dangerouslySetInnerHTML * fix server side sanitation * add missing formatting and sanitation * move @ts-expect-error to correct line * fix type error and add yarn.lock * fix build error * sanitize description for booking page and availability page * rename to markdownAndSanitize * always add list formatting * handle empty description in markdownAndSanitize for cleaner code * create function for clientside markdown rendering and sanitizing * fix type error * code clean up * Now that eventType.descriptionAsSafeHTML is added at all the missing places, we can do away with ts-ignore and get type safety * Remove unused variable * Remove one more ts-expect-error --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> |
||
---|---|---|
.. | ||
src | ||
templates | ||
README.md | ||
email-manager.ts | ||
index.ts | ||
package.json | ||
tailwind.config.js | ||
tsconfig.json |
README.md
JSX email templates
components
Holds reusable patternstemplates
A template equals a type of email sent
Usage
import { renderEmail } from "@calcom/emails";
renderEmail("TeamInviteEmail", */{
language: t,
from: "teampro@example.com",
to: "pro@example.com",
teamName: "Team Pro",
joinLink: "https://cal.com",
});
The first argument is the template name as defined inside templates/index.ts
. The second argument are the template props.
Development
You can use an API endpoint to preview the email HTML, there's already one on /apps/web/pages/api/email.ts
feel free to change the template to the one you're currently working on.