ngx-tiptap-editor
Version:
[](https://github.com/HuiiBuh/ngx-tiptap-editor/actions/workflows/publish.yml) [ • 1.29 kB
TypeScript
import { ChangeDetectorRef, InjectionToken } from '@angular/core';
import { Editor } from '@tiptap/core';
import { SuggestionProps } from '@tiptap/suggestion';
import { MentionData } from './ngx-mention';
import * as i0 from "@angular/core";
export declare const MENTION_FETCH: InjectionToken<MentionFetchFunction>;
export declare type MentionFetchFunction = (query: string) => MentionData[] | Promise<MentionData[]>;
export interface MentionPreviewInterface {
handleKeyPress(event: KeyboardEvent): boolean;
updateProps(props: SuggestionProps): void;
}
export declare class MentionPreviewComponent implements MentionPreviewInterface {
private ngZone;
private cd;
private editor;
private fetchFunction;
queryResult: {
id: string;
}[];
private mentionProps;
constructor(ngZone: ChangeDetectorRef, cd: ChangeDetectorRef, editor: Editor, fetchFunction: MentionFetchFunction);
handleKeyPress(event: KeyboardEvent): boolean;
updateProps(props: SuggestionProps): Promise<void>;
setMention(mention: {
id: string;
}): void;
static ɵfac: i0.ɵɵFactoryDeclaration<MentionPreviewComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MentionPreviewComponent, "tip-mention-select", never, {}, {}, never, never>;
}