Skip to content

Commit

Permalink
fix(dashboard): Remove redundant maily blocks (#7295)
Browse files Browse the repository at this point in the history
  • Loading branch information
desiprisg authored Dec 13, 2024
1 parent e31f8a8 commit c25de5c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
5 changes: 4 additions & 1 deletion apps/dashboard/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
]
],
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -29,9 +46,26 @@ export const Maily = (props: MailyProps) => {
<Editor
config={{
hasMenuBar: false,
wrapClassName: 'h-full ',
wrapClassName: 'h-full w-full',
bodyClassName: '!bg-transparent h-full !border-none !mt-0 [&>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}
Expand Down

0 comments on commit c25de5c

Please sign in to comment.