-
-
Notifications
You must be signed in to change notification settings - Fork 202
/
Copy patheditor.d.ts
57 lines (55 loc) · 1.5 KB
/
editor.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
/* eslint-disable @typescript-eslint/ban-types */
declare interface EditorCore {
debouncedUpdate: Function;
disableDrag: boolean;
docChanged: boolean;
isAttachmentNote: false;
metadata: {
_citationItems: { itemData: { [k: string]: any } }[];
uris: string[];
};
nodeViews: any[];
onUpdateState: Function;
options: {
isAttachmentNote: false;
onImportImages: Function;
onInsertObject: Function;
onOpenAnnotation: Function;
onOpenCitationPage: Function;
onOpenCitationPopup: Function;
onOpenContextMenu: Function;
onOpenURL: Function;
onShowCitationItem: Function;
onSubscribe: Function;
onUnsubscribe: Function;
onUpdate: Function;
onUpdateCitationItemsList: Function;
placeholder: boolean;
readOnly: boolean;
reloaded: boolean;
smartQuotes: boolean;
unsaved: boolean;
value: string;
};
pluginState: { [k: string]: any };
provider: typeof import("react").Provider;
readOnly: boolean;
reloaded: boolean;
view: import("prosemirror-view").EditorView & {
// TODO: fix this
docView: any;
};
}
declare type EditorAPI =
typeof import("../src/extras/editorScript").BetterNotesEditorAPI;
declare interface EditorElement extends XULBoxElement {
_iframe: HTMLIFrameElement;
_editorInstance: Zotero.EditorInstance;
_initialized?: boolean;
mode?: "edit" | "view" | "merge";
viewMode?: string;
parent?: Zotero.Item;
item?: Zotero.Item;
getCurrentInstance(): Zotero.EditorInstance;
initEditor(): Promise<void>;
}