@contentful/field-editor-rich-text 1.0.5 → 2.0.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -22
- package/README.md +1 -1
- package/dist/ContentfulEditorProvider.d.ts +8 -0
- package/dist/RichTextEditor.d.ts +19 -60
- package/dist/RichTextEditor.styles.d.ts +7 -0
- package/dist/SdkProvider.d.ts +7 -0
- package/dist/Toolbar/EmbedEntityWidget.d.ts +6 -0
- package/dist/Toolbar/StickyToolbarWrapper.d.ts +6 -11
- package/dist/Toolbar/index.d.ts +6 -20
- package/dist/TrackingProvider.d.ts +11 -0
- package/dist/constants/Schema.d.ts +93 -11
- package/dist/dialogs/openRichTextDialog.d.ts +2 -1
- package/dist/dialogs/renderRichTextDialog.d.ts +3 -1
- package/dist/field-editor-rich-text.cjs.development.js +4556 -5309
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +4532 -5285
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/helpers/deserializer.d.ts +3 -0
- package/dist/helpers/editor.d.ts +48 -0
- package/dist/helpers/environment.d.ts +1 -0
- package/dist/helpers/formatDateAndTime.d.ts +15 -0
- package/dist/helpers/getLinkedContentTypeIdsForNodeType.d.ts +26 -2
- package/dist/helpers/newEntitySelectorConfigFromRichTextField.d.ts +5 -1
- package/dist/helpers/normalizers.d.ts +15 -0
- package/dist/helpers/sanitizeSlateDoc.d.ts +18 -0
- package/dist/helpers/truncate.d.ts +1 -0
- package/dist/helpers/validations.d.ts +10 -0
- package/dist/plugins/Bold/index.d.ts +12 -64
- package/dist/plugins/Code/index.d.ts +12 -64
- package/dist/plugins/DragAndDrop/index.d.ts +2 -0
- package/dist/plugins/EmbeddedEntity/index.d.ts +10 -0
- package/dist/plugins/EmbeddedEntityBlock/LinkedEntityBlock.d.ts +13 -0
- package/dist/plugins/EmbeddedEntityBlock/ToolbarIcon.d.ts +12 -10
- package/dist/plugins/EmbeddedEntityBlock/Util.d.ts +2 -23
- package/dist/plugins/EmbeddedEntityBlock/index.d.ts +11 -26
- package/dist/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.d.ts +12 -0
- package/dist/plugins/EmbeddedEntityInline/Util.d.ts +16 -0
- package/dist/plugins/EmbeddedEntityInline/index.d.ts +12 -0
- package/dist/plugins/Heading/index.d.ts +20 -380
- package/dist/plugins/Hr/index.d.ts +13 -61
- package/dist/plugins/Hyperlink/EntryAssetTooltip.d.ts +10 -0
- package/dist/plugins/Hyperlink/HyperlinkModal.d.ts +17 -0
- package/dist/plugins/Hyperlink/index.d.ts +12 -9
- package/dist/plugins/InsertBeforeFirstVoidBlock/index.d.ts +2 -3
- package/dist/plugins/Italic/index.d.ts +12 -64
- package/dist/plugins/List/getListInsertFragment.d.ts +6 -0
- package/dist/plugins/List/index.d.ts +15 -114
- package/dist/plugins/NewLine/index.d.ts +2 -0
- package/dist/plugins/Paragraph/index.d.ts +7 -5
- package/dist/plugins/Paste/index.d.ts +2 -7
- package/dist/plugins/Paste/sanitizers/helpers.d.ts +7 -0
- package/dist/plugins/Paste/sanitizers/index.d.ts +3 -0
- package/dist/plugins/Paste/sanitizers/removeComments.d.ts +2 -0
- package/dist/plugins/Paste/sanitizers/sanitizeEntityBlocks.d.ts +6 -0
- package/dist/plugins/Paste/sanitizers/sanitizeTables.d.ts +2 -0
- package/dist/plugins/Quote/index.d.ts +13 -59
- package/dist/plugins/Table/TableActions.d.ts +5 -0
- package/dist/plugins/Table/actions/addColumn.d.ts +4 -0
- package/dist/plugins/Table/actions/addRow.d.ts +3 -0
- package/dist/plugins/Table/actions/index.d.ts +3 -0
- package/dist/plugins/Table/actions/setHeader.d.ts +2 -0
- package/dist/plugins/Table/helpers.d.ts +5 -0
- package/dist/plugins/Table/index.d.ts +189 -0
- package/dist/plugins/Table/normalizers.d.ts +2 -0
- package/dist/plugins/Text/index.d.ts +2 -0
- package/dist/plugins/TrailingParagraph/index.d.ts +1 -0
- package/dist/plugins/Underline/index.d.ts +12 -0
- package/dist/plugins/index.d.ts +180 -1
- package/dist/plugins/shared/EntityStatusIcon.d.ts +8 -0
- package/dist/plugins/shared/FetchingWrappedAssetCard.d.ts +23 -0
- package/dist/plugins/shared/FetchingWrappedEntryCard.d.ts +13 -0
- package/dist/plugins/shared/ToolbarButton.d.ts +12 -0
- package/dist/test-utils/createEditor.d.ts +7 -0
- package/dist/test-utils/index.d.ts +2 -0
- package/dist/test-utils/jsx.d.ts +28 -0
- package/dist/types.d.ts +25 -0
- package/package.json +39 -34
- package/LICENSE +0 -21
- package/dist/RichTextEditor.spec.d.ts +0 -1
- package/dist/Toolbar/Toolbar.spec.d.ts +0 -1
- package/dist/helpers/browserSupport.d.ts +0 -1
- package/dist/plugins/CommandPalette/CommandMark.d.ts +0 -12
- package/dist/plugins/CommandPalette/CommandPalette.d.ts +0 -10
- package/dist/plugins/CommandPalette/CommandPaletteService.d.ts +0 -20
- package/dist/plugins/CommandPalette/CommandPanel/CommandPanelMenu.d.ts +0 -43
- package/dist/plugins/CommandPalette/CommandPanel/index.d.ts +0 -37
- package/dist/plugins/CommandPalette/Util.d.ts +0 -5
- package/dist/plugins/CommandPalette/index.d.ts +0 -7
- package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.d.ts +0 -20
- package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.styles.d.ts +0 -3
- package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedAssetCard.d.ts +0 -15
- package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedEntryCard.d.ts +0 -15
- package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.d.ts +0 -21
- package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.styles.d.ts +0 -4
- package/dist/plugins/EmbeddedEntryInline/FetchingWrappedInlineEntryCard.d.ts +0 -14
- package/dist/plugins/EmbeddedEntryInline/ToolbarIcon.d.ts +0 -11
- package/dist/plugins/EmbeddedEntryInline/Utils.d.ts +0 -4
- package/dist/plugins/EmbeddedEntryInline/index.d.ts +0 -12
- package/dist/plugins/EntryEmbedDropdown/index.d.ts +0 -14
- package/dist/plugins/Heading/HeadingDropdown.d.ts +0 -28
- package/dist/plugins/Heading/HeadingDropdownItem.d.ts +0 -57
- package/dist/plugins/Heading/Paragraph.d.ts +0 -58
- package/dist/plugins/Hyperlink/Hyperlink.d.ts +0 -13
- package/dist/plugins/Hyperlink/ToolbarIcon.d.ts +0 -7
- package/dist/plugins/Hyperlink/Util.d.ts +0 -43
- package/dist/plugins/Hyperlink/styles.d.ts +0 -12
- package/dist/plugins/Hyperlink/truncate.d.ts +0 -1
- package/dist/plugins/Hyperlink/useRequestStatus.d.ts +0 -6
- package/dist/plugins/InsertBeforeFirstVoidBlock/Util.d.ts +0 -14
- package/dist/plugins/List/EditListWrapper.d.ts +0 -2
- package/dist/plugins/List/ToolbarDecorator.d.ts +0 -62
- package/dist/plugins/NewLinePlugin/index.d.ts +0 -3
- package/dist/plugins/Paste/Paste.d.ts +0 -1
- package/dist/plugins/Paste/Paste.spec.d.ts +0 -1
- package/dist/plugins/Paste/index.spec.d.ts +0 -1
- package/dist/plugins/PasteHtml/PasteHtml.spec.d.ts +0 -1
- package/dist/plugins/PasteHtml/Serializer.d.ts +0 -1
- package/dist/plugins/PasteHtml/index.d.ts +0 -3
- package/dist/plugins/PasteText/PasteText.spec.d.ts +0 -1
- package/dist/plugins/PasteText/index.d.ts +0 -3
- package/dist/plugins/Quote/QuotePlugin.d.ts +0 -10
- package/dist/plugins/Quote/Util.d.ts +0 -2
- package/dist/plugins/Underlined/index.d.ts +0 -64
- package/dist/plugins/shared/BlockSelectDecorator.d.ts +0 -63
- package/dist/plugins/shared/BlockToggleDecorator.d.ts +0 -65
- package/dist/plugins/shared/MarkDecorator.d.ts +0 -12
- package/dist/plugins/shared/MarkPlugin.d.ts +0 -9
- package/dist/plugins/shared/MarkToggleDecorator.d.ts +0 -62
- package/dist/plugins/shared/NodeDecorator.d.ts +0 -15
- package/dist/plugins/shared/PasteTestHelpers.d.ts +0 -35
- package/dist/plugins/shared/PluginApi.d.ts +0 -31
- package/dist/plugins/shared/PropTypes.d.ts +0 -15
- package/dist/plugins/shared/ToolbarDropdownListItem.d.ts +0 -14
- package/dist/plugins/shared/ToolbarIcon.d.ts +0 -16
- package/dist/plugins/shared/Util.d.ts +0 -1
- package/dist/plugins/shared/UtilHave.d.ts +0 -24
- package/dist/setupTests.d.ts +0 -1
- package/dist/validations/index.d.ts +0 -9
- package/dist/validations/validations.spec.d.ts +0 -1
|
@@ -1,380 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
export function Heading4Plugin({ type, richTextAPI }: {
|
|
23
|
-
type?: any;
|
|
24
|
-
richTextAPI: any;
|
|
25
|
-
}): {
|
|
26
|
-
renderNode: (props: any, _editor: any, next: any) => any;
|
|
27
|
-
onKeyDown: (e: any, editor: any, next: any) => any;
|
|
28
|
-
};
|
|
29
|
-
export function Heading5Plugin({ type, richTextAPI }: {
|
|
30
|
-
type?: any;
|
|
31
|
-
richTextAPI: any;
|
|
32
|
-
}): {
|
|
33
|
-
renderNode: (props: any, _editor: any, next: any) => any;
|
|
34
|
-
onKeyDown: (e: any, editor: any, next: any) => any;
|
|
35
|
-
};
|
|
36
|
-
export function Heading6Plugin({ type, richTextAPI }: {
|
|
37
|
-
type?: any;
|
|
38
|
-
richTextAPI: any;
|
|
39
|
-
}): {
|
|
40
|
-
renderNode: (props: any, _editor: any, next: any) => any;
|
|
41
|
-
onKeyDown: (e: any, editor: any, next: any) => any;
|
|
42
|
-
};
|
|
43
|
-
export const Heading1: {
|
|
44
|
-
new (props: any): {
|
|
45
|
-
handleSelect: (event: any) => any;
|
|
46
|
-
render(): JSX.Element;
|
|
47
|
-
context: any;
|
|
48
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
49
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
50
|
-
readonly props: Readonly<any> & Readonly<{
|
|
51
|
-
children?: import("react").ReactNode;
|
|
52
|
-
}>;
|
|
53
|
-
state: Readonly<any>;
|
|
54
|
-
refs: {
|
|
55
|
-
[key: string]: import("react").ReactInstance;
|
|
56
|
-
};
|
|
57
|
-
componentDidMount?(): void;
|
|
58
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
59
|
-
componentWillUnmount?(): void;
|
|
60
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
61
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
62
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
63
|
-
componentWillMount?(): void;
|
|
64
|
-
UNSAFE_componentWillMount?(): void;
|
|
65
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
66
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
67
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
68
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
69
|
-
};
|
|
70
|
-
new (props: any, context: any): {
|
|
71
|
-
handleSelect: (event: any) => any;
|
|
72
|
-
render(): JSX.Element;
|
|
73
|
-
context: any;
|
|
74
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
75
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
76
|
-
readonly props: Readonly<any> & Readonly<{
|
|
77
|
-
children?: import("react").ReactNode;
|
|
78
|
-
}>;
|
|
79
|
-
state: Readonly<any>;
|
|
80
|
-
refs: {
|
|
81
|
-
[key: string]: import("react").ReactInstance;
|
|
82
|
-
};
|
|
83
|
-
componentDidMount?(): void;
|
|
84
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
85
|
-
componentWillUnmount?(): void;
|
|
86
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
87
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
88
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
89
|
-
componentWillMount?(): void;
|
|
90
|
-
UNSAFE_componentWillMount?(): void;
|
|
91
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
92
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
93
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
94
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
95
|
-
};
|
|
96
|
-
propTypes: any;
|
|
97
|
-
contextType?: import("react").Context<any> | undefined;
|
|
98
|
-
};
|
|
99
|
-
export const Heading2: {
|
|
100
|
-
new (props: any): {
|
|
101
|
-
handleSelect: (event: any) => any;
|
|
102
|
-
render(): JSX.Element;
|
|
103
|
-
context: any;
|
|
104
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
105
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
106
|
-
readonly props: Readonly<any> & Readonly<{
|
|
107
|
-
children?: import("react").ReactNode;
|
|
108
|
-
}>;
|
|
109
|
-
state: Readonly<any>;
|
|
110
|
-
refs: {
|
|
111
|
-
[key: string]: import("react").ReactInstance;
|
|
112
|
-
};
|
|
113
|
-
componentDidMount?(): void;
|
|
114
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
115
|
-
componentWillUnmount?(): void;
|
|
116
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
117
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
118
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
119
|
-
componentWillMount?(): void;
|
|
120
|
-
UNSAFE_componentWillMount?(): void;
|
|
121
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
122
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
123
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
124
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
125
|
-
};
|
|
126
|
-
new (props: any, context: any): {
|
|
127
|
-
handleSelect: (event: any) => any;
|
|
128
|
-
render(): JSX.Element;
|
|
129
|
-
context: any;
|
|
130
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
131
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
132
|
-
readonly props: Readonly<any> & Readonly<{
|
|
133
|
-
children?: import("react").ReactNode;
|
|
134
|
-
}>;
|
|
135
|
-
state: Readonly<any>;
|
|
136
|
-
refs: {
|
|
137
|
-
[key: string]: import("react").ReactInstance;
|
|
138
|
-
};
|
|
139
|
-
componentDidMount?(): void;
|
|
140
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
141
|
-
componentWillUnmount?(): void;
|
|
142
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
143
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
144
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
145
|
-
componentWillMount?(): void;
|
|
146
|
-
UNSAFE_componentWillMount?(): void;
|
|
147
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
148
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
149
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
150
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
151
|
-
};
|
|
152
|
-
propTypes: any;
|
|
153
|
-
contextType?: import("react").Context<any> | undefined;
|
|
154
|
-
};
|
|
155
|
-
export const Heading3: {
|
|
156
|
-
new (props: any): {
|
|
157
|
-
handleSelect: (event: any) => any;
|
|
158
|
-
render(): JSX.Element;
|
|
159
|
-
context: any;
|
|
160
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
161
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
162
|
-
readonly props: Readonly<any> & Readonly<{
|
|
163
|
-
children?: import("react").ReactNode;
|
|
164
|
-
}>;
|
|
165
|
-
state: Readonly<any>;
|
|
166
|
-
refs: {
|
|
167
|
-
[key: string]: import("react").ReactInstance;
|
|
168
|
-
};
|
|
169
|
-
componentDidMount?(): void;
|
|
170
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
171
|
-
componentWillUnmount?(): void;
|
|
172
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
173
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
174
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
175
|
-
componentWillMount?(): void;
|
|
176
|
-
UNSAFE_componentWillMount?(): void;
|
|
177
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
178
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
179
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
180
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
181
|
-
};
|
|
182
|
-
new (props: any, context: any): {
|
|
183
|
-
handleSelect: (event: any) => any;
|
|
184
|
-
render(): JSX.Element;
|
|
185
|
-
context: any;
|
|
186
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
187
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
188
|
-
readonly props: Readonly<any> & Readonly<{
|
|
189
|
-
children?: import("react").ReactNode;
|
|
190
|
-
}>;
|
|
191
|
-
state: Readonly<any>;
|
|
192
|
-
refs: {
|
|
193
|
-
[key: string]: import("react").ReactInstance;
|
|
194
|
-
};
|
|
195
|
-
componentDidMount?(): void;
|
|
196
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
197
|
-
componentWillUnmount?(): void;
|
|
198
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
199
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
200
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
201
|
-
componentWillMount?(): void;
|
|
202
|
-
UNSAFE_componentWillMount?(): void;
|
|
203
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
204
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
205
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
206
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
207
|
-
};
|
|
208
|
-
propTypes: any;
|
|
209
|
-
contextType?: import("react").Context<any> | undefined;
|
|
210
|
-
};
|
|
211
|
-
export const Heading4: {
|
|
212
|
-
new (props: any): {
|
|
213
|
-
handleSelect: (event: any) => any;
|
|
214
|
-
render(): JSX.Element;
|
|
215
|
-
context: any;
|
|
216
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
217
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
218
|
-
readonly props: Readonly<any> & Readonly<{
|
|
219
|
-
children?: import("react").ReactNode;
|
|
220
|
-
}>;
|
|
221
|
-
state: Readonly<any>;
|
|
222
|
-
refs: {
|
|
223
|
-
[key: string]: import("react").ReactInstance;
|
|
224
|
-
};
|
|
225
|
-
componentDidMount?(): void;
|
|
226
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
227
|
-
componentWillUnmount?(): void;
|
|
228
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
229
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
230
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
231
|
-
componentWillMount?(): void;
|
|
232
|
-
UNSAFE_componentWillMount?(): void;
|
|
233
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
234
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
235
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
236
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
237
|
-
};
|
|
238
|
-
new (props: any, context: any): {
|
|
239
|
-
handleSelect: (event: any) => any;
|
|
240
|
-
render(): JSX.Element;
|
|
241
|
-
context: any;
|
|
242
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
243
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
244
|
-
readonly props: Readonly<any> & Readonly<{
|
|
245
|
-
children?: import("react").ReactNode;
|
|
246
|
-
}>;
|
|
247
|
-
state: Readonly<any>;
|
|
248
|
-
refs: {
|
|
249
|
-
[key: string]: import("react").ReactInstance;
|
|
250
|
-
};
|
|
251
|
-
componentDidMount?(): void;
|
|
252
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
253
|
-
componentWillUnmount?(): void;
|
|
254
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
255
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
256
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
257
|
-
componentWillMount?(): void;
|
|
258
|
-
UNSAFE_componentWillMount?(): void;
|
|
259
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
260
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
261
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
262
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
263
|
-
};
|
|
264
|
-
propTypes: any;
|
|
265
|
-
contextType?: import("react").Context<any> | undefined;
|
|
266
|
-
};
|
|
267
|
-
export const Heading5: {
|
|
268
|
-
new (props: any): {
|
|
269
|
-
handleSelect: (event: any) => any;
|
|
270
|
-
render(): JSX.Element;
|
|
271
|
-
context: any;
|
|
272
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
273
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
274
|
-
readonly props: Readonly<any> & Readonly<{
|
|
275
|
-
children?: import("react").ReactNode;
|
|
276
|
-
}>;
|
|
277
|
-
state: Readonly<any>;
|
|
278
|
-
refs: {
|
|
279
|
-
[key: string]: import("react").ReactInstance;
|
|
280
|
-
};
|
|
281
|
-
componentDidMount?(): void;
|
|
282
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
283
|
-
componentWillUnmount?(): void;
|
|
284
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
285
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
286
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
287
|
-
componentWillMount?(): void;
|
|
288
|
-
UNSAFE_componentWillMount?(): void;
|
|
289
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
290
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
291
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
292
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
293
|
-
};
|
|
294
|
-
new (props: any, context: any): {
|
|
295
|
-
handleSelect: (event: any) => any;
|
|
296
|
-
render(): JSX.Element;
|
|
297
|
-
context: any;
|
|
298
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
299
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
300
|
-
readonly props: Readonly<any> & Readonly<{
|
|
301
|
-
children?: import("react").ReactNode;
|
|
302
|
-
}>;
|
|
303
|
-
state: Readonly<any>;
|
|
304
|
-
refs: {
|
|
305
|
-
[key: string]: import("react").ReactInstance;
|
|
306
|
-
};
|
|
307
|
-
componentDidMount?(): void;
|
|
308
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
309
|
-
componentWillUnmount?(): void;
|
|
310
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
311
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
312
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
313
|
-
componentWillMount?(): void;
|
|
314
|
-
UNSAFE_componentWillMount?(): void;
|
|
315
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
316
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
317
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
318
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
319
|
-
};
|
|
320
|
-
propTypes: any;
|
|
321
|
-
contextType?: import("react").Context<any> | undefined;
|
|
322
|
-
};
|
|
323
|
-
export const Heading6: {
|
|
324
|
-
new (props: any): {
|
|
325
|
-
handleSelect: (event: any) => any;
|
|
326
|
-
render(): JSX.Element;
|
|
327
|
-
context: any;
|
|
328
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
329
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
330
|
-
readonly props: Readonly<any> & Readonly<{
|
|
331
|
-
children?: import("react").ReactNode;
|
|
332
|
-
}>;
|
|
333
|
-
state: Readonly<any>;
|
|
334
|
-
refs: {
|
|
335
|
-
[key: string]: import("react").ReactInstance;
|
|
336
|
-
};
|
|
337
|
-
componentDidMount?(): void;
|
|
338
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
339
|
-
componentWillUnmount?(): void;
|
|
340
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
341
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
342
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
343
|
-
componentWillMount?(): void;
|
|
344
|
-
UNSAFE_componentWillMount?(): void;
|
|
345
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
346
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
347
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
348
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
349
|
-
};
|
|
350
|
-
new (props: any, context: any): {
|
|
351
|
-
handleSelect: (event: any) => any;
|
|
352
|
-
render(): JSX.Element;
|
|
353
|
-
context: any;
|
|
354
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
355
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
356
|
-
readonly props: Readonly<any> & Readonly<{
|
|
357
|
-
children?: import("react").ReactNode;
|
|
358
|
-
}>;
|
|
359
|
-
state: Readonly<any>;
|
|
360
|
-
refs: {
|
|
361
|
-
[key: string]: import("react").ReactInstance;
|
|
362
|
-
};
|
|
363
|
-
componentDidMount?(): void;
|
|
364
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
365
|
-
componentWillUnmount?(): void;
|
|
366
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
367
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
368
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
369
|
-
componentWillMount?(): void;
|
|
370
|
-
UNSAFE_componentWillMount?(): void;
|
|
371
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
372
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
373
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
374
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
375
|
-
};
|
|
376
|
-
propTypes: any;
|
|
377
|
-
contextType?: import("react").Context<any> | undefined;
|
|
378
|
-
};
|
|
379
|
-
export { default as Paragraph } from "./Paragraph";
|
|
380
|
-
export { default as HeadingDropdown } from "./HeadingDropdown";
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as Slate from 'slate-react';
|
|
3
|
+
import { BLOCKS } from '@contentful/rich-text-types';
|
|
4
|
+
import { PlatePlugin, PlateEditor } from '@udecode/plate-core';
|
|
5
|
+
import { CustomSlatePluginOptions } from '../../types';
|
|
6
|
+
export declare function withHeadingEvents(editor: PlateEditor): (event: React.KeyboardEvent) => void;
|
|
7
|
+
interface ToolbarHeadingButtonProps {
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function ToolbarHeadingButton(props: ToolbarHeadingButtonProps): JSX.Element | null;
|
|
11
|
+
export declare function createHeading(Tag: any, block: BLOCKS): (props: Slate.RenderElementProps) => JSX.Element;
|
|
12
|
+
export declare const H1: (props: Slate.RenderElementProps) => JSX.Element;
|
|
13
|
+
export declare const H2: (props: Slate.RenderElementProps) => JSX.Element;
|
|
14
|
+
export declare const H3: (props: Slate.RenderElementProps) => JSX.Element;
|
|
15
|
+
export declare const H4: (props: Slate.RenderElementProps) => JSX.Element;
|
|
16
|
+
export declare const H5: (props: Slate.RenderElementProps) => JSX.Element;
|
|
17
|
+
export declare const H6: (props: Slate.RenderElementProps) => JSX.Element;
|
|
18
|
+
export declare function createHeadingPlugin(): PlatePlugin;
|
|
19
|
+
export declare const withHeadingOptions: CustomSlatePluginOptions;
|
|
20
|
+
export {};
|
|
@@ -1,61 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
state: Readonly<any>;
|
|
15
|
-
refs: {
|
|
16
|
-
[key: string]: React.ReactInstance;
|
|
17
|
-
};
|
|
18
|
-
componentDidMount?(): void;
|
|
19
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
20
|
-
componentWillUnmount?(): void;
|
|
21
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
22
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
23
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
24
|
-
componentWillMount?(): void;
|
|
25
|
-
UNSAFE_componentWillMount?(): void;
|
|
26
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
27
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
28
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
29
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
30
|
-
};
|
|
31
|
-
new (props: any, context: any): {
|
|
32
|
-
handleSelect: (event: any) => any;
|
|
33
|
-
render(): JSX.Element;
|
|
34
|
-
context: any;
|
|
35
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
36
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
37
|
-
readonly props: Readonly<any> & Readonly<{
|
|
38
|
-
children?: React.ReactNode;
|
|
39
|
-
}>;
|
|
40
|
-
state: Readonly<any>;
|
|
41
|
-
refs: {
|
|
42
|
-
[key: string]: React.ReactInstance;
|
|
43
|
-
};
|
|
44
|
-
componentDidMount?(): void;
|
|
45
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
46
|
-
componentWillUnmount?(): void;
|
|
47
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
48
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
49
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
50
|
-
componentWillMount?(): void;
|
|
51
|
-
UNSAFE_componentWillMount?(): void;
|
|
52
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
53
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
54
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
55
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
56
|
-
};
|
|
57
|
-
propTypes: any;
|
|
58
|
-
contextType?: React.Context<any> | undefined;
|
|
59
|
-
};
|
|
60
|
-
export default _default;
|
|
61
|
-
import React from "react";
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as Slate from 'slate-react';
|
|
3
|
+
import { PlatePlugin, PlateEditor } from '@udecode/plate-core';
|
|
4
|
+
import { CustomSlatePluginOptions } from '../../types';
|
|
5
|
+
interface ToolbarHrButtonProps {
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function withHrEvents(editor: PlateEditor): (event: React.KeyboardEvent) => void;
|
|
9
|
+
export declare function ToolbarHrButton(props: ToolbarHrButtonProps): JSX.Element | null;
|
|
10
|
+
export declare function Hr(props: Slate.RenderLeafProps): JSX.Element;
|
|
11
|
+
export declare function createHrPlugin(): PlatePlugin;
|
|
12
|
+
export declare const withHrOptions: CustomSlatePluginOptions;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ContentEntityType as EntityType } from '@contentful/field-editor-reference/dist/types';
|
|
3
|
+
import { FieldExtensionSDK } from '@contentful/field-editor-shared';
|
|
4
|
+
interface EntryAssetTooltipProps {
|
|
5
|
+
id: string;
|
|
6
|
+
type: EntityType;
|
|
7
|
+
sdk: FieldExtensionSDK;
|
|
8
|
+
}
|
|
9
|
+
export declare function EntryAssetTooltip({ id, type, sdk }: EntryAssetTooltipProps): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FieldExtensionSDK } from '@contentful/field-editor-shared';
|
|
3
|
+
import { PlateEditor } from '@udecode/plate-core';
|
|
4
|
+
import { ReactEditor } from 'slate-react';
|
|
5
|
+
import { HistoryEditor } from 'slate-history';
|
|
6
|
+
import { Link } from '@contentful/field-editor-reference/dist/types';
|
|
7
|
+
interface HyperlinkModalProps {
|
|
8
|
+
linkText?: string;
|
|
9
|
+
linkType?: string;
|
|
10
|
+
linkTarget?: string;
|
|
11
|
+
linkEntity?: Link;
|
|
12
|
+
onClose: (value: unknown) => void;
|
|
13
|
+
sdk: FieldExtensionSDK;
|
|
14
|
+
}
|
|
15
|
+
export declare function HyperlinkModal(props: HyperlinkModalProps): JSX.Element;
|
|
16
|
+
export declare function addOrEditLink(editor: ReactEditor & HistoryEditor & PlateEditor, sdk: FieldExtensionSDK): Promise<void>;
|
|
17
|
+
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PlatePlugin } from '@udecode/plate-core';
|
|
3
|
+
import { FieldExtensionSDK } from '@contentful/app-sdk';
|
|
4
|
+
import { CustomSlatePluginOptions } from '../../types';
|
|
5
|
+
export declare function createHyperlinkPlugin(sdk: FieldExtensionSDK): PlatePlugin;
|
|
6
|
+
export declare function buildHyperlinkEventHandler(sdk: any): (editor: any) => (event: React.KeyboardEvent) => void;
|
|
7
|
+
interface ToolbarHyperlinkButtonProps {
|
|
8
|
+
isDisabled: boolean | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare function ToolbarHyperlinkButton(props: ToolbarHyperlinkButtonProps): JSX.Element | null;
|
|
11
|
+
export declare const withHyperlinkOptions: CustomSlatePluginOptions;
|
|
12
|
+
export {};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
1
|
+
import { PlatePlugin } from '@udecode/plate-core';
|
|
2
|
+
export declare function createInsertBeforeFirstVoidBlockPlugin(): PlatePlugin;
|
|
@@ -1,64 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
14
|
-
readonly props: Readonly<any> & Readonly<{
|
|
15
|
-
children?: React.ReactNode;
|
|
16
|
-
}>;
|
|
17
|
-
state: Readonly<any>;
|
|
18
|
-
refs: {
|
|
19
|
-
[key: string]: React.ReactInstance;
|
|
20
|
-
};
|
|
21
|
-
componentDidMount?(): void;
|
|
22
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
23
|
-
componentWillUnmount?(): void;
|
|
24
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
25
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
26
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
27
|
-
componentWillMount?(): void;
|
|
28
|
-
UNSAFE_componentWillMount?(): void;
|
|
29
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
30
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
31
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
32
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
33
|
-
};
|
|
34
|
-
new (props: any, context: any): {
|
|
35
|
-
handleToggle: (event: any) => any;
|
|
36
|
-
render(): JSX.Element;
|
|
37
|
-
context: any;
|
|
38
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
39
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
40
|
-
readonly props: Readonly<any> & Readonly<{
|
|
41
|
-
children?: React.ReactNode;
|
|
42
|
-
}>;
|
|
43
|
-
state: Readonly<any>;
|
|
44
|
-
refs: {
|
|
45
|
-
[key: string]: React.ReactInstance;
|
|
46
|
-
};
|
|
47
|
-
componentDidMount?(): void;
|
|
48
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
49
|
-
componentWillUnmount?(): void;
|
|
50
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
51
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
52
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
53
|
-
componentWillMount?(): void;
|
|
54
|
-
UNSAFE_componentWillMount?(): void;
|
|
55
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
56
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
57
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
58
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
59
|
-
};
|
|
60
|
-
propTypes: any;
|
|
61
|
-
contextType?: React.Context<any> | undefined;
|
|
62
|
-
};
|
|
63
|
-
export default _default;
|
|
64
|
-
import React from "react";
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as Slate from 'slate-react';
|
|
3
|
+
import { PlatePlugin } from '@udecode/plate-core';
|
|
4
|
+
import { CustomSlatePluginOptions } from '../../types';
|
|
5
|
+
interface ToolbarItalicButtonProps {
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function ToolbarItalicButton(props: ToolbarItalicButtonProps): JSX.Element | null;
|
|
9
|
+
export declare function Italic(props: Slate.RenderLeafProps): JSX.Element;
|
|
10
|
+
export declare function createItalicPlugin(): PlatePlugin;
|
|
11
|
+
export declare const withItalicOptions: CustomSlatePluginOptions;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A copy of Plate's list plugin with a few adjustments
|
|
3
|
+
* to fix pasting text inside lists.
|
|
4
|
+
*/
|
|
5
|
+
import { PlateEditor, TDescendant } from '@udecode/plate-core';
|
|
6
|
+
export declare const getListInsertFragment: (editor: PlateEditor) => (fragment: TDescendant[]) => void;
|