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

Autocomplete #339

Open
Jyboer13 opened this issue Aug 29, 2023 · 0 comments
Open

Autocomplete #339

Jyboer13 opened this issue Aug 29, 2023 · 0 comments

Comments

@Jyboer13
Copy link

Hello! Autocomplete only opens if I enter two characters after the trigger character. Is it possible to open the autocomplete by entering only the @ symbol or open it manually, by pressing a button for example?

<MUIRichTextEditor
defaultValue={content}
key="key"
label={"Label"}
id="comment"
controls={[
'bold',
'italic',
'strikethrough',
'numberList',
'bulletList',
'link',
'send',
]}
onChange={onChange}
onFocus={onFocus}
onBlur={onBlur}
ref={ref}
customControls={[
{
name: 'send',
icon: isEmpty ? : ,
type: 'callback',
onClick: onSubmit,
inlineStyle: {
backgroundColor: 'black',
color: 'white',
},
},
]}
autocomplete={{
strategies: [
{
items: ['item 1', 'item2'],
triggerChar: '@',
insertSpaceAfter: true,
},
],
}}
decorators={[
{
component: MentionDecorator,
regex: /\B@[/.\w]+/g,
},
]}
/>

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

1 participant