mdx-editor / editor

A rich text editor React component for markdown

Home Page:https://mdxeditor.dev

Repository from Github https://github.commdx-editor/editorRepository from Github https://github.commdx-editor/editor

Cannot assign to read only property 'key' of object '#

nsqnsq opened this issue · comments

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • I have read the documentation and cannot find an answer.

Describe the bug
When using your example, an error message appears when selecting two lines of text consecutively:Cannot assign to read only property 'key' of object '#
Reproduction
https://github.com/mdx-editor/editor/blob/main/src/examples/html.tsx

To Reproduce
Steps to reproduce the behavior:

  1. Select two lines of text (ar A paragra)
  2. Click the button Make selection orange
    image

Expected behavior
This is almost certain to happen. I hope it works normally. Thank you.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows Must appear
  • Browser Chrome

Additional context
"@mdxeditor/editor": "^3.20.0"
"react": "^19.0.0",
"react-dom": "^19.0.0"

Hello author, I have some ideas about this bug: I think it should be that when two elements are selected and part of the text in them is partly selected, the error will be reported like this.

image

The example you refer to be used as a starting point for your implementation and not a built-in feature. Feel free to adjust it to your needs.

Hello, I still don't quite understand how to change this color. Can you tell me how to do it? Thank you