@atlaskit/editor-plugin-paste 12.1.15 → 12.1.16
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 +6 -0
- package/package.json +2 -2
- package/paste-plugin/package.json +1 -8
- package/paste-plugin-type/package.json +1 -8
- package/dist/types-ts4.5/editor-actions/actions.d.ts +0 -26
- package/dist/types-ts4.5/editor-commands/commands.d.ts +0 -32
- package/dist/types-ts4.5/entry-points/paste-plugin-type.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/paste-plugin.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -2
- package/dist/types-ts4.5/pastePlugin.d.ts +0 -2
- package/dist/types-ts4.5/pastePluginType.d.ts +0 -77
- package/dist/types-ts4.5/pm-plugins/analytics.d.ts +0 -45
- package/dist/types-ts4.5/pm-plugins/clipboard-parser.d.ts +0 -7
- package/dist/types-ts4.5/pm-plugins/create-clipboard-text-serializer.d.ts +0 -13
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -14
- package/dist/types-ts4.5/pm-plugins/media.d.ts +0 -25
- package/dist/types-ts4.5/pm-plugins/move-analytics/actions.d.ts +0 -14
- package/dist/types-ts4.5/pm-plugins/move-analytics/commands.d.ts +0 -6
- package/dist/types-ts4.5/pm-plugins/move-analytics/plugin-factory.d.ts +0 -8
- package/dist/types-ts4.5/pm-plugins/move-analytics/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/move-analytics/plugin.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/move-analytics/reducer.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/move-analytics/types.d.ts +0 -13
- package/dist/types-ts4.5/pm-plugins/move-analytics/utils.d.ts +0 -14
- package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/reducer.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/util/edge-cases/handleVSCodeBlock.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/util/edge-cases/index.d.ts +0 -18
- package/dist/types-ts4.5/pm-plugins/util/edge-cases/lists.d.ts +0 -19
- package/dist/types-ts4.5/pm-plugins/util/handlers.d.ts +0 -62
- package/dist/types-ts4.5/pm-plugins/util/index.d.ts +0 -46
- package/dist/types-ts4.5/pm-plugins/util/normalize-pasted-code-block-attrs.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/util/sync-block.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/util/tinyMCE.d.ts +0 -32
- package/dist/types-ts4.5/ui/Flag.d.ts +0 -8
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.16",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@atlaskit/media-common": "^13.3.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
51
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^103.0.0",
|
|
53
53
|
"@atlaskit/tokens": "^13.4.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"lodash": "^4.17.21",
|
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/paste-plugin.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/paste-plugin.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/paste-plugin.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/paste-plugin.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/paste-plugin.d.ts"
|
|
15
8
|
}
|
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/paste-plugin-type.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/paste-plugin-type.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/paste-plugin-type.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/paste-plugin-type.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/paste-plugin-type.d.ts"
|
|
15
8
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { LastContentPasted, ActiveFlag } from '../pastePluginType';
|
|
2
|
-
export declare enum PastePluginActionTypes {
|
|
3
|
-
START_TRACKING_PASTED_MACRO_POSITIONS = "START_TRACKING_PASTED_MACRO_POSITIONS",
|
|
4
|
-
STOP_TRACKING_PASTED_MACRO_POSITIONS = "STOP_TRACKING_PASTED_MACRO_POSITIONS",
|
|
5
|
-
ON_PASTE = "ON_PASTE",
|
|
6
|
-
SET_ACTIVE_FLAG = "SET_ACTIVE_FLAG"
|
|
7
|
-
}
|
|
8
|
-
export interface StartTrackingPastedMacroPositions {
|
|
9
|
-
pastedMacroPositions: {
|
|
10
|
-
[key: string]: number;
|
|
11
|
-
};
|
|
12
|
-
type: PastePluginActionTypes.START_TRACKING_PASTED_MACRO_POSITIONS;
|
|
13
|
-
}
|
|
14
|
-
export interface OnPaste {
|
|
15
|
-
contentPasted: LastContentPasted;
|
|
16
|
-
type: PastePluginActionTypes.ON_PASTE;
|
|
17
|
-
}
|
|
18
|
-
export interface StopTrackingPastedMacroPositions {
|
|
19
|
-
pastedMacroPositionKeys: string[];
|
|
20
|
-
type: PastePluginActionTypes.STOP_TRACKING_PASTED_MACRO_POSITIONS;
|
|
21
|
-
}
|
|
22
|
-
export interface SetActiveFlag {
|
|
23
|
-
activeFlag: ActiveFlag;
|
|
24
|
-
type: PastePluginActionTypes.SET_ACTIVE_FLAG;
|
|
25
|
-
}
|
|
26
|
-
export type PastePluginAction = StartTrackingPastedMacroPositions | StopTrackingPastedMacroPositions | OnPaste | SetActiveFlag;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
|
-
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { Mark, Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
/**
|
|
5
|
-
* Use this to register macro link positions during a paste operation, that you
|
|
6
|
-
* want to track in a document over time, through any document changes.
|
|
7
|
-
*
|
|
8
|
-
* @param positions a map of string keys (custom position references) and position values e.g. { ['my-key-1']: 11 }
|
|
9
|
-
*
|
|
10
|
-
* **Context**: This is neccessary if there is an async process or an unknown period of time
|
|
11
|
-
* between obtaining an original position, and wanting to know about what its final eventual
|
|
12
|
-
* value. In that scenario, positions will need to be actively tracked and mapped in plugin
|
|
13
|
-
* state so that they can be mapped through any other independent document change transactions being
|
|
14
|
-
* dispatched to the editor that could affect their value.
|
|
15
|
-
*/
|
|
16
|
-
export declare const startTrackingPastedMacroPositions: (pastedMacroPositions: {
|
|
17
|
-
[key: string]: number;
|
|
18
|
-
}) => Command;
|
|
19
|
-
export declare const stopTrackingPastedMacroPositions: (pastedMacroPositionKeys: string[]) => Command;
|
|
20
|
-
export declare const _contentSplitByHardBreaks: (content: Array<Node>, schema: Schema) => Array<Node>[];
|
|
21
|
-
export declare const extractListFromParagraph: (node: Node, parent: Node | null, schema: Schema) => Fragment;
|
|
22
|
-
export declare const upgradeTextToLists: (slice: Slice, schema: Schema) => Slice;
|
|
23
|
-
export declare const splitParagraphs: (slice: Slice, schema: Schema) => Slice;
|
|
24
|
-
/**
|
|
25
|
-
* Walks the slice, creating paragraphs that were previously separated by hardbreaks.
|
|
26
|
-
* Returns the original paragraph node (as a fragment), or a fragment containing multiple nodes.
|
|
27
|
-
*/
|
|
28
|
-
export declare const splitIntoParagraphs: ({ fragment, blockMarks, schema, }: {
|
|
29
|
-
blockMarks?: readonly Mark[];
|
|
30
|
-
fragment: Fragment;
|
|
31
|
-
schema: Schema;
|
|
32
|
-
}) => Fragment;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { PastePlugin, PastePluginOptions, PastePluginState, LastContentPasted, PastePluginDependencies, ActiveFlag, } from '../pastePluginType';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { pastePlugin } from '../pastePlugin';
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import type { MessageDescriptor } from 'react-intl';
|
|
2
|
-
import type { PasteSource } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
4
|
-
import type { NextEditorPlugin, OptionalPlugin, PasteWarningOptions } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
|
-
import type { AnnotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
7
|
-
import type { BetterTypeHistoryPlugin } from '@atlaskit/editor-plugin-better-type-history';
|
|
8
|
-
import type { CardPlugin } from '@atlaskit/editor-plugin-card';
|
|
9
|
-
import type { ExpandPlugin } from '@atlaskit/editor-plugin-expand';
|
|
10
|
-
import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
11
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
12
|
-
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
13
|
-
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
14
|
-
import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
|
|
15
|
-
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
16
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
17
|
-
export declare enum FLAG_TYPE {
|
|
18
|
-
WARNING = "warning",
|
|
19
|
-
ERROR = "error",
|
|
20
|
-
INFO = "info",
|
|
21
|
-
SUCCESS = "success"
|
|
22
|
-
}
|
|
23
|
-
type FlagConfig = {
|
|
24
|
-
description: MessageDescriptor;
|
|
25
|
-
id: string;
|
|
26
|
-
onDismissed?: (tr: Transaction) => Transaction | void;
|
|
27
|
-
title: MessageDescriptor;
|
|
28
|
-
type: FLAG_TYPE;
|
|
29
|
-
urlHref?: string;
|
|
30
|
-
urlText?: MessageDescriptor;
|
|
31
|
-
};
|
|
32
|
-
export type ActiveFlag = FlagConfig | false;
|
|
33
|
-
export interface PastePluginState {
|
|
34
|
-
activeFlag: ActiveFlag | null;
|
|
35
|
-
lastContentPasted: LastContentPasted | null;
|
|
36
|
-
/** map of pasted macro link positions that will to be mapped through incoming transactions */
|
|
37
|
-
pastedMacroPositions: {
|
|
38
|
-
[key: string]: number;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export type LastContentPasted = {
|
|
42
|
-
isPlainText: boolean;
|
|
43
|
-
isShiftPressed: boolean;
|
|
44
|
-
pastedAt: number;
|
|
45
|
-
pastedSlice: Slice;
|
|
46
|
-
pasteEndPos: number;
|
|
47
|
-
pasteSource: PasteSource;
|
|
48
|
-
pasteStartPos: number;
|
|
49
|
-
text?: string;
|
|
50
|
-
};
|
|
51
|
-
export type PastePluginOptions = {
|
|
52
|
-
cardOptions?: CardOptions;
|
|
53
|
-
isFullPage?: boolean;
|
|
54
|
-
pasteWarningOptions?: PasteWarningOptions;
|
|
55
|
-
sanitizePrivateContent?: boolean;
|
|
56
|
-
};
|
|
57
|
-
export type PastePluginDependencies = [
|
|
58
|
-
OptionalPlugin<FeatureFlagsPlugin>,
|
|
59
|
-
OptionalPlugin<ListPlugin>,
|
|
60
|
-
BetterTypeHistoryPlugin,
|
|
61
|
-
OptionalPlugin<CardPlugin>,
|
|
62
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
63
|
-
OptionalPlugin<MediaPlugin>,
|
|
64
|
-
OptionalPlugin<ExtensionPlugin>,
|
|
65
|
-
OptionalPlugin<AnnotationPlugin>,
|
|
66
|
-
OptionalPlugin<MentionsPlugin>,
|
|
67
|
-
OptionalPlugin<ExpandPlugin>
|
|
68
|
-
];
|
|
69
|
-
export type PastePlugin = NextEditorPlugin<'paste', {
|
|
70
|
-
dependencies: PastePluginDependencies;
|
|
71
|
-
pluginConfiguration: PastePluginOptions;
|
|
72
|
-
sharedState: {
|
|
73
|
-
activeFlag: ActiveFlag | null;
|
|
74
|
-
lastContentPasted: LastContentPasted | null;
|
|
75
|
-
};
|
|
76
|
-
}>;
|
|
77
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { AnalyticsEventPayload, EditorAnalyticsAPI, PasteContent, PasteType } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { FindRootParentListNode } from '@atlaskit/editor-plugin-list';
|
|
4
|
-
import type { InsertMediaAsMediaSingle } from '@atlaskit/editor-plugin-media/types';
|
|
5
|
-
import type { Fragment, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import type { PastePlugin } from '../index';
|
|
8
|
-
type PasteContext = {
|
|
9
|
-
asPlain?: boolean;
|
|
10
|
-
/** Has the hyperlink been pasted while text is selected, making the text into a link? */
|
|
11
|
-
hyperlinkPasteOnText?: boolean;
|
|
12
|
-
/** Did this paste action split a list in half? */
|
|
13
|
-
pasteSplitList?: boolean;
|
|
14
|
-
type: PasteType;
|
|
15
|
-
};
|
|
16
|
-
type GetContentProps = {
|
|
17
|
-
schema: Schema;
|
|
18
|
-
slice: Slice;
|
|
19
|
-
};
|
|
20
|
-
export declare function getContent({ schema, slice }: GetContentProps): PasteContent;
|
|
21
|
-
export declare function getMediaTraceId(slice: Slice): undefined;
|
|
22
|
-
export declare function createPasteAnalyticsPayload(view: EditorView, event: ClipboardEvent, slice: Slice, pasteContext: PasteContext): AnalyticsEventPayload;
|
|
23
|
-
export declare const sendPasteAnalyticsEvent: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, pasteContext: PasteContext) => void;
|
|
24
|
-
export declare const handlePasteAsPlainTextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
25
|
-
export declare const handlePasteIntoTaskAndDecisionWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, pluginInjectionApi: ExtractInjectionAPI<PastePlugin> | undefined) => Command;
|
|
26
|
-
export declare const handlePasteIntoCaptionWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
|
|
27
|
-
export declare const handleCodeBlockWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, text: string) => Command;
|
|
28
|
-
export declare const handleMediaSingleWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, insertMediaAsMediaSingle: InsertMediaAsMediaSingle | undefined) => Command;
|
|
29
|
-
export declare const handlePastePreservingMarksWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, pluginInjectionApi: ExtractInjectionAPI<PastePlugin> | undefined) => Command;
|
|
30
|
-
export declare const handleMarkdownWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<PastePlugin> | undefined) => Command;
|
|
31
|
-
export declare const handleRichTextWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<PastePlugin> | undefined) => Command;
|
|
32
|
-
export declare const handlePastePanelOrDecisionIntoListWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, findRootParentListNode: FindRootParentListNode | undefined) => Command;
|
|
33
|
-
export declare const handlePasteNonNestableBlockNodesIntoListWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
34
|
-
export declare const handleExpandWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
35
|
-
export declare const handleNestedTablePasteWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, isNestingTablesSupported: boolean) => (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
36
|
-
export declare const handleSelectedTableWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice) => Command;
|
|
37
|
-
export declare const handlePasteLinkOnSelectedTextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
|
|
38
|
-
export declare const createPasteMeasurePayload: ({ view, duration, content, distortedDuration, }: {
|
|
39
|
-
content: Array<string>;
|
|
40
|
-
distortedDuration: boolean;
|
|
41
|
-
duration: number;
|
|
42
|
-
view: EditorView;
|
|
43
|
-
}) => AnalyticsEventPayload;
|
|
44
|
-
export declare const getContentNodeTypes: (content: Fragment) => string[];
|
|
45
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DOMParser as PMDOMParser } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
/**
|
|
4
|
-
* Creates a ProseMirror plugin with a custom `clipboardParser` that extends the
|
|
5
|
-
* schema's default parser with additional rules for handling specific paste scenarios.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createClipboardParser(schema: Schema): PMDOMParser | undefined;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl';
|
|
2
|
-
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
/**
|
|
4
|
-
* Returns a plain text serialization of a given slice. This is used for populating the plain text
|
|
5
|
-
* section of the clipboard on copy.
|
|
6
|
-
* The current implementation is bare bones - only inlineCards, blockCards and mentions are tested (they
|
|
7
|
-
* previously were empty on plain text copy).
|
|
8
|
-
*
|
|
9
|
-
* By default (without this function passed to the editor), the editor uses
|
|
10
|
-
* `slice.content.textBetween(0, slice.content.size, "\n\n")`
|
|
11
|
-
* (see https://prosemirror.net/docs/ref/#view.EditorProps.clipboardTextSerializer)
|
|
12
|
-
*/
|
|
13
|
-
export declare function createClipboardTextSerializer(intl: IntlShape): (slice: Slice) => string;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl';
|
|
2
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
4
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
|
-
import type { ExtractInjectionAPI, FeatureFlags, PasteWarningOptions } from '@atlaskit/editor-common/types';
|
|
8
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
9
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
10
|
-
import type { PastePlugin } from '../index';
|
|
11
|
-
import type { PastePluginState } from '../pastePluginType';
|
|
12
|
-
export declare const isInsideBlockQuote: (state: EditorState) => boolean;
|
|
13
|
-
export declare function isSharePointUrl(url: string | undefined): boolean;
|
|
14
|
-
export declare function createPlugin(schema: Schema, dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<PastePlugin> | undefined, getIntl: () => IntlShape, cardOptions?: CardOptions, sanitizePrivateContent?: boolean, providerFactory?: ProviderFactory, pasteWarningOptions?: PasteWarningOptions): SafePlugin<PastePluginState>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { PastePlugin } from '../pastePluginType';
|
|
5
|
-
/**
|
|
6
|
-
* Ensure correct layout in nested mode
|
|
7
|
-
*
|
|
8
|
-
* TODO: ED-26959 - this func is only used in handlePaste, so layout update won't work for drop event
|
|
9
|
-
*/
|
|
10
|
-
export declare function transformSliceForMedia(slice: Slice, schema: Schema, api?: ExtractInjectionAPI<PastePlugin>): (selection: Selection) => Slice;
|
|
11
|
-
export declare const isImage: (fileType?: string) => boolean;
|
|
12
|
-
export declare const transformSliceToCorrectMediaWrapper: (slice: Slice, schema: Schema) => Slice;
|
|
13
|
-
/**
|
|
14
|
-
* This func will be called when copy & paste, drag & drop external html with media, media files, and slices from editor
|
|
15
|
-
* Because width may not be available when transform, DEFAULT_IMAGE_WIDTH is used as a fallback
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
export declare const transformSliceToMediaSingleWithNewExperience: (slice: Slice, schema: Schema, api: ExtractInjectionAPI<PastePlugin> | undefined) => Slice;
|
|
19
|
-
/**
|
|
20
|
-
* Given a html string, we attempt to hoist any nested `<img>` tags,
|
|
21
|
-
* not directly wrapped by a `<div>` as ProseMirror no-op's
|
|
22
|
-
* on those scenarios.
|
|
23
|
-
* @param html
|
|
24
|
-
*/
|
|
25
|
-
export declare const unwrapNestedMediaElements: (html: string) => string;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ContentMoved } from './types';
|
|
2
|
-
export declare enum MoveAnalyticPluginTypes {
|
|
3
|
-
UpdateMovedAction = 0,
|
|
4
|
-
RemoveMovedAction = 1
|
|
5
|
-
}
|
|
6
|
-
export type UpdateMovedAction = {
|
|
7
|
-
data: ContentMoved;
|
|
8
|
-
type: MoveAnalyticPluginTypes.UpdateMovedAction;
|
|
9
|
-
};
|
|
10
|
-
export type RemoveMovedAction = {
|
|
11
|
-
data: undefined;
|
|
12
|
-
type: MoveAnalyticPluginTypes.RemoveMovedAction;
|
|
13
|
-
};
|
|
14
|
-
export type MoveAnalyticsPluginAction = UpdateMovedAction | RemoveMovedAction;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { ActionType, ContentMoved } from './types';
|
|
4
|
-
export declare const updateContentMoved: (nextState: Omit<ContentMoved, "currentActions">, nextAction: ActionType) => Command;
|
|
5
|
-
export declare const resetContentMoved: () => Command;
|
|
6
|
-
export declare const resetContentMovedTransform: () => (tr: Transaction) => Transaction;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { MoveAnalyticsPluginAction } from './actions';
|
|
5
|
-
import type { MoveAnalyticsPluginState } from './types';
|
|
6
|
-
export declare const createPluginState: (dispatch: Dispatch, initialState: MoveAnalyticsPluginState | ((state: EditorState) => MoveAnalyticsPluginState)) => SafeStateField<MoveAnalyticsPluginState>;
|
|
7
|
-
export declare const createCommand: <A = MoveAnalyticsPluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
8
|
-
export declare const getPluginState: (state: EditorState) => MoveAnalyticsPluginState;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
import { type MoveAnalyticsPluginState } from './types';
|
|
5
|
-
export declare const createPlugin: (dispatch: Dispatch, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => SafePlugin<MoveAnalyticsPluginState>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type ActionType = 'contentCut' | 'contentPasted';
|
|
2
|
-
export type NodeName = string;
|
|
3
|
-
export type ContentMoved = {
|
|
4
|
-
currentActions: Array<ActionType>;
|
|
5
|
-
hasSelectedMultipleNodes?: boolean;
|
|
6
|
-
nodeDepth?: number;
|
|
7
|
-
nodeTypes?: string;
|
|
8
|
-
size?: number;
|
|
9
|
-
};
|
|
10
|
-
export type MoveAnalyticsPluginState = {
|
|
11
|
-
contentMoved: ContentMoved;
|
|
12
|
-
};
|
|
13
|
-
export declare const defaultState: MoveAnalyticsPluginState;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare const isExcludedNode: (nodeName: string) => boolean;
|
|
4
|
-
export declare const isCursorSelectionAtTopLevel: (selection: Selection) => boolean;
|
|
5
|
-
export declare const isInlineNode: (nodeName: string) => boolean;
|
|
6
|
-
export declare const isNestedInlineNode: (selection: Selection) => boolean;
|
|
7
|
-
export declare const isNestedInTable: (state: EditorState) => boolean;
|
|
8
|
-
export declare const getParentNodeDepth: (selection: Selection) => number;
|
|
9
|
-
export declare const isEntireNestedParagraphOrHeadingSelected: (selection: Selection) => boolean;
|
|
10
|
-
export declare const containsExcludedNode: (content: Fragment) => boolean;
|
|
11
|
-
export declare const getMultipleSelectionAttributes: (content: Fragment) => {
|
|
12
|
-
nodeTypes: string | undefined;
|
|
13
|
-
hasSelectedMultipleNodes: boolean;
|
|
14
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
-
import { EditorState, PluginKey, Transaction, type SafeStateField } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { PastePluginAction } from '../editor-actions/actions';
|
|
5
|
-
import type { PastePluginState } from '../pastePluginType';
|
|
6
|
-
export declare const pluginKey: PluginKey;
|
|
7
|
-
export declare const createPluginState: (dispatch: Dispatch, initialState: PastePluginState | ((state: EditorState) => PastePluginState)) => SafeStateField<PastePluginState>;
|
|
8
|
-
export declare const createCommand: <A = PastePluginAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
9
|
-
export declare const getPluginState: (state: EditorState) => PastePluginState;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
interface VSCodeBlockParams {
|
|
4
|
-
event: ClipboardEvent;
|
|
5
|
-
slice: Slice;
|
|
6
|
-
state: EditorState;
|
|
7
|
-
text: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function handleVSCodeBlock({ state, slice, text, event }: VSCodeBlockParams): Slice;
|
|
10
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Slice as PMSlice, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare function insertSliceForLists({ tr, slice, schema, }: {
|
|
4
|
-
schema: Schema;
|
|
5
|
-
slice: PMSlice;
|
|
6
|
-
tr: Transaction;
|
|
7
|
-
}): void | Transaction;
|
|
8
|
-
export declare function insertSliceInsideBlockquote({ tr, slice, }: {
|
|
9
|
-
slice: PMSlice;
|
|
10
|
-
tr: Transaction;
|
|
11
|
-
}): void;
|
|
12
|
-
export declare function updateSelectionAfterReplace({ tr }: {
|
|
13
|
-
tr: Transaction;
|
|
14
|
-
}): Transaction | undefined;
|
|
15
|
-
export declare function insertSliceForTaskInsideList({ tr, slice, }: {
|
|
16
|
-
slice: PMSlice;
|
|
17
|
-
tr: Transaction;
|
|
18
|
-
}): void;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Node as PMNode, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare function insertSliceIntoEmptyNode({ tr, slice }: {
|
|
4
|
-
slice: Slice;
|
|
5
|
-
tr: Transaction;
|
|
6
|
-
}): void;
|
|
7
|
-
export declare function insertSliceAtNodeEdge({ tr, slice }: {
|
|
8
|
-
slice: Slice;
|
|
9
|
-
tr: Transaction;
|
|
10
|
-
}): void;
|
|
11
|
-
export declare function insertSliceIntoRangeSelectionInsideList({ tr, slice, }: {
|
|
12
|
-
slice: Slice;
|
|
13
|
-
tr: Transaction;
|
|
14
|
-
}): Transaction | undefined;
|
|
15
|
-
export declare function insertSliceInsideOfPanelNodeSelected(panelNode: PMNode): ({ tr, slice, schema }: {
|
|
16
|
-
schema?: Schema;
|
|
17
|
-
slice: Slice;
|
|
18
|
-
tr: Transaction;
|
|
19
|
-
}) => void;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI, InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { CardOptions, QueueCardsFromTransactionAction } from '@atlaskit/editor-common/card';
|
|
3
|
-
import type { ExtensionAutoConvertHandler } from '@atlaskit/editor-common/extensions';
|
|
4
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { RunMacroAutoConvert } from '@atlaskit/editor-plugin-extension';
|
|
6
|
-
import type { FindRootParentListNode } from '@atlaskit/editor-plugin-list';
|
|
7
|
-
import type { InsertMediaAsMediaSingle } from '@atlaskit/editor-plugin-media/types';
|
|
8
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
9
|
-
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
10
|
-
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
11
|
-
export declare function handleMention(slice: Slice, schema: Schema): Slice;
|
|
12
|
-
export declare function handlePasteIntoTaskOrDecisionOrPanel(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
13
|
-
export declare function handlePasteNonNestableBlockNodesIntoList(slice: Slice): Command;
|
|
14
|
-
export declare const doesSelectionWhichStartsOrEndsInListContainEntireList: (selection: Selection, findRootParentListNode: FindRootParentListNode | undefined) => boolean;
|
|
15
|
-
export declare function handlePastePanelOrDecisionContentIntoList(slice: Slice, findRootParentListNode: FindRootParentListNode | undefined): Command;
|
|
16
|
-
export declare function handlePasteLinkOnSelectedText(slice: Slice): Command;
|
|
17
|
-
export declare function handlePasteAsPlainText(slice: Slice, _event: ClipboardEvent, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): Command;
|
|
18
|
-
export declare function handlePastePreservingMarks(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
19
|
-
export declare function handleMacroAutoConvert(text: string, slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined, runMacroAutoConvert: RunMacroAutoConvert | undefined, cardsOptions?: CardOptions, extensionAutoConverter?: ExtensionAutoConvertHandler): Command;
|
|
20
|
-
export declare function handleCodeBlock(text: string): Command;
|
|
21
|
-
export declare function handleMediaSingle(inputMethod: InputMethodInsertMedia, insertMediaAsMediaSingle: InsertMediaAsMediaSingle | undefined): (slice: Slice) => Command;
|
|
22
|
-
export declare function handleTableContentPasteInBodiedExtension(slice: Slice): Command;
|
|
23
|
-
export declare function handleNestedTablePaste(slice: Slice, isNestingTablesSupported?: boolean): Command;
|
|
24
|
-
export declare function handleExpandPaste(slice: Slice): Command;
|
|
25
|
-
export declare function handleMarkdown(markdownSlice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined, from?: number, to?: number): Command;
|
|
26
|
-
export declare function handleParagraphBlockMarks(state: EditorState, slice: Slice): Slice;
|
|
27
|
-
/**
|
|
28
|
-
* ED-6300: When a nested list is pasted in a table cell and the slice has openStart > openEnd,
|
|
29
|
-
* it splits the table. As a workaround, we flatten the list to even openStart and openEnd.
|
|
30
|
-
*
|
|
31
|
-
* Note: this only happens if the first child is a list
|
|
32
|
-
*
|
|
33
|
-
* Example: copying "one" and "two"
|
|
34
|
-
* - zero
|
|
35
|
-
* - one
|
|
36
|
-
* - two
|
|
37
|
-
*
|
|
38
|
-
* Before:
|
|
39
|
-
* ul
|
|
40
|
-
* ┗━ li
|
|
41
|
-
* ┗━ ul
|
|
42
|
-
* ┗━ li
|
|
43
|
-
* ┗━ p -> "one"
|
|
44
|
-
* ┗━ li
|
|
45
|
-
* ┗━ p -> "two"
|
|
46
|
-
*
|
|
47
|
-
* After:
|
|
48
|
-
* ul
|
|
49
|
-
* ┗━ li
|
|
50
|
-
* ┗━ p -> "one"
|
|
51
|
-
* ┗━ li
|
|
52
|
-
* ┗━p -> "two"
|
|
53
|
-
*/
|
|
54
|
-
export declare function flattenNestedListInSlice(slice: Slice): Slice;
|
|
55
|
-
export declare function handleRichText(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
56
|
-
export declare function handlePasteIntoCaption(slice: Slice): Command;
|
|
57
|
-
export declare const handleSelectedTable: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (slice: Slice) => Command;
|
|
58
|
-
export declare function checkTaskListInList(state: EditorState, slice: Slice): boolean;
|
|
59
|
-
export declare function checkIfSelectionInNestedList(state: EditorState): boolean;
|
|
60
|
-
export declare function handlePasteExpand(slice: Slice): Slice;
|
|
61
|
-
export declare function applyContainerNodeTransformToSlice(slice: Slice, schema: Schema, destinationParentType: string): Slice;
|
|
62
|
-
export declare function splitTablesOutOfPanelHtml(html: string): string;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI, PasteSource } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
3
|
-
import type { NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import { Mark, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
export declare function isPastedFromWord(html?: string): boolean;
|
|
7
|
-
export declare function isPastedFromExcel(html?: string): boolean;
|
|
8
|
-
export declare const isSingleLine: (text: string) => boolean;
|
|
9
|
-
export declare function htmlContainsSingleFile(html: string): boolean;
|
|
10
|
-
export declare function getPasteSource(event: ClipboardEvent): PasteSource;
|
|
11
|
-
/**
|
|
12
|
-
* Wrap link with angle brackets if they are not already contained in markdown url syntax (e.g. [text](url))
|
|
13
|
-
*
|
|
14
|
-
* This mitigate some issues in the markdown-it parser (or linkify where it would not parse the link correctly if it contains some characters.
|
|
15
|
-
* @see https://product-fabric.atlassian.net/browse/ED-3159
|
|
16
|
-
* @see https://github.com/markdown-it/markdown-it/issues/38
|
|
17
|
-
*
|
|
18
|
-
* This function was introduced in
|
|
19
|
-
* https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/commits/64d0f30bbe7014#platform%2Fpackages%2Ffabric%2Feditor-core%2Fsrc%2Fplugins%2Fpaste%2Futil.ts
|
|
20
|
-
*
|
|
21
|
-
* If a right angle bracket or double quote is present in the url, the url will only be escaped up to the character before the right angle bracket (this is the same behaviour as in Google Docs).
|
|
22
|
-
*
|
|
23
|
-
* Tests in platform/packages/editor/editor-plugin-paste-tests/src/__tests__/playwright/paste.spec.ts
|
|
24
|
-
* check behaviour of double quotes in url strings
|
|
25
|
-
*/
|
|
26
|
-
export declare function escapeLinks(text: string): string;
|
|
27
|
-
/**
|
|
28
|
-
* Escapes backslashes and links outside code blocks.
|
|
29
|
-
*
|
|
30
|
-
* @param textInput - The input string to process, possibly containing code blocks and links.
|
|
31
|
-
* @returns The processed string with backslashes and links escaped outside code blocks.
|
|
32
|
-
* @example
|
|
33
|
-
* const input = 'This is a link: https://example.com and a backslash: \\\n```\ncode block https://example.com not escaped\ncode block \\ not escaped\n```';
|
|
34
|
-
* const output = escapeBackslashAndLinksExceptCodeBlock(input); // 'This is a link: <https://example.com> and a backslash: \\\\\n```\ncode block https://example.com not escaped\ncode block \\ not escaped\n```'
|
|
35
|
-
*/
|
|
36
|
-
export declare function escapeBackslashAndLinksExceptCodeBlock(textInput: string): string;
|
|
37
|
-
export declare function hasOnlyNodesOfType(...nodeTypes: NodeType[]): (slice: Slice) => boolean;
|
|
38
|
-
export declare function applyTextMarksToSlice(schema: Schema, marks?: readonly Mark[]): (slice: Slice) => Slice;
|
|
39
|
-
export declare function isEmptyNode(node: PMNode | null | undefined): boolean | null;
|
|
40
|
-
export declare function isCursorSelectionAtTextStartOrEnd(selection: Selection): boolean | null;
|
|
41
|
-
export declare function isPanelNode(node: PMNode | null | undefined): boolean;
|
|
42
|
-
export declare function isSelectionInsidePanel(selection: Selection): PMNode | null;
|
|
43
|
-
export declare const htmlHasInvalidLinkTags: (html?: string) => boolean;
|
|
44
|
-
export declare const removeDuplicateInvalidLinks: (html: string) => string;
|
|
45
|
-
export declare const addReplaceSelectedTableAnalytics: (state: EditorState, tr: Transaction, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Transaction;
|
|
46
|
-
export declare const transformUnsupportedBlockCardToInline: (slice: Slice, state: EditorState, cardOptions?: CardOptions) => Slice;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PasteSource } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { ExtractInjectionAPI, PasteWarningOptions } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import type { PastePlugin } from '../../pastePluginType';
|
|
5
|
-
/**
|
|
6
|
-
* If we are copying from editor, transform the copied source or reference sync block to a new reference sync block
|
|
7
|
-
* Otherwise, (e.g. if copying from renderer), flatten out the content and remove the sync block
|
|
8
|
-
* Also, show a warning flag if the pasted content contains a synced block and the paste warning options are configured.
|
|
9
|
-
*/
|
|
10
|
-
export declare const handleSyncBlocksPaste: (slice: Slice, schema: Schema, pasteSource: PasteSource, rawHtml: string, pasteWarningOptions: PasteWarningOptions | undefined, api: ExtractInjectionAPI<PastePlugin> | undefined) => Slice;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export declare const isPastedFromTinyMCEConfluence: (pasteEvent: ClipboardEvent, html: string) => boolean;
|
|
2
|
-
/**
|
|
3
|
-
* Wraps html markup with a `<table>` and uses `DOMParser` to generate
|
|
4
|
-
* and return both the table-wrapped and non-table-wrapped DOM document
|
|
5
|
-
* instances.
|
|
6
|
-
*/
|
|
7
|
-
export declare const wrapWithTable: (html: string) => {
|
|
8
|
-
nonTableWrappedDoc: Document;
|
|
9
|
-
tableWrappedDoc: Document;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Given a DOM document, it will try to rebuild table rows by using the
|
|
13
|
-
* table headers count as an initial starting point for the assumed
|
|
14
|
-
* number of columns that make up a row (`colsInRow`). It will slowly
|
|
15
|
-
* decrease that `colsInRow` count until it finds exact fit for table
|
|
16
|
-
* headers and cells with `colsInRow` else it returns the original
|
|
17
|
-
* document's markup.
|
|
18
|
-
*
|
|
19
|
-
* NOTE: It will NOT try to rebuild table rows if it encounters merged cells
|
|
20
|
-
* or compex table configurations (where table headers exist after normal
|
|
21
|
-
* table cells). It will build a single column table if NO table
|
|
22
|
-
* headers exist.
|
|
23
|
-
*/
|
|
24
|
-
export declare const tryReconstructTableRows: (doc: Document) => string;
|
|
25
|
-
export declare const htmlHasIncompleteTable: (html: string) => boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Strictly for ED-7331. Given incomplete table html from tinyMCE, it will try to rebuild
|
|
28
|
-
* a whole valid table. If it rebuilds the table, it may first rebuild it as a single
|
|
29
|
-
* row table, so this also then tries to reconstruct the table rows/columns if
|
|
30
|
-
* possible (best effort).
|
|
31
|
-
*/
|
|
32
|
-
export declare const tryRebuildCompleteTableHtml: (incompleteTableHtml: string) => string | null;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { PastePlugin } from '../pastePluginType';
|
|
4
|
-
type Props = {
|
|
5
|
-
api?: ExtractInjectionAPI<PastePlugin>;
|
|
6
|
-
};
|
|
7
|
-
export declare const Flag: ({ api }: Props) => React.JSX.Element | undefined;
|
|
8
|
-
export {};
|