How to implement Editor.js in nextjs?
See original GitHub issueHow to implement Editor.js in nextjs?
I tried to implement Editor.js in Nextjs but I failed to do it.
Here is my code.
import dynamic from 'next/dynamic';
const EditorJs = dynamic(import('react-editor-js'), {
ssr: false,
loading: () => <p>Loading ...</p>,
});
const Editor = () => {
return (
<>
<EditorJs />
</>
);
};
export default Editor;
Error:
Server Error
ReferenceError: window is not defined
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Can someone help me to implement EditorJs in NextJs?
Code: https://stackblitz.com/edit/nextjs-mckpbw?devtoolsheight=33&file=pages/editor.js
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:6
Top Results From Across the Web
Developing a modern Blogging Application with Next.js and ...
Now let's go to the create page and use our Editor component. We just need to import the custom Editor component and pass...
Read more >EditorJS in NextJS not able to load plugins - Stack Overflow
You have to create a seperate component and then import all your tools there: import EditorJs from "react-editor-js"; import Embed from ...
Read more >Editing the Page - Create a Next.js App
Editing the Page · Make sure the Next.js development server is still running. · Open pages/index.js with your text editor. · Find the...
Read more >Editor JS Rich Text Editor in Next JS Project | - YouTube
Editor JS is a Next generation block styled editor. With Its given documentation, it is easy to add this editor on simple JS...
Read more >Build and Deploy a Markdown Editor Using Next.js, TypeScript ...
Build Markdown Editor Using CodeMirror 6 · Install Dependencies · Create React Hook to Provide Editor View Component · Consume the React Hook...
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 FreeTop 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
Top GitHub Comments
In my search I found this recent medium article on this. https://medium.com/@sfazleyrabbi/next-js-editor-js-complete-setup-guide-7136c8bb694e
Following a bit of that example, I’ve created a repository with a fully working editor.js in Next.js. I’m still working on it. But the basic functionality is already there. github.com/Eloi-Perez/my-next-editorjs Anyone interested feel free to copy or fork the repository.