import type { CustomFont } from '../../types'; const getFontName = (font: string) => { return font.toLowerCase().replace(/\s/g, '-'); }; export const editor_css = ( editorId: string, containerId: string, autoSize: boolean, color = 'rgb(32, 35, 42)', background = 'white', placeholder = 'rgba(0,0,0,0.6)', fonts: Array = [], defaultFont: string | undefined = undefined ) => { let fontCss = ''; fonts.forEach((f) => { fontCss = fontCss + ' ' + f.css; }); fonts.forEach((f) => { fontCss = fontCss + ` /* Set content font-families */ .ql-font-${getFontName(f.name)} { font-family: "${f.name}"; } `; }); return ` `; };