提交 | 用户 | 时间 | ||
820397 | 1 | import { SlateDescendant } from '@wangeditor/editor' |
H | 2 | |
3 | declare module 'slate' { | |
4 | interface CustomTypes { | |
5 | // 扩展 text | |
6 | Text: { | |
7 | text: string | |
8 | bold?: boolean | |
9 | italic?: boolean | |
10 | code?: boolean | |
11 | through?: boolean | |
12 | underline?: boolean | |
13 | sup?: boolean | |
14 | sub?: boolean | |
15 | color?: string | |
16 | bgColor?: string | |
17 | fontSize?: string | |
18 | fontFamily?: string | |
19 | } | |
20 | ||
21 | // 扩展 Element 的 type 属性 | |
22 | Element: { | |
23 | type: string | |
24 | children: SlateDescendant[] | |
25 | } | |
26 | } | |
27 | } |