forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
epiceditor.d.ts
61 lines (57 loc) · 1.68 KB
/
epiceditor.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
61
// Type definitions for EpicEditor 0.2
// Project: http://epiceditor.com/
// Definitions by: Boris Yankov <https://github.com/borisyankov>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface EpicEditorOptions {
container?: any;
textarea?: any;
basePath?: string;
clientSideStorage?: boolean;
localStorageName?: string;
useNativeFullsreen?: boolean;
parser?: any;
file?: {
name: string;
defaultContent: string;
autoSave: any;
};
theme?: {
base: string;
preview: string;
editor: string;
};
focusOnLoad?: boolean;
shortcut?: {
modifier: number;
fullscreen: number;
preview: number;
};
string?: {
togglePreview: string;
toggleEdit: string;
toggleFullscreen: string;
};
}
declare class EpicEditor {
constructor();
constructor(options: EpicEditorOptions);
load(callback?: Function): EpicEditor;
unload(callback?: Function): EpicEditor;
getElement(element: string): any;
is(state: string): boolean;
open(filename: string);
importFile(filename?: string, content?: string): void;
exportFile(filename?: string, type?: string): any;
rename(oldName: string, newName: string): void;
save(): void;
remove(filename: string): void;
getFiles(filename?: string): any;
on(event: string, handler: Function): void;
emit(event: string): void;
removeListener(event: string, handler?: Function): void;
preview(): void;
edit(): void;
enterFullscreen(): void;
exitFullscreen(): void;
reflow(type?: string): void;
}