Skip to content

Commit

Permalink
docs: update MentionOption interface (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
kagol authored Aug 24, 2024
1 parent b6b72c2 commit 6b465ec
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
22 changes: 18 additions & 4 deletions packages/docs/fluent-editor/docs/mention.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,24 @@
`mention` 模块配置项:

```typescript
interface IMentionOptions {
itemKey: string,
searchKey: string,
search: (term: string) => object[]
interface MentionOption {
containerClass?: string;
dataAttributes?: string[];
defaultLink?: string;
itemActiveClass?: string;
itemKey: string;
itemClass?: string;
listClass?: string;
listHideClass?: string;
maxHeight?: number;
mentionChar?: string;
remove?: (data: any) => void;
renderMentionItem?: (data: any) => HTMLElement;
renderMentionText?: (data: any) => HTMLElement | string;
search?: (term: string) => Promise<any[]>;
searchKey: string;
select?: (data: any) => void;
target?: string;
}
```

Expand Down
22 changes: 11 additions & 11 deletions packages/fluent-editor/src/mention/Mention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ const { Scope } = Quill.imports['parchment'];
const Delta = Quill.imports['delta'];

interface MentionOption {
remove?: (data: any) => void;
containerClass?: string;
dataAttributes?: string[];
defaultLink?: string;
target?: string;
mentionChar?: string;
itemActiveClass?: string;
itemKey: string;
itemClass?: string;
listClass?: string;
listHideClass?: string;
maxHeight?: number;
search?: (term: string) => Promise<any[]>;
mentionChar?: string;
remove?: (data: any) => void;
renderMentionItem?: (data: any) => HTMLElement;
renderMentionText?: (data: any) => HTMLElement | string;
containerClass?: string;
listClass?: string;
listHideClass?: string;
search?: (term: string) => Promise<any[]>;
searchKey: string;
itemKey: string;
itemClass?: string;
itemActiveClass?: string;
dataAttributes?: string[];
select?: (data: any) => void;
target?: string;
}

// @dynamic
Expand Down

0 comments on commit 6b465ec

Please sign in to comment.