forked from kkfor/for-editor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
108 lines (106 loc) · 2.03 KB
/
index.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import * as React from 'react'
export interface IToolbar {
h1?: boolean
h2?: boolean
h3?: boolean
h4?: boolean
para?: boolean
quote?: boolean
table?: boolean
img?: boolean
link?: boolean
innercode?: boolean
code?: boolean
collapse?: boolean
katex?: boolean
preview?: boolean
expand?: boolean
undo?: boolean
redo?: boolean
save?: boolean
subfield?: boolean
}
export interface IWords {
placeholder?: string
h1?: string
h2?: string
h3?: string
h4?: string
undo?: string
redo?: string
// 段落
para?: string
italic?: string
bold?: string
bolditalic?: string
delline?: string
underline?: string
keytext?: string
quote?: string
table?: string
img?: string
link?: string
innercode?: string
code?: string
collapse?: string
katex?: string
save?: string
preview?: string
singleColumn?: string
doubleColumn?: string
fullscreenOn?: string
fullscreenOff?: string
addImgLink?: string
addImg?: string
}
interface IP {
value?: string
lineNum?: number
onChange?: (value: string) => void
onSave?: (value: string) => void
placeholder?: string
fontSize?: string
disabled?: boolean
style?: object
height?: string
preview?: boolean
expand?: boolean
subfield?: boolean
toolbar?: IToolbar
language?: string
addImg?: (file: File, index: number) => void
}
interface IS {
preview: boolean
expand: boolean
subfield: boolean
history: string[]
historyIndex: number
lineIndex: number
value: string
words: IWords
}
declare class MdEditor extends React.Component<IP, IS> {
static defaultProps: {
lineNum: boolean
onChange: () => void
onSave: () => void
addImg: () => void
fontSize: string
disabled: boolean
preview: boolean
expand: boolean
subfield: boolean
style: {}
toolbar: IToolbar
language: string
}
$img2Url: (name: string, url: string) => void
private $vm
private $scrollEdit
private $scrollPreview
private $blockEdit
private $blockPreview
private currentTimeout
}
export default MdEditor