The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
import {
createBlockquoteBlockContent,
createHeadingBlockContent,
createListBlockContent,
createParagraphBlockContent,
} from '@/advanced-text-editor/constants/AdvancedTextEditorBlockContent';
import { type AdvancedTextEditorBlockInsertionItem } from '@/advanced-text-editor/types/AdvancedTextEditorBlockCatalog';
import { msg } from '@lingui/core/macro';
import { TIPTAP_NODE_TYPES } from 'twenty-shared/utils';
import {
IconBlockquote,
IconH1,
IconH2,
IconH3,
IconList,
IconListNumbers,
IconTextSize,
} from 'twenty-ui/icon';
export const ADVANCED_TEXT_EDITOR_TEXT_INSERTION_ITEMS: Pick<
AdvancedTextEditorBlockInsertionItem,
'id' | 'title' | 'icon' | 'createContent'
>[] = [
{
id: 'paragraph',
title: msg`Text`,
icon: IconTextSize,
createContent: createParagraphBlockContent,
},
{
id: 'h1',
title: msg`Heading 1`,
icon: IconH1,
createContent: () => createHeadingBlockContent(1),
},
{
id: 'h2',
title: msg`Heading 2`,
icon: IconH2,
createContent: () => createHeadingBlockContent(2),
},
{
id: 'h3',
title: msg`Heading 3`,
icon: IconH3,
createContent: () => createHeadingBlockContent(3),
},
{
id: 'bulletList',
title: msg`Bullet List`,
icon: IconList,
createContent: () => createListBlockContent(TIPTAP_NODE_TYPES.BULLET_LIST),
},
{
id: 'orderedList',
title: msg`Ordered List`,
icon: IconListNumbers,
createContent: () => createListBlockContent(TIPTAP_NODE_TYPES.ORDERED_LIST),
},
{
id: 'blockquote',
title: msg`Quote`,
icon: IconBlockquote,
createContent: createBlockquoteBlockContent,
},
];