Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contenteditable false still allows blocks to be merged. #153

Open
npcole opened this issue Dec 24, 2024 · 1 comment
Open

contenteditable false still allows blocks to be merged. #153

npcole opened this issue Dec 24, 2024 · 1 comment

Comments

@npcole
Copy link

npcole commented Dec 24, 2024

If creating a custom blot inheriting from Block and setting:

Unexpected result

node.setAttribute('contenteditable', 'false');

Quill correctly prevents the user from editing the text in that block.

However, if the block is followed immediately by a block that can be edited, and the user puts the cursor before the first character of that block and presses delete, the editable block is merged with the contenteditable === false block.

This makes the contents of both original blocks impossible to edit.

Expected result

Blocks with contenteditable set to false should not be merged with other blocks as a result of user editing actions.

@npcole
Copy link
Author

npcole commented Dec 24, 2024

I've tried debugging this, but I can't find where the merge code is actually handled, so I am not at all sure how to correct the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant