prosekit/extensions/autocomplete
AutocompleteRule
constructor
new AutocompleteRule(options: { canMatch?: (options: { state: EditorState }) => boolean; onEnter: MatchHandler; onLeave?: VoidFunction; regex: RegExp }): AutocompleteRule
canMatch: (options: { state: EditorState }) => boolean
onLeave?: VoidFunction
onMatch: MatchHandler
regex: RegExp
MatchHandler
Type: (options: { deleteMatch: () => void; from: number; ignoreMatch: () => void; match: RegExpExecArray; state: EditorState; to: number }) => void
defineAutocomplete
ts
function defineAutocomplete(rule: AutocompleteRule): Extension