thanhtunguet / grapesjs-react

A React wrapper for GrapesJS library
https://thanhtunguet.github.io/grapesjs-react
194 stars 58 forks source link

Window is not defined (grapesjs-react + Next JS) #51

Closed YosaRama closed 3 years ago

YosaRama commented 3 years ago
Screen Shot 2021-07-05 at 15 17 48

I got this problem, how to solve that ?,

Screen Shot 2021-07-05 at 15 18 31

this is my code, please help me for fix this

Thanks !

thanhtunguet commented 3 years ago
Screen Shot 2021-07-05 at 15 17 48

I got this problem, how to solve that ?,

Screen Shot 2021-07-05 at 15 18 31

this is my code, please help me for fix this

Thanks !

This library includes CSS and browser APIs so that you can not use it in server side. Only use it in client side.

YosaRama commented 3 years ago

Oh okay Thanks for the respond, and for this V.4 how can I add blocks, components, commands or all about grapes.js stuff ?, because I can't find any details for this one on README file.

Thanks !

thanhtunguet commented 3 years ago

Oh okay Thanks for the respond, and for this V.4 how can I add blocks, components, commands or all about grapes.js stuff ?, because I can't find any details for this one on README file.

Thanks !

Pass grapesjs options (storage manager, block manager, ...) as props to the editor component. Except id, onInit, onDestroy, all the rest props will be passed as options on editor initialization. You may read the offficial grapesjs documentation for option's details.

YosaRama commented 3 years ago

Oke, Thank You so much for respond.