import { Plugin } from 'prosemirror-state'; import { Slice, Schema } from 'prosemirror-model'; /** * Builds a slice of plain paragraphs from text, splitting on newlines. Open * depth 1 on both ends lets the first/last block merge into the surrounding * paragraph, matching how a normal plain-text paste behaves. */ export declare function plainTextSlice(schema: Schema, text: string): Slice; /** Reduces a pasted slice to unstyled text, preserving block breaks. */ export declare function stripSliceFormatting(schema: Schema, slice: Slice): Slice; export interface PasteOptions { /** * Read live: when it returns true, every paste drops formatting (the * persistent "paste as plain text" toggle). The Ctrl+Shift+V shortcut is a * separate one-shot handled in the keymap. */ getForcePlainText?: () => boolean; /** * Read live: when false, plain-text pastes are never parsed as Markdown. * Defaults to on. */ getMarkdownPaste?: () => boolean; /** Read live: whether pasted HTML is sanitized. Defaults to on. */ getSanitize?: () => boolean; } /** * Paste behavior: plain-text pastes that look like Markdown are parsed into * rich content (headings, lists, code fences, tables, inline marks), and all * pastes drop formatting while the host's plain-text toggle is on. */ export declare function pastePlugin(schema: Schema, options?: PasteOptions): Plugin;