-
Notifications
You must be signed in to change notification settings - Fork 0
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
add example implementation of salutation placeholders in demo #247
base: next
Are you sure you want to change the base?
Conversation
a3e586a
to
af9c72f
Compare
const placeholders = [ | ||
{ | ||
placeholder: "{{SALUTATION}}", | ||
helper: <FormattedMessage id="newsletter.richText.placeholder.salutation" defaultMessage="Dear Mr./Ms.LASTNAME" />, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
helper: <FormattedMessage id="newsletter.richText.placeholder.salutation" defaultMessage="Dear Mr./Ms.LASTNAME" />, | |
helper: <FormattedMessage id="cometBrevoModule.richText.placeholder.salutation" defaultMessage="Dear Mr./Ms. LASTNAME" />, |
<RichTextBlock.AdminComponent {...rteAdminComponentProps} /> | ||
</Box> | ||
<FormLabel> | ||
<FormattedMessage id="newsletter.richText.placeholder.info" defaultMessage="Placeholders available in the text" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<FormattedMessage id="newsletter.richText.placeholder.info" defaultMessage="Placeholders available in the text" /> | |
<FormattedMessage id="cometBrevoModule.richText.placeholder.info" defaultMessage="Placeholders available in the text" /> |
export const getPreparedHtml = (html: string) => { | ||
return html | ||
.replace(new RegExp(HIDE_IN_OUTLOOK_START_IF, "g"), "<!--[if !mso]><!-- -->") | ||
.replace(new RegExp(HIDE_IN_OUTLOOK_END_IF, "g"), "<!--<![endif]-->"); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed for the placeholders? Won't they be replaced via brevo anyways or am I missing something?
Description
Add an example on how to implement the salutation placeholder in RichTextBlock in demo.
Screenshots/screencasts
Admin:
Newsletter - Female:
Newsletter - Male:
Newsletter - No salutation filter selected:
Changeset
[x] I have verified if my change requires a changeset
Related tasks and documents
(https://vivid-planet.atlassian.net/browse/COM-1032)