Skip to content

Instantly share code, notes, and snippets.

@Dadangdut33
Dadangdut33 / EditorJS_Mantine_darkmode_support.md
Created April 3, 2024 04:58
Editor js with dark mode and mantine support

Here is how i managed to use and style editorjs for my use.

Some notes:

  • To obtain the content we pass setRef, so a higher component can get the content easily
  • You might not need to style the .dark style yourself if you are using mantine's TypographyStylesProvider because it should do the color just fine. (i styled it in my css because i forgot that it exists)
  • I use this component for both editing and rendering results, that's why there is editable and not-editable class
  • To improve ssr i render the results plainly in server side using editorjs-parser