jodit / jodit/jodit-react

TypeError: Node element must be in editor

Open
#134 5 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
406
Forks
131
Avg merge
2h 32m
Merged PRs (30d)
2

Description

Hi guys, I'm getting this TypeError when I delete images using the backspace / delete key.

Steps to replicate:

  • Insert an image
  • Click on the inserted image in the editor and press the Delete or Backspace button

I'm using React with Next.js

Would really appreciate any suggestions or help. Thanks

Unhandled Runtime Error
TypeError: Node element must be in editor

Call Stack
Object.t.error
.next\static\chunks\vendors-node_modules_jodit-react_build_jodit-react_js.js (10:52091)
e.select
/_next/static/chunks/vendors-node_modules_jodit-react_build_jodit-react_js.js (29:247562)
t.onDelete
.next\static\chunks\vendors-node_modules_jodit-react_build_jodit-react_js.js (10:507341)
HTMLDivElement.<anonymous>
/_next/static/chunks/vendors-node_modules_jodit-react_build_jodit-react_js.js (29:506456)
HTMLDivElement.v
.next\static\chunks\vendors-node_modules_jodit-react_build_jodit-react_js.js (10:47219)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the reported React and Next.js setup by inserting an image and deleting it with Backspace or Delete. Start with the reported stack entries for onDelete and e.select, then trace the corresponding source; done means deleting the image no longer raises “Node element must be in editor”.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, react, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.