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

Inserting an a mention with insertItem adds an "undefined" before the denotation char #343

Open
lucasfindox opened this issue Sep 30, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@lucasfindox
Copy link

lucasfindox commented Sep 30, 2023

Adding a mention manually via insertItem method adds an "undefined" before the '@' character

image

@csculley
Copy link
Collaborator

csculley commented Oct 2, 2023

Hi, the "Add Mention Programatically" button on https://quill-mention.com/ is an example of using insertItem manually that doesn't seem to be adding undefined. If you can't figure out what's causing it, could you make a reproduceable example of this in a public repository? Thank you!

@aaronjparsons
Copy link

Ran into this as well, but after looking at the source for the page linked by @csculley, there is a denotationChar field missing from the data in the docs example.

From the docs:
insertItem({id: '123', value: 'My Mention'}, true)

From the source:
insertItem({denotationChar: '@', id: '123', value:' My Mention'}, true)

After adding denotationChar to the data to insert, it works as expected

@csculley csculley added good first issue Good for newcomers bug Something isn't working labels Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants