Add a plugin key to avoid different instances of a keyed plugin error #8

Closed
SalahAdDin wants to merge 1 commit from patch-1 into master
SalahAdDin commented 2022-12-22 01:15:40 +01:00 (Migrated from github.com)

It is the only plugin giving this error.

Read this conversation about the bug.

It is the only plugin giving this error. Read [this conversation](https://discuss.prosemirror.net/t/rangeerror-adding-different-instances-of-a-keyed-plugin-plugin/4242/9) about the bug.
marijnh commented 2022-12-22 11:26:17 +01:00 (Migrated from github.com)

This makes no sense. Firstly, there's no reason at all to add multiple gap cursor plugins to a single editor (they'll just end up creating multiple cursor elements, which is wasteful). Secondly, you shouldn't get this error in this case unless you are somehow managing to load multiple copies of prosemirror-state, since that generates unique keys for each key-less plugin. So this is not the solution to your problem, and you might want to look into your bundling/loading process, which might be loading lots of duplicate code.

This makes no sense. Firstly, there's no reason at all to add multiple gap cursor plugins to a single editor (they'll just end up creating multiple cursor elements, which is wasteful). Secondly, you shouldn't get this error in this case unless you are somehow managing to load multiple copies of prosemirror-state, since that generates unique keys for each key-less plugin. So this is not the solution to your problem, and you might want to look into your bundling/loading process, which might be loading lots of duplicate code.
SalahAdDin commented 2022-12-22 11:48:40 +01:00 (Migrated from github.com)

As far as I understood, there is no second this or any copy of gapCursor and it is a conflict with prosemirror-keymap.

Did you even check the forum?

As far as I understood, there is no second this or any copy of `gapCursor` and it is a conflict with `prosemirror-keymap`. Did you even check the forum?

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-gapcursor!8
No description provided.