Fonts aren't displayed
See original GitHub issueI am trying to embed the EmailEditor via React, everything seems to work fine except the fonts section, the dropdown which is supposed to contain the list of fonts, shows nothing and even the font size selection is a bit off:

Is it a bug with the editor itself? or am I doing something wrong:
Code:
import {
Button,
Box,
Container,
Grid,
Hidden,
Typography,
AppBar,
} from "@material-ui/core";
import clsx from "clsx";
import React, { useRef } from "react";
import EmailEditor from "react-email-editor";
import { useSelector } from "react-redux";
import { useStyles } from "./emailBuilder.css";
import { selectOpen } from "../../redux/utils";
import { TemplatesNav } from "./TemplatesNav";
import Component from "react-email-editor";
export function EmailBuilder() {
const emailEditorRef = useRef<Component>(null);
const onLoad = () => {
// you can load your template here;
// const templateJson = {};
// emailEditorRef.current.editor.loadDesign(templateJson);
};
const classes = useStyles();
const drawerOpen = useSelector(selectOpen);
const [templatesNavOpen, setTemplatesNavOpen] =
React.useState<boolean>(false);
const openTemplatesNav =
() => (event: React.KeyboardEvent | React.MouseEvent) => {
console.log(templatesNavOpen);
setTemplatesNavOpen(true);
};
const exportHtml = async () => {
emailEditorRef.current!.exportHtml(
(data: { design: Object; html: String }) => {
const { design, html } = data;
console.log("exportHtml", html);
console.log("Design JSON", design);
}
);
};
return (
<Container maxWidth="xl">
<Hidden mdDown>
<AppBar
position="fixed"
className={clsx(classes.appBarStyle, {
[classes.shiftedAppBarStyle]: drawerOpen,
})}
elevation={0}
>
<Box display="flex" m={1} p={1}>
<Box p={1} flexGrow={1}>
<Button
onClick={openTemplatesNav()}
color="primary"
variant="contained"
>
Templates
</Button>
</Box>
<Box p={1}>
<Button color="primary" variant="contained">
Preview
</Button>
</Box>
<Box p={1}>
<Button color="primary" variant="contained" onClick={exportHtml}>
Save
</Button>
</Box>
</Box>
</AppBar>
<TemplatesNav
drawerOpen={templatesNavOpen}
setDrawerOpen={setTemplatesNavOpen}
/>
<Grid container className={classes.container}>
<EmailEditor ref={emailEditorRef} onLoad={onLoad} />
</Grid>
</Hidden>
<Hidden mdUp>
<Typography variant="h5">
Shoot !! We do not support designing on mobiles yet
</Typography>
</Hidden>
</Container>
);
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
"Installed" fonts not showing up in Windows Fonts folder
Click Start, point to Settings, and then click Control Panel. · Double-click Fonts. · On the File menu, click Fonts to place a...
Read more >Fix Installed fonts not showing up in font folder on Windows 10 ...
Fix 2 – Install Font from Control Panel · 1. Search control panel in windows 10 search. · 2. Click on the search...
Read more >How to fix installed fonts not showing on Windows 10
Installed fonts not showing on Windows 10 [FIX] · 1. Restart app · 2. Check other apps · 3. Reinstall font · 4....
Read more >Troubleshooting Installed Fonts That Won't Work - Lifewire
Easiest fix: Download and reinstall the correct version of the file, making sure the font is compatible with your operating system.
Read more >What to do when Windows won't allow some fonts to install.
Having said this, also be sure you are dragging actual font files with extensions like .ttf or .otf into the Windows fonts folder...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

same issuer on Ubuntu, fixed with
showDefaultFonts: false, not sure is it correct solution@amartya-dev here is the solution for fonts