Below are the comprehensively outlined steps you can follow to seamlessly integrate Editor JS into your project. This is official EditorJS site.
1
Installation
Install EditorJS using npm:
npm install @editorjs/editorjs --save
2
Include EditorJS JavaScript
Add the following <script> tag near the end of your </body> section to include EditorJS:
<scriptsrc="../path/to/editor.js"></script>
Note: A CDN link will not work here because customization of the default Vendor CSS is required to fit FlyonUI's design.
3
Update Tailwind Configuration
Add the path to the EditorJS JavaScript files in the content section of your Tailwind configuration file. Also, set vendors: true in the FlyonUI config to ensure that vendor-specific CSS is generated:
This is a basic example of a text editor using EditorJS. With EditorJS, we can create a Notion-like text editor. The text editor below includes basic tools such as heading, nested list, table, inline code, and more. For additional tools, you can refer to the EditorJS repository and check out the Awesome Editor.js list for more tools.
For images, we use the Simple Image plugin, which allows you to drag and drop images or paste the image URL directly, but no UI option will be visible in the toolbar.