@contentful/field-editor-rich-text 1.0.0-alpha.3 → 2.0.0-next.0
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 +410 -0
- package/README.md +9 -20
- package/dist/ContentfulEditorProvider.d.ts +8 -0
- package/dist/RichTextEditor.d.ts +19 -70
- 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 -28
- package/dist/TrackingProvider.d.ts +11 -0
- package/dist/constants/Schema.d.ts +93 -11
- package/dist/dialogs/HypelinkDialog/HyperlinkDialog.d.ts +54 -0
- package/dist/dialogs/openRichTextDialog.d.ts +2 -0
- package/dist/dialogs/renderRichTextDialog.d.ts +3 -0
- package/dist/field-editor-rich-text.cjs.development.js +4690 -4354
- 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 +4674 -4338
- 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 +35 -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/sanitizeSlateDoc.d.ts +18 -0
- package/dist/helpers/truncate.d.ts +1 -0
- package/dist/helpers/validations.d.ts +10 -0
- package/dist/index.d.ts +2 -2
- package/dist/plugins/Bold/index.d.ts +12 -64
- package/dist/plugins/Code/index.d.ts +12 -64
- package/dist/plugins/CommandPalette/CommandPanel/InViewport/InViewport.d.ts +37 -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 -27
- 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 -50
- 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/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 +4 -0
- package/dist/plugins/Table/index.d.ts +186 -0
- package/dist/plugins/TrailingParagraph/index.d.ts +1 -0
- package/dist/plugins/Underline/index.d.ts +12 -0
- 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 +15 -0
- package/dist/types.d.ts +25 -0
- package/package.json +44 -31
- 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 -13
- package/dist/plugins/CommandPalette/CommandPalette.d.ts +0 -14
- package/dist/plugins/CommandPalette/CommandPaletteService.d.ts +0 -12
- package/dist/plugins/CommandPalette/CommandPanel/CommandPanelMenu.d.ts +0 -48
- package/dist/plugins/CommandPalette/CommandPanel/index.d.ts +0 -51
- 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 -29
- package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.d.ts +0 -29
- 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 -13
- package/dist/plugins/EntryEmbedDropdown/index.d.ts +0 -15
- package/dist/plugins/Heading/Heading1.d.ts +0 -2
- package/dist/plugins/Heading/Heading2.d.ts +0 -2
- package/dist/plugins/Heading/Heading3.d.ts +0 -2
- package/dist/plugins/Heading/Heading4.d.ts +0 -2
- package/dist/plugins/Heading/Heading5.d.ts +0 -2
- package/dist/plugins/Heading/Heading6.d.ts +0 -2
- package/dist/plugins/Heading/HeadingDropdown.d.ts +0 -29
- package/dist/plugins/Heading/Paragraph.d.ts +0 -2
- package/dist/plugins/Hyperlink/Hyperlink.d.ts +0 -25
- package/dist/plugins/Hyperlink/ToolbarIcon.d.ts +0 -8
- package/dist/plugins/Hyperlink/Util.d.ts +0 -43
- package/dist/plugins/Hyperlink/styles.d.ts +0 -7
- 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/index.d.ts +0 -1
- 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 -26
- package/dist/plugins/shared/PropTypes.d.ts +0 -15
- package/dist/plugins/shared/ToolbarDropdownListItem.d.ts +0 -15
- package/dist/plugins/shared/ToolbarIcon.d.ts +0 -16
- 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,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: (e: any) => void;
|
|
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, SPEditor } from '@udecode/plate-core';
|
|
4
|
+
import { CustomSlatePluginOptions } from '../../types';
|
|
5
|
+
interface ToolbarHrButtonProps {
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function withHrEvents(editor: SPEditor): (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 { SPEditor } 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 & SPEditor, 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: (e: any) => void;
|
|
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 {};
|
|
@@ -1,114 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
componentDidMount?(): void;
|
|
17
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
18
|
-
componentWillUnmount?(): void;
|
|
19
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
20
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
21
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
22
|
-
componentWillMount?(): void;
|
|
23
|
-
UNSAFE_componentWillMount?(): void;
|
|
24
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
25
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
26
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
27
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
28
|
-
};
|
|
29
|
-
new (props: any, context?: any): {
|
|
30
|
-
handleToggle: (e: any) => void;
|
|
31
|
-
render(): JSX.Element;
|
|
32
|
-
context: any;
|
|
33
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
34
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
35
|
-
readonly props: Readonly<any> & Readonly<{
|
|
36
|
-
children?: React.ReactNode;
|
|
37
|
-
}>;
|
|
38
|
-
state: Readonly<any>;
|
|
39
|
-
refs: {
|
|
40
|
-
[key: string]: React.ReactInstance;
|
|
41
|
-
};
|
|
42
|
-
componentDidMount?(): void;
|
|
43
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
44
|
-
componentWillUnmount?(): void;
|
|
45
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
46
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
47
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
48
|
-
componentWillMount?(): void;
|
|
49
|
-
UNSAFE_componentWillMount?(): void;
|
|
50
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
51
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
52
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
53
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
54
|
-
};
|
|
55
|
-
propTypes: any;
|
|
56
|
-
contextType?: React.Context<any> | undefined;
|
|
57
|
-
};
|
|
58
|
-
export const OrderedList: {
|
|
59
|
-
new (props: Readonly<any>): {
|
|
60
|
-
handleToggle: (e: any) => void;
|
|
61
|
-
render(): JSX.Element;
|
|
62
|
-
context: any;
|
|
63
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
64
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
65
|
-
readonly props: Readonly<any> & Readonly<{
|
|
66
|
-
children?: React.ReactNode;
|
|
67
|
-
}>;
|
|
68
|
-
state: Readonly<any>;
|
|
69
|
-
refs: {
|
|
70
|
-
[key: string]: React.ReactInstance;
|
|
71
|
-
};
|
|
72
|
-
componentDidMount?(): void;
|
|
73
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
74
|
-
componentWillUnmount?(): void;
|
|
75
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
76
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
77
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
78
|
-
componentWillMount?(): void;
|
|
79
|
-
UNSAFE_componentWillMount?(): void;
|
|
80
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
81
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
82
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
83
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
84
|
-
};
|
|
85
|
-
new (props: any, context?: any): {
|
|
86
|
-
handleToggle: (e: any) => void;
|
|
87
|
-
render(): JSX.Element;
|
|
88
|
-
context: any;
|
|
89
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
90
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
91
|
-
readonly props: Readonly<any> & Readonly<{
|
|
92
|
-
children?: React.ReactNode;
|
|
93
|
-
}>;
|
|
94
|
-
state: Readonly<any>;
|
|
95
|
-
refs: {
|
|
96
|
-
[key: string]: React.ReactInstance;
|
|
97
|
-
};
|
|
98
|
-
componentDidMount?(): void;
|
|
99
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
100
|
-
componentWillUnmount?(): void;
|
|
101
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
102
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
103
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
104
|
-
componentWillMount?(): void;
|
|
105
|
-
UNSAFE_componentWillMount?(): void;
|
|
106
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
107
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
108
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
109
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
110
|
-
};
|
|
111
|
-
propTypes: any;
|
|
112
|
-
contextType?: React.Context<any> | undefined;
|
|
113
|
-
};
|
|
114
|
-
import React from "react";
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as Slate from 'slate-react';
|
|
3
|
+
import { BLOCKS } from '@contentful/rich-text-types';
|
|
4
|
+
import { CustomSlatePluginOptions } from '../../types';
|
|
5
|
+
interface ToolbarListButtonProps {
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function ToolbarListButton(props: ToolbarListButtonProps): JSX.Element | null;
|
|
9
|
+
export declare function createList(Tag: any, block: BLOCKS): (props: Slate.RenderElementProps) => JSX.Element;
|
|
10
|
+
export declare const UL: (props: Slate.RenderElementProps) => JSX.Element;
|
|
11
|
+
export declare const OL: (props: Slate.RenderElementProps) => JSX.Element;
|
|
12
|
+
export declare const LI: (props: Slate.RenderElementProps) => JSX.Element;
|
|
13
|
+
export declare const withListOptions: CustomSlatePluginOptions;
|
|
14
|
+
export declare const createListPlugin: () => import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").SPEditor>;
|
|
15
|
+
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RenderElementProps } from 'slate-react';
|
|
3
|
+
import { PlatePlugin } from '@udecode/plate-core';
|
|
4
|
+
import { CustomSlatePluginOptions } from '../../types';
|
|
5
|
+
export declare function Paragraph(props: RenderElementProps): JSX.Element;
|
|
6
|
+
export declare function createParagraphPlugin(): PlatePlugin;
|
|
7
|
+
export declare const withParagraphOptions: CustomSlatePluginOptions;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
logShortcutAction: any;
|
|
4
|
-
};
|
|
5
|
-
}): {
|
|
6
|
-
onPaste(_event: any, editor: any, next: any): void;
|
|
7
|
-
};
|
|
1
|
+
import { PlatePlugin } from '@udecode/plate-core';
|
|
2
|
+
export declare const createPastePlugin: () => PlatePlugin;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SPEditor } from '@udecode/plate-core';
|
|
2
|
+
export declare type SanitizerTuple = [Document, SPEditor];
|
|
3
|
+
declare type Predicate = (node: ChildNode) => boolean;
|
|
4
|
+
export declare const isHTMLElement: (node: ChildNode) => node is HTMLElement;
|
|
5
|
+
export declare const removeChildNodes: (node: ChildNode, predicate?: Predicate) => void;
|
|
6
|
+
export declare const removeChildNodesUsingPredicate: (predicate: Predicate) => (nodeList: NodeList) => Node[];
|
|
7
|
+
export {};
|
|
@@ -1,59 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
componentDidMount?(): void;
|
|
16
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
17
|
-
componentWillUnmount?(): void;
|
|
18
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
19
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
20
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
21
|
-
componentWillMount?(): void;
|
|
22
|
-
UNSAFE_componentWillMount?(): void;
|
|
23
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
24
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
25
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
26
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
27
|
-
};
|
|
28
|
-
new (props: any, context?: any): {
|
|
29
|
-
handleToggle: (e: any) => void;
|
|
30
|
-
render(): JSX.Element;
|
|
31
|
-
context: any;
|
|
32
|
-
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
33
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
34
|
-
readonly props: Readonly<any> & Readonly<{
|
|
35
|
-
children?: React.ReactNode;
|
|
36
|
-
}>;
|
|
37
|
-
state: Readonly<any>;
|
|
38
|
-
refs: {
|
|
39
|
-
[key: string]: React.ReactInstance;
|
|
40
|
-
};
|
|
41
|
-
componentDidMount?(): void;
|
|
42
|
-
shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
43
|
-
componentWillUnmount?(): void;
|
|
44
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
45
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
|
|
46
|
-
componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
|
|
47
|
-
componentWillMount?(): void;
|
|
48
|
-
UNSAFE_componentWillMount?(): void;
|
|
49
|
-
componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
50
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
|
|
51
|
-
componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
52
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
|
|
53
|
-
};
|
|
54
|
-
propTypes: any;
|
|
55
|
-
contextType?: React.Context<any> | undefined;
|
|
56
|
-
};
|
|
57
|
-
export default _default;
|
|
58
|
-
export { default as QuotePlugin } from "./QuotePlugin";
|
|
59
|
-
import React from "react";
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as Slate from 'slate-react';
|
|
3
|
+
import { PlatePlugin, SPEditor } from '@udecode/plate-core';
|
|
4
|
+
import { CustomSlatePluginOptions } from 'types';
|
|
5
|
+
interface ToolbarQuoteButtonProps {
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function withQuoteEvents(editor: SPEditor): (event: React.KeyboardEvent) => void;
|
|
9
|
+
export declare function ToolbarQuoteButton(props: ToolbarQuoteButtonProps): JSX.Element | null;
|
|
10
|
+
export declare function Quote(props: Slate.RenderLeafProps): JSX.Element;
|
|
11
|
+
export declare function createQuotePlugin(): PlatePlugin;
|
|
12
|
+
export declare const withQuoteOptions: CustomSlatePluginOptions;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SPEditor } from '@udecode/plate-core';
|
|
2
|
+
import { TablePluginOptions } from '@udecode/plate-table';
|
|
3
|
+
export declare const addColumnRight: (editor: SPEditor, options: TablePluginOptions) => void;
|
|
4
|
+
export declare const addColumnLeft: (editor: SPEditor, options: TablePluginOptions) => void;
|