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

What to return at addComplete function #11

Open
calebeaires opened this issue Oct 28, 2021 · 0 comments
Open

What to return at addComplete function #11

calebeaires opened this issue Oct 28, 2021 · 0 comments

Comments

@calebeaires
Copy link

When using addAutocomplete the editors seems to break something. I have tried to follow the documentation and even seek the Copenhagen code to find out how to use add extra AutoComplete. May yout give me a clue on how to use this feature

            const ed = new Copenhagen.Editor({ language: 'javascript' });

            // open, but do not auto-focus the editor
            ed.open(editor.value, false);

            // set a value
            ed.setValue('var message = `hello world`;');

            ed.addAutocomplete('sel', function (editor, selection, inString, inComment) {
                console.log(editor, selection, inString, inComment);
                 return 'some value '
            });
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