Fix Email composer rich text to HTML conversion (#19872)

This commit is contained in:
neo773
2026-04-21 12:22:05 +05:30
committed by GitHub
parent a8d4039629
commit a1de37e424
9 changed files with 24 additions and 96 deletions
@@ -111,7 +111,7 @@ export const EmailComposerFields = ({
placeholder={t`Type something or press "/" to see commands`}
minHeight={120}
maxWidth={600}
contentType="json"
contentType="html"
/>
<EmailAttachmentsField
label={t`Attachments`}
@@ -23,7 +23,7 @@ import { marked } from 'marked';
import { type DependencyList, useMemo } from 'react';
import { isDefined } from 'twenty-shared/utils';
export type AdvancedTextEditorContentType = 'json' | 'markdown';
export type AdvancedTextEditorContentType = 'json' | 'html' | 'markdown';
type UseAdvancedTextEditorProps = {
placeholder: string | undefined;
@@ -120,7 +120,7 @@ export const FormAdvancedTextFieldInput = ({
defaultValue,
contentType,
onUpdate: (editor) => {
if (contentType === 'markdown') {
if (contentType === 'markdown' || contentType === 'html') {
onChange(editor.getHTML());
} else {
const jsonContent = editor.getJSON();