#I want to use Editor.js with Electron.

4 messages · Page 1 of 1 (latest)

knotty ruin
#

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

harsh prism
#

add <script src="./node_modules/@editorjs/editorjs/dist/editor.js"></script>

knotty ruin
#

Thank you!!!!!!!! I was able to resolve it with the following code.

<script src="./node_modules/@editorjs/editorjs/dist/editorjs.umd.js"></script>