UNPKG

@atlaskit/editor-plugin-paste

Version:

Paste plugin for @atlaskit/editor-core

14 lines (13 loc) 728 B
import type { IntlShape } from 'react-intl'; import type { Slice } from '@atlaskit/editor-prosemirror/model'; /** * Returns a plain text serialization of a given slice. This is used for populating the plain text * section of the clipboard on copy. * The current implementation is bare bones - only inlineCards, blockCards and mentions are tested (they * previously were empty on plain text copy). * * By default (without this function passed to the editor), the editor uses * `slice.content.textBetween(0, slice.content.size, "\n\n")` * (see https://prosemirror.net/docs/ref/#view.EditorProps.clipboardTextSerializer) */ export declare function createClipboardTextSerializer(intl: IntlShape): (slice: Slice) => string;