1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | interface SummernoteOptions {
|
7 | airMode?: boolean;
|
8 | buttons?: any;
|
9 | callbacks?: any;
|
10 | codemirror?: CodemirrorOptions;
|
11 | colors?: colorsDef;
|
12 | dialogsInBody?: boolean;
|
13 | dialogsFade?: boolean;
|
14 | direction?: string;
|
15 | disableDragAndDrop?: boolean;
|
16 | disableResizeEditor?: boolean;
|
17 | focus?: boolean;
|
18 | fontNames?: string[];
|
19 | fontNamesIgnoreCheck?: string[];
|
20 | height?: number;
|
21 | hint?: HintOptions;
|
22 | icons?: IconsOptions;
|
23 | insertTableMaxSize?: InsertTableMaxSizeOptions;
|
24 | keyMap?: KeyMapOptions;
|
25 | lang?: string;
|
26 | lineHeights?: string[];
|
27 | minHeight?: number;
|
28 | maxHeight?: number;
|
29 | maximumImageFileSize?: any;
|
30 | modules?: ModuleOptions;
|
31 | popover?: PopoverOptions;
|
32 | placeholder?: string;
|
33 | shortcuts?: boolean;
|
34 | styleTags?: styleTagsOptions[];
|
35 | styleWithSpan?: boolean;
|
36 | tabsize?: number;
|
37 | tableClassName?: string;
|
38 | textareaAutoSync?: boolean;
|
39 | toolbar?: toolbarDef;
|
40 | toolbarContainer?: string;
|
41 | tooltip?: boolean;
|
42 | width?: number;
|
43 | }
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | type toolbarStyleGroupOptions = 'style' | 'bold' | 'italic' | 'underline' | 'clear';
|
55 | type toolbarFontGroupOptions = 'strikethrough' | 'superscript' | 'subscript';
|
56 | type toolbarFontsizeGroupOptions = 'fontsize';
|
57 | type toolbarColorGroupOptions = 'color';
|
58 | type toolbarParaGroupOptions = 'ul' | 'ol' | 'paragraph';
|
59 | type toolbarHeightGroupOptions = 'height';
|
60 | type toolbarTableGroupOptions = 'table';
|
61 | type toolbarInsertGroupOptions = 'link' | 'picture' | 'hr';
|
62 | type toolbarViewGroupOptions = 'fullscreen' | 'codeview';
|
63 | type toolbarHelpGroupOptions = 'help';
|
64 | type toolbarDef = [string, string[]][];
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 | type colorsDef = [string[]][];
|
81 | type styleTagsOptions = 'p' | 'blockquote' | 'pre' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
82 |
|
83 | interface InsertTableMaxSizeOptions {
|
84 | col: number;
|
85 | row: number;
|
86 | }
|
87 |
|
88 | interface IconsOptions {
|
89 | options?: any;
|
90 | }
|
91 |
|
92 | interface KeyMapOptions {
|
93 | pc?: KeyMapPcOptions;
|
94 | mac?: KeyMapMacOptions;
|
95 | }
|
96 |
|
97 | interface KeyMapPcOptions {
|
98 | options?: any;
|
99 | }
|
100 |
|
101 | interface KeyMapMacOptions {
|
102 | options?: any;
|
103 | }
|
104 |
|
105 | interface HintOptions {
|
106 | words?: string[];
|
107 | mentions?: string[];
|
108 | match: RegExp;
|
109 | search: Function;
|
110 | template?: Function;
|
111 | content?: Function;
|
112 | }
|
113 |
|
114 | interface CodemirrorOptions {
|
115 | mode?: string;
|
116 | htmlNode?: boolean;
|
117 | lineNumbers?: boolean;
|
118 | theme?: string;
|
119 | }
|
120 |
|
121 | type popoverImageOptionsImagesize = 'imageSize100' | 'imageSize50' | 'imageSize25';
|
122 | type popoverImageOptionsFloat = 'floatLeft' | 'floatRight' | 'floatNone';
|
123 | type popoverImageOptionsRemove = 'removeMedia';
|
124 | type popoverImageDef = [
|
125 | ['imagesize', popoverImageOptionsImagesize[]],
|
126 | ['float', popoverImageOptionsFloat[]],
|
127 | ['remove', popoverImageOptionsRemove[]]
|
128 | ];
|
129 |
|
130 | type popoverLinkLinkOptions = 'linkDialogShow' | 'unlink';
|
131 | type popoverLinkDef = [
|
132 | ['link', popoverLinkLinkOptions[]]
|
133 | ];
|
134 |
|
135 | type popoverAirOptionsColor = 'color';
|
136 | type popoverAirOptionsFont = 'bold' | 'underline' | 'clear';
|
137 | type popoverAirOptionsPara = 'ul' | 'paragraph';
|
138 | type popoverAirOptionsTable = 'table';
|
139 | type popoverAirOptionsInsert = 'link' | 'picture';
|
140 | type popoverAirDef = [
|
141 | ['color', popoverAirOptionsColor],
|
142 | ['font', popoverAirOptionsFont],
|
143 | ['para', popoverAirOptionsPara],
|
144 | ['table', popoverAirOptionsTable],
|
145 | ['insert', popoverAirOptionsInsert]
|
146 | ];
|
147 |
|
148 | interface PopoverOptions {
|
149 | image?: popoverImageDef;
|
150 | link?: popoverLinkDef;
|
151 | air?: popoverAirDef;
|
152 | }
|
153 |
|
154 | interface ModuleOptions {
|
155 | options?: any;
|
156 | }
|
157 |
|
158 | interface CreateLinkOptions {
|
159 | text: string;
|
160 | url: string;
|
161 | newWindow: boolean;
|
162 | }
|
163 |
|
164 | interface JQuery {
|
165 | summernote(): JQuery;
|
166 | summernote(command: string): JQuery;
|
167 | summernote(options?: SummernoteOptions): JQuery;
|
168 | summernote(command: string, markupString: string): JQuery
|
169 | summernote(command: string, value: number): JQuery;
|
170 | summernote(command: string, node: Node): JQuery;
|
171 | summernote(command: string, url: string, filename?: (string | Function)): JQuery;
|
172 |
|
173 | summernote(command: 'destroy'): JQuery;
|
174 | summernote(command: 'code', markupStr?: string): JQuery;
|
175 | summernote(command: 'editor.pasteHTML' | 'pasteHTML', markup : string): JQuery;
|
176 |
|
177 |
|
178 | summernote(command: 'editor.createRange' | 'createRange'): JQuery;
|
179 | summernote(command: 'editor.saveRange' | 'saveRange'): JQuery;
|
180 | summernote(command: 'editor.restoreRange' | 'restoreRange'): JQuery;
|
181 | summernote(command: 'editor.undo' | 'undo'): JQuery;
|
182 | summernote(command: 'editor.redo' | 'redo'): JQuery;
|
183 | summernote(command: 'editor.focus' | 'focus'): JQuery;
|
184 | summernote(command: 'editor.isEmpty' | 'isEmpty'): boolean;
|
185 | summernote(command: 'reset'): JQuery;
|
186 | summernote(command: 'disable'): JQuery;
|
187 | summernote(command: 'enable'): JQuery;
|
188 |
|
189 | summernote(fontStyle: 'editor.bold' | 'bold'): JQuery;
|
190 | summernote(fontStyle: 'editor.italic' | 'italic'): JQuery;
|
191 | summernote(fontStyle: 'editor.underline' | 'underline'): JQuery;
|
192 | summernote(fontStyle: 'editor.strikethrough' | 'strikethrough'): JQuery;
|
193 | summernote(command: 'editor.superscript' | 'superscript'): JQuery;
|
194 | summernote(command: 'editor.subscript' | 'subscript'): JQuery;
|
195 | summernote(command: 'editor.removeFormat' | 'removeFormat'): JQuery;
|
196 | summernote(command: 'backColor', color: string): JQuery;
|
197 | summernote(command: 'foreColor', color: string): JQuery;
|
198 | summernote(command: 'fontName', fontName: string): JQuery;
|
199 | summernote(command: 'editor.fontSize' | 'fontSize', fontSize: number): JQuery;
|
200 |
|
201 | summernote(command: 'editor.justifyLeft' | 'justifyLeft'): JQuery;
|
202 | summernote(command: 'editor.justifyRight' | 'justifyRight'): JQuery;
|
203 | summernote(command: 'editor.justifyCenter' | 'justifyCenter'): JQuery;
|
204 | summernote(command: 'editor.justifyFull' | 'justifyFull'): JQuery;
|
205 | summernote(command: 'insertParagraph'): JQuery;
|
206 | summernote(command: 'editor.insertOrderedList' | 'insertOrderedList'): JQuery;
|
207 | summernote(command: 'editor.insertUnorderedList' | 'insertUnorderedList'): JQuery;
|
208 | summernote(command: 'editor.indent' | 'indent'): JQuery;
|
209 | summernote(command: 'editor.outdent' | 'outdent'): JQuery;
|
210 | summernote(command: 'formatPara'): JQuery;
|
211 | summernote(command: 'formatH1'): JQuery;
|
212 | summernote(command: 'formatH2'): JQuery;
|
213 | summernote(command: 'formatH3'): JQuery;
|
214 | summernote(command: 'formatH4'): JQuery;
|
215 | summernote(command: 'formatH5'): JQuery;
|
216 | summernote(command: 'formatH6'): JQuery;
|
217 |
|
218 | summernote(command: 'editor.insertImage' | 'insertImage', url: string, filename?: (string | Function)): JQuery;
|
219 | summernote(command: 'editor.insertNode' | 'insertNode', node: Node): JQuery;
|
220 | summernote(command: 'editor.insertText' | 'insertText', text: string): JQuery;
|
221 | summernote(command: 'createLink', options: CreateLinkOptions): JQuery;
|
222 | summernote(command: 'editor.unlink' | 'unlink'): JQuery;
|
223 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 |
|
229 |
|
230 |
|
231 |
|
232 |
|
233 |
|
234 |
|
235 |
|
236 |
|
237 |
|
238 |
|
239 |
|
240 |
|
241 |
|
242 |
|
243 |
|
244 |
|
245 | }
|
246 |
|
247 | declare module "summernote" {
|
248 | } |
\ | No newline at end of file |