@atlaskit/editor-plugin-paste
Version:
Paste plugin for @atlaskit/editor-core
95 lines (77 loc) • 2.59 kB
Markdown
<!-- API Report Version: 2.3 -->
## API Report File for "@atlaskit/editor-plugin-paste"
> Do not edit this file. This report is auto-generated using
> [API Extractor](https://api-extractor.com/).
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
### Table of contents
- [Main Entry Types](#main-entry-types)
- [Peer Dependencies](#peer-dependencies)
### Main Entry Types
<!--SECTION START: Main Entry Types-->
```ts
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
import type { BetterTypeHistoryPlugin } from '@atlaskit/editor-plugin-better-type-history';
import type { CardOptions } from '@atlaskit/editor-common/card';
import type { CardPlugin } from '@atlaskit/editor-plugin-card';
import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
import type { PasteSource } from '@atlaskit/editor-common/analytics';
import type { Slice } from '@atlaskit/editor-prosemirror/model';
// @public (undocumented)
export type LastContentPasted = {
isPlainText: boolean;
text?: string;
isShiftPressed: boolean;
pasteStartPos: number;
pasteEndPos: number;
pastedSlice: Slice;
pastedAt: number;
pasteSource: PasteSource;
};
// @public (undocumented)
export type PastePlugin = NextEditorPlugin<
'paste',
{
pluginConfiguration: PastePluginOptions;
dependencies: [
OptionalPlugin<FeatureFlagsPlugin>,
OptionalPlugin<ListPlugin>,
BetterTypeHistoryPlugin,
OptionalPlugin<CardPlugin>,
OptionalPlugin<AnalyticsPlugin>,
OptionalPlugin<MediaPlugin>,
OptionalPlugin<ExtensionPlugin>,
];
sharedState: {
lastContentPasted: LastContentPasted | null;
};
}
>;
// @public (undocumented)
export type PastePluginOptions = {
cardOptions?: CardOptions;
sanitizePrivateContent?: boolean;
};
// @public (undocumented)
export interface PastePluginState {
// (undocumented)
lastContentPasted: LastContentPasted | null;
pastedMacroPositions: {
[key: string]: number;
};
}
// (No @packageDocumentation comment for this package)
```
<!--SECTION END: Main Entry Types-->
### Peer Dependencies
<!--SECTION START: Peer Dependencies-->
```json
{
"react": "^16.8.0"
}
```
<!--SECTION END: Peer Dependencies-->