diff --git a/apps/dashboard/.vscode/settings.json b/apps/dashboard/.vscode/settings.json index d60cb6f6757..2bfcaca9495 100644 --- a/apps/dashboard/.vscode/settings.json +++ b/apps/dashboard/.vscode/settings.json @@ -3,5 +3,8 @@ "tailwindCSS.experimental.classRegex": [ ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], ["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"] - ] + ], + "editor.codeActionsOnSave": { + "source.organizeImports": "always" + } } diff --git a/apps/dashboard/src/components/workflow-editor/steps/email/maily.tsx b/apps/dashboard/src/components/workflow-editor/steps/email/maily.tsx index e4bbf5b81bc..bf320de8f08 100644 --- a/apps/dashboard/src/components/workflow-editor/steps/email/maily.tsx +++ b/apps/dashboard/src/components/workflow-editor/steps/email/maily.tsx @@ -3,6 +3,23 @@ import { useWorkflow } from '@/components/workflow-editor/workflow-provider'; import { parseStepVariablesToLiquidVariables } from '@/utils/parseStepVariablesToLiquidVariables'; import { cn } from '@/utils/ui'; import { Editor } from '@maily-to/core'; +import { + blockquote, + bulletList, + button, + columns, + divider, + forLoop, + hardBreak, + heading1, + heading2, + heading3, + image, + orderedList, + section, + spacer, + text, +} from '@maily-to/core/blocks'; import type { Editor as TiptapEditor } from '@tiptap/core'; import { HTMLAttributes, useMemo, useState } from 'react'; import { useFormContext } from 'react-hook-form'; @@ -29,9 +46,26 @@ export const Maily = (props: MailyProps) => { div]:h-full [&_.tiptap]:h-full', }} + blocks={[ + text, + heading1, + heading2, + heading3, + bulletList, + orderedList, + image, + section, + columns, + forLoop, + divider, + spacer, + button, + hardBreak, + blockquote, + ]} triggerSuggestionCharacter="{{" variables={variables.map((v) => ({ name: v.label, required: false }))} contentJson={field.value ? JSON.parse(field.value) : undefined}