1
1
import * as React from "react" ;
2
2
import * as Quill from "quill" ;
3
3
4
- type ToolbarOptionItem = string | string [ ] | Object [ ] ;
5
-
6
- interface ToolbarOptionObject {
7
- container : string ;
8
- handlers ?: {
9
- [ key : string ] : Function ;
10
- } ;
11
- }
12
-
13
- export interface Modules {
14
- /**
15
- * @deprecated
16
- * 'Since v1.0.0, React Quill will not create a custom toolbar for you anymore.
17
- * Create a toolbar explictly, or let Quill create one.
18
- * See: https://github.com/zenoamaro/react-quill#upgrading-to-react-quill-v100
19
- */
20
- toolbar ?: never ;
21
- }
22
-
23
4
export interface UnprivilegedEditor {
24
5
getLength ( ) : number ;
25
- getText ( index ?: number , length ?: number ) : string ;
6
+ getText ( index ?: number , length ?: number ) : string ;
26
7
getHTML ( ) : string ;
27
8
getBounds ( index : number , length ?: number ) : Quill . BoundsStatic ;
28
- getSelection ( focus ?: boolean ) : Quill . RangeStatic ;
29
- getContents ( index ?: number , length ?: number ) : Quill . DeltaStatic ; }
9
+ getSelection ( focus ?: boolean ) : Quill . RangeStatic ;
10
+ getContents ( index ?: number , length ?: number ) : Quill . DeltaStatic ;
11
+ }
30
12
31
13
export interface ComponentProps {
32
14
id ?: string ;
@@ -48,7 +30,7 @@ export interface ComponentProps {
48
30
onKeyUp ?: React . EventHandler < any > ;
49
31
formats ?: string [ ] ;
50
32
children ?: React . ReactElement < any > ;
51
- modules ?: Modules ;
33
+ modules ?: Quill . StringMap ;
52
34
53
35
/** @deprecated
54
36
* The `toolbar` prop has been deprecated. Use `modules.toolbar` instead.
@@ -61,7 +43,7 @@ export interface ComponentProps {
61
43
* See: https://github.com/zenoamaro/react-quill#upgrading-to-react-quill-v100
62
44
*/
63
45
64
- styles ?: never ;
46
+ styles ?: never ;
65
47
/**
66
48
* @deprecated
67
49
* The `pollInterval` property does not have any effect anymore.
@@ -77,22 +59,6 @@ export default class Component extends React.Component<ComponentProps> {
77
59
getEditor ( ) : Quill . Quill ;
78
60
}
79
61
80
- export interface ToolbarItem {
81
- type : string ;
82
- label ?: string ;
83
- value ?: string ;
84
- items ?: ToolbarItem [ ] ;
85
- }
86
-
87
- export interface ToolbarProps {
88
- id ?: string ;
89
- className ?: string ;
90
- style ?: Object ;
91
- items ?: ToolbarItem [ ] ;
92
- }
93
-
94
- export class Toolbar extends React . Component < ToolbarProps > { }
95
-
96
62
export interface Mixin {
97
63
createEditor ( element : HTMLElement , config : Quill . QuillOptionsStatic ) : Quill . Quill ;
98
64
hookEditor ( editor : Quill . Quill ) : void ;
0 commit comments