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

Autocompleter UI component "ch" silently fails with more than a single character #4929

Open
martyf opened this issue Apr 9, 2019 · 6 comments

Comments

@martyf
Copy link

martyf commented Apr 9, 2019

When using the Autocompleter in a plugin, the docs require a trigger character ("ch") - and one would assume this to be a single character.

If you utilise the Autocompleter and provide a "ch" of more than 1 character, the Autocompleter fails to trigger - but does not report any errors - it simply never is able to be triggered.

Which is fine requiring a single trigger character - but given how tight the other error handling within v5 is, on instantiation of the plugin, would it (could it?) make sense to actually throw an error to the console to inform of the invalid "ch" string. The docs request "ch" be of type string - which technically could be multiple characters.

@TheSpyder
Copy link
Member

We should at least warn in the console, yes. We are looking at supporting multiple characters (turns out : is a different character on some keyboards) but we're likely to do that with an array not multiple characters in one string. I'll make a note to deal with this warning at the same time.

@GitHubish
Copy link

It is true that it would be really practical if we could set up several triggers. Today I am using another product that offers this feature but I will be curious to be able to evaluate TinyMCE to replace our current product.

@TheSpyder
Copy link
Member

@GitHubish you should be able to register the same autocomplete function multiple times with different triggers, would that cover what you need? This issue is regarding multi-character triggers.

@Mintenker
Copy link

I would really appreciate mutli-character triggers. Right now I am working on editor where the function to have autocomplete on writing {{. would be greatly appreciated. Any progress on this?

@ggsrivas
Copy link

I have the exact same requirement to trigger autoComplete when {{ is clicked.

@timsquires
Copy link

We also need to be able to trigger autocomplete on a multi-character trigger like {{, it would be great to not be limited to one character for triggering autocompletion.

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

No branches or pull requests

6 participants