What I want to achieve I want to use the Editor.js rich text editor in the memo application I am creating with Electron. Since it is an offline desktop application, I want to avoid using CDN.
Assumptions I am developing a memo application to run offline with Electron. When requiring the rich text editor installed via npm (https://editorjs.io/), an error occurs. For security reasons, I want to keep the contextIsolation in main.js set to true.
The error code and the code for index.html and preload.js are attached as images.
What I have tried:
I have attempted to directly require Editor.js in the HTML, but that was unsuccessful. I am currently struggling to find a way to use require for Editor.js in the main.js file.
Additional Information:
The versions I am using are as follows: electron: 24.1.2 editorjs: 2.27.0