copenhagen icon indicating copy to clipboard operation
copenhagen copied to clipboard

What to return at addComplete function

Open calebeaires opened this issue 4 years ago • 0 comments

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 '
            });

calebeaires avatar Oct 28 '21 12:10 calebeaires