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

[Bug]: warning when using multiple mention extensions #5549

Closed
1 task done
sezaru opened this issue Aug 24, 2024 · 1 comment
Closed
1 task done

[Bug]: warning when using multiple mention extensions #5549

sezaru opened this issue Aug 24, 2024 · 1 comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@sezaru
Copy link

sezaru commented Aug 24, 2024

Affected Packages

extension-mention

Version(s)

2.6.6

Bug Description

I want to have multiple instances using the mention plugin for different purposes in the same editor.

To achieve that, I just need to set the pluginKey: new PluginKey('user'), option in the suggestion attribute.

As far as I can see, it does works fine, but the console will give me the following warning:

[tiptap warn]: Duplicate extension names found: ['mention']. This can lead to issues.

This is because the mention extension has its name set to 'mention' without any wait to customize it.

Suggestion of a fix

Allow the user to override the mention extension name by setting their own custom name.

Browser Used

Firefox

Code Example URL

No response

Expected Behavior

The warning is correct, so the behavior is expected, but that means that currently there is no good/supported way to have more than one mention extension in the same editor. Allowing the use to customize that extension name should fix the warning and keep everything working.

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.
@sezaru sezaru added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Aug 24, 2024
@nperez0111
Copy link
Contributor

.extend({ name: 'custom-mention-name' })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
Status: Done
Development

No branches or pull requests

2 participants