niuware / mui-rte

Material-UI Rich Text Editor and Viewer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mui-rte 2.0.1 not compatible with versions after @mui/material 5.0.0 and onwards?

Karelus opened this issue · comments

Checklist

Description

I'm using @mui/material 5.1.0, and installed newest version of mui-rte (2.0.1)
Getting this error when trying to render the editor TypeError: theme.spacing is not a function. I am wrapping the editor to theme provider, but still no luck. But after changing @mui/material back to 5.0.0 it works. Is this a bug in newer versions of the package or what?

Ok it seems that I was importing ThemeProvider incorrectly. For me at least, it worked when I switched the import from
import { ThemeProvider } from '@mui/material/styles'
to
import { ThemeProvider } from '@mui/styles'

Docs. suggested to import it from @mui/material/styles which didn't work for me. Just curious if others have had the same problem.