import { EditorState, Plugin, PluginKey } from 'prosemirror-state'; import { Node as PMNode, Schema } from 'prosemirror-model'; import { KeymapOptions } from './keymap'; import { LinkPluginOptions } from './plugins/link'; import { ImagePluginOptions } from './plugins/image'; import { SuggestionOptions } from './plugins/suggestions'; export declare const mentionSuggestKey: PluginKey; export declare const slashSuggestKey: PluginKey; export declare const emojiSuggestKey: PluginKey; export interface CreateStateOptions extends KeymapOptions, LinkPluginOptions, ImagePluginOptions { schema?: Schema; doc?: PMNode; /** Read live so the placeholder updates without rebuilding state. */ getPlaceholder?: () => string; singleLine?: boolean; /** Mention suggestions (omit onChange to disable the plugin). */ mentions?: Omit; /** Slash-command suggestions, anchored to the start of a block. */ slashCommands?: Omit; /** ":" emoji suggestions (activates after two query characters). */ emoji?: Omit; /** Character limit, read live. Return 0/undefined for unlimited. */ getMaxLength?: () => number; /** Read live: when true, all pastes drop formatting. */ getForcePlainText?: () => boolean; /** Read live: when false, plain-text pastes are never parsed as Markdown. */ getMarkdownPaste?: () => boolean; /** Read live: whether pasted/parsed HTML is sanitized. Defaults to on. */ getSanitize?: () => boolean; /** Typography autocorrect (smart quotes, dashes, (c)…). Defaults to on. */ textTransform?: boolean; /** Extra plugins appended after the built-in set (later phases, tests). */ plugins?: Plugin[]; } export declare function createEditorState(options?: CreateStateOptions): EditorState;