Custom Autocomplete in version 6

Hi I have usecase of custom autocomplete in which suggestions are fetched from api by picking up the text from editor, and in that custom autocomplete my custom tooltips are also implemented , is it possible to achieve currently in v6?

Recently I migrated to V6.

Yes this is definitely possible — completion sources can be any asynchronous function, and can read the editor state. See the autocompletion examples for some more background.

1 Like

Thanks for this , whole autocomplete is my custom react component , is that possible to add that?
I could find only this render method

addToOptions⁠?: {
render: fn(
completion: Completion,
state: EditorState,
view: EditorView
) → Node | null,
position: number
}[]

in the doc, am I going in the correct direction?

@codemirror/autocomplete does not support overriding the rendering of the completion tooltip. You’re going to have to work within its display logic if you want to use it.