Skip to content

Autocomplete doesn’t work when editing an existing doc #1545

@devnaumov

Description

@devnaumov

Describe the issue

It works fine when typing forward, but when I try to edit an existing doc, it doesn’t trigger the completion source at all.

Image

 function completionSource(context: CompletionContext): CompletionResult | null {
      const before = context.matchBefore(/\w+/);

      if (!before) {
        return null;
      }

      return {
        from: before.from,
        options: [{ label: 'hello' }]
      }
    }

 const config = { override: [completionSource] }

Browser and platform

No response

Reproduction link

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions