unlayer / react-email-editor

Drag-n-Drop Email Editor Component for React.js
https://unlayer.com/embed
MIT License
4.53k stars 730 forks source link

Font cannot be added #341

Open Carry3 opened 1 year ago

Carry3 commented 1 year ago

export interface UnlayerOptions { id?: string | undefined; displayMode?: DisplayMode | undefined; projectId?: number | undefined; locale?: string | undefined; appearance?: AppearanceConfig | undefined; user?: User | undefined; mergeTags?: MergeTag[] | undefined; specialLinks?: SpecialLink[] | undefined; designTags?: StringList | undefined; designTagsConfig?: DesignTagConfig | undefined; tools?: ToolsConfig | undefined; blocks?: object[] | undefined; editor?: EditorConfig | undefined; safeHtml?: boolean | undefined; customJS?: string[] | undefined; customCSS?: string[] | undefined; features?: Features | undefined; translations?: Translations | undefined; displayConditions?: DisplayCondition[] | undefined; } UnlayerOptions didn't have fonts. and it wrong when I add fonts in options.I use typescript image

PetraPluto commented 1 year ago

Same issue, font customization functionality works but type needs to be added.

brunolemos commented 1 year ago

@PetraPluto @Carry3 please try the packagebrunolemos-react-email-editor and let me know if it works well for you.

bronglil commented 1 year ago

export interface Font { family: string; name: string; url?: string; previews?: string[]; }

export interface UnlayerOptions { id?: string; displayMode?: DisplayMode; projectId?: number; locale?: string; appearance?: AppearanceConfig; user?: User; mergeTags?: MergeTag[]; specialLinks?: SpecialLink[]; designTags?: StringList; designTagsConfig?: DesignTagConfig; tools?: ToolsConfig; blocks?: object[]; editor?: EditorConfig; safeHtml?: boolean; customJS?: string[]; customCSS?: string[]; features?: Features; translations?: Translations; displayConditions?: DisplayCondition[]; fonts?: Font[]; // Add the 'fonts' property here }