forked from zurb/tribute
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtributejs.d.ts
60 lines (41 loc) · 1.61 KB
/
tributejs.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Type definitions for TributeJS v2.3.7
// Project: https://github.com/zurb/tribute
// Definitions by: Jordan Humphreys <https://github.com/mrsweaters/>
export interface TributeOptions {
// symbol that starts the lookup
trigger?: string,
// element to target for @mentions
iframe?: any,
// class added in the flyout menu for active item
selectClass?: string,
// function called on select that returns the content to insert
selectTemplate?: () => string,
// template for displaying item in menu
menuItemTemplate?: () => string,
// template for when no match is found (optional),
// If no template is provided, menu is hidden.
noMatchTemplate?: any,
// specify an alternative parent container for the menu
menuContainer?: any,
// column to search against in the object (accepts function or string)
lookup?: string | () => void,
// column that contains the content to insert by default
fillAttr?: string,
// array of objects to match
values?: array<any>,
// specify whether a space is required before the trigger character
requireLeadingSpace?: boolean,
// specify whether a space is allowed in the middle of mentions
allowSpaces?: boolean,
// optionally specify a custom suffix for the replace text
// (defaults to empty space if undefined)
replaceTextSuffix?: string,
// pass an array of config objects
collection?: array<Object>,
}
export default class Tribute {
constructor(options: TributeOptions);
isActive: boolean;
append(index: number, values: array<Object>, replace?: boolean): void;
appendCurrent(values: array<Object>, replace?: boolean): void;
}