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

additional text remains inside insert return #85

Open
charlieford opened this issue Jan 11, 2021 · 1 comment
Open

additional text remains inside insert return #85

charlieford opened this issue Jan 11, 2021 · 1 comment

Comments

@charlieford
Copy link

Hey,

This is such a great plugin to have, I've just implemented it but am having a small issue;

I use this to format my text:

insert: function(item) {
	return '<span class="mention" id="' + item.sequence + '">@' + item.name + '</span>';
},

The issue is, that when I continue typing after selecting from the dropdown, the rest of my text continues inside the span tag.

@divijc
Copy link

divijc commented Oct 6, 2022

pushing &nbsp; after the closing of the span does the trick
insert: function(item) { return '<span class="mention" id="' + item.sequence + '">@' + item.name + '</span>&nbsp;'; },

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

2 participants