import { BlockquoteOptions as BlockquoteOptions_2 } from '@tiptap/extension-blockquote'; import { BoldOptions as BoldOptions_2 } from '@tiptap/extension-bold'; import { BulletListOptions as BulletListOptions_2 } from '@tiptap/extension-bullet-list'; import { BundledLanguage } from 'shiki'; import { BundledTheme } from 'shiki'; import { CharacterCountOptions } from '@tiptap/extension-character-count'; import { CodeBlockOptions as CodeBlockOptions_2 } from '@tiptap/extension-code-block'; import { CodeOptions as CodeOptions_2 } from '@tiptap/extension-code'; import { ColorOptions as ColorOptions_2 } from '@tiptap/extension-color'; import { default as default_2 } from 'mammoth'; import { DropcursorOptions } from '@tiptap/extension-dropcursor'; import { Editor } from '@tiptap/react'; import { Editor as Editor_2 } from '@tiptap/core'; import { Extension } from '@tiptap/core'; import { Extensions } from '@tiptap/core'; import { FocusOptions as FocusOptions_2 } from '@tiptap/extension-focus'; import { FontFamilyOptions as FontFamilyOptions_2 } from '@tiptap/extension-font-family'; import { HardBreakOptions } from '@tiptap/extension-hard-break'; import { HeadingOptions as HeadingOptions_2 } from '@tiptap/extension-heading'; import { HighlightOptions as HighlightOptions_2 } from '@tiptap/extension-highlight'; import { HistoryOptions as HistoryOptions_2 } from '@tiptap/extension-history'; import { HorizontalRuleOptions as HorizontalRuleOptions_2 } from '@tiptap/extension-horizontal-rule'; import { ImageOptions } from '@tiptap/extension-image'; import { ItalicOptions as ItalicOptions_2 } from '@tiptap/extension-italic'; import { LinkOptions as LinkOptions_2 } from '@tiptap/extension-link'; import { ListItemOptions } from '@tiptap/extension-list-item'; import { Mark } from '@tiptap/core'; import { MentionNodeAttrs } from '@tiptap/extension-mention'; import { MentionOptions } from '@tiptap/extension-mention'; import { Node as Node_2 } from '@tiptap/core'; import { OrderedListOptions as OrderedListOptions_2 } from '@tiptap/extension-ordered-list'; import { ParagraphOptions } from '@tiptap/extension-paragraph'; import { PlaceholderOptions } from '@tiptap/extension-placeholder'; import { Range as Range_2 } from '@tiptap/core'; import { StrikeOptions as StrikeOptions_2 } from '@tiptap/extension-strike'; import { SubscriptExtensionOptions } from '@tiptap/extension-subscript'; import { SuperscriptExtensionOptions } from '@tiptap/extension-superscript'; import { TableCellOptions } from '@tiptap/extension-table-cell'; import { TableHeaderOptions } from '@tiptap/extension-table-header'; import { TableRowOptions } from '@tiptap/extension-table-row'; import { TaskItemOptions } from '@tiptap/extension-task-item'; import { TaskListOptions as TaskListOptions_2 } from '@tiptap/extension-task-list'; import { TextAlignOptions as TextAlignOptions_2 } from '@tiptap/extension-text-align'; import { TextStyleOptions } from '@tiptap/extension-text-style'; import { UnderlineOptions as UnderlineOptions_2 } from '@tiptap/extension-underline'; declare type Alignments = 'left' | 'center' | 'right' | 'justify'; export declare const Attachment: Node_2; declare interface AttachmentOptions extends GeneralOptions { /** Function for uploading files */ upload?: (file: File) => Promise; } export declare const BaseKit: Extension; /** * Represents the interface for options in the base toolkit. */ export declare interface BaseKitOptions { /** * Whether to enable the document option * * @default true */ document: false; /** * Whether to enable the document option * * @default false */ multiColumn?: boolean; /** * Whether to enable the text option * * @default true */ text: false; /** * Whether to enable the Gapcursor * * @default true */ gapcursor: false; /** * Dropcursor options or false, indicating whether to enable the drop cursor * * @default true */ dropcursor: Partial | false; /** * character count options or false, indicating whether to enable character count * * @default true */ characterCount: Partial | false; /** * HardBreak options or false, indicating whether to enable hard breaks * * @default true */ hardBreak: Partial | false; /** * Placeholder options or false, indicating whether to enable placeholders * * @default true */ placeholder: Partial | false; /** * Paragraph options or false, indicating whether to enable paragraph functionality * * @default true */ paragraph: Partial | false; /** * Focus options or false, indicating whether to enable focus functionality * * @default true */ focus: Partial | false; /** * ListItem options or false, indicating whether to enable list item functionality * * @default true */ listItem: Partial | false; /** * Text Style options or false, indicating whether to enable text style functionality * * @default true */ textStyle: Partial | false; /** * Bubble options, taking `BubbleOptions` as parameters, indicating whether to enable the bubble functionality */ bubble: any; /** * Iframe options or false, indicating whether to enable the iframe * * @default true */ /** * Trailing node options or false, indicating whether to enable the trailing node * * @default true */ trailingNode: Partial | false; /** * textBubble options or false, indicating whether to enable the textBubble * * @default true */ textBubble: Partial | false; /** * selection options or false, indicating whether to enable the selection * * @default true */ selection: any | false; } export declare const Blockquote: Node_2; export declare interface BlockquoteOptions extends BlockquoteOptions_2, GeneralOptions { } export declare const Bold: Mark; export declare interface BoldOptions extends BoldOptions_2, GeneralOptions { } export declare const BulletList: Node_2; export declare interface BulletListOptions extends BulletListOptions_2, GeneralOptions { } /** * Represents the ButtonView function. */ declare type ButtonView = (options: ButtonViewParams) => ButtonViewReturn | ButtonViewReturn[]; /** * Represents the parameters for the ButtonView function. */ declare interface ButtonViewParams { /** Editor object */ editor: Editor; /** Extension object */ extension: Extension; /** Translation function */ t: (path: string) => string; } /** * Represents the return value for the ButtonView component. */ declare interface ButtonViewReturn { /** Component */ component: unknown; /** Component props */ componentProps: ButtonViewReturnComponentProps; /** Component slots */ componentSlots?: ButtonViewReturnComponentSlots; } /** * Represents the props for the ButtonView component. */ declare interface ButtonViewReturnComponentProps { /** Method triggered when action is performed */ action?: (value?: any) => void; /** Whether it is in the active state */ isActive?: () => boolean; /** Button icon */ icon?: any; /** Text displayed on hover */ tooltip?: string; [x: string]: any; } /** * Represents the slots for the ButtonView component. */ declare interface ButtonViewReturnComponentSlots { /** Dialog slot */ dialog: () => any; [x: string]: () => any; } export declare const Clear: Node_2; export declare interface ClearOptions extends GeneralOptions { } export declare const Code: Mark; export declare const CodeBlock: Node_2; export declare interface CodeBlockOptions extends GeneralOptions { languages?: BundledLanguage[]; defaultTheme: BundledTheme; } export declare interface CodeOptions extends CodeOptions_2, GeneralOptions { } export declare const Color: Extension; export declare interface ColorOptions extends ColorOptions_2, GeneralOptions { /** * An array of color options to display in the color picker */ colors?: string[]; /** * The default color to use when no color is selected */ defaultColor?: string; } export declare const Column: Node_2; export declare const ColumnActionButton: Extension; declare interface Command { name: string; label: string; description?: string; aliases?: string[]; iconName?: any; iconUrl?: string; action: ({ editor, range }: { editor: Editor_2; range: Range_2; }) => void; shouldBeHidden?: (editor: Editor_2) => boolean; } export declare const Drawer: Node_2; declare interface DrawerOptions extends GeneralOptions { /** Function for uploading files */ upload?: (file: File) => Promise; } export declare const Emoji: Node_2; export declare const ExportPdf: Extension; export declare const ExportWord: Extension; declare interface ExportWordOptions extends GeneralOptions { } export declare const FontFamily: Extension; declare interface FontFamilyOptions extends FontFamilyOptions_2, GeneralOptions { /** * Font family list. */ fontFamilyList: (string | NameValueOption)[]; } export declare const FontSize: Extension; /** * Represents the interface for font size options, extending GeneralOptions. */ export declare interface FontSizeOptions extends GeneralOptions { types: string[]; /** * List of available font size values * * @default DEFAULT_FONT_SIZE_LIST */ fontSizes: (string | NameValueOption)[]; } /** * 格式刷 */ export declare const FormatPainter: Extension; /** * Represents the interface for font size options, extending GeneralOptions. */ export declare interface FormatPainterOptions extends GeneralOptions { } /** * Represents the general options for Tiptap extensions. */ declare interface GeneralOptions { /** Enabled divider */ divider: boolean; /** Enabled spacer */ spacer: boolean; /** Button view function */ button: ButtonView; /** Show on Toolbar */ toolbar?: boolean; } declare interface Group { name: string; title: string; commands: Command[]; } export declare const Heading: Node_2; export declare interface HeadingOptions extends HeadingOptions_2, GeneralOptions { } declare const Highlight_2: Mark; export { Highlight_2 as Highlight } export declare interface HighlightOptions extends HighlightOptions_2, GeneralOptions { } declare const History_2: Extension; export { History_2 as History } export declare interface HistoryOptions extends HistoryOptions_2, GeneralOptions { } export declare const HorizontalRule: Node_2; export declare interface HorizontalRuleOptions extends HorizontalRuleOptions_2, GeneralOptions { } export declare const Iframe: Node_2; declare interface IImageOptions extends GeneralOptions { /** Function for uploading files */ upload?: (file: File) => Promise; HTMLAttributes?: any; acceptMimes?: string[]; maxSize?: number; /** The source URL of the image */ resourceImage: 'upload' | 'link' | 'both'; defaultInline?: boolean; } declare interface IKatexOptions { HTMLAttributes: Record; } declare const Image_2: Node_2; export { Image_2 as Image } export declare const ImageGif: Node_2; declare interface ImageGifOptions extends ImageOptions { /** * The key for the gif https://giphy.com/ */ GIPHY_API_KEY: string; } export declare const ImportWord: Extension; declare interface ImportWordOptions extends GeneralOptions { /** Function for converting Word files to HTML */ convert?: (file: File) => Promise; /** Function for uploading images */ upload?: (files: File[]) => Promise; /** * File Size limit(10 MB) * * @default 1024 * 1024 * 10 */ limit?: number; mammothOptions?: Parameters[1]; } export declare const Indent: Extension; export declare interface IndentOptions extends GeneralOptions { types: string[]; minIndent: number; maxIndent: number; } export declare const Italic: Mark; export declare interface ItalicOptions extends ItalicOptions_2, GeneralOptions { } export declare const Katex: Node_2; export declare const LineHeight: Extension; export declare interface LineHeightOptions extends GeneralOptions { types: string[]; lineHeights: string[]; defaultHeight: string; } export declare const Link: Mark; export declare interface LinkOptions extends LinkOptions_2, GeneralOptions { } export declare const Mention: Node_2, any>; export declare const Mermaid: Node_2; declare interface MermaidOptions extends GeneralOptions { /** Function for uploading files */ upload?: (file: File) => Promise; } export declare const MoreMark: Extension; export declare interface MoreMarkOptions extends GeneralOptions { /** * // 下标 * * @default true */ subscript: Partial | false; /** * // 上标 * * @default true */ superscript: Partial | false; } export declare const MultiColumn: Node_2; declare interface NameValueOption { name: string; value: T; } declare interface Options { onHasOneBeforeInsert?: () => void; } export declare const OrderedList: Node_2; export declare interface OrderedListOptions extends OrderedListOptions_2, GeneralOptions { } declare interface Result { from: number; to: number; } export declare const SearchAndReplace: Extension; declare interface SearchOptions extends GeneralOptions { searchTerm: string; replaceTerm: string; searchResultClass: string; searchResultCurrentClass: string; caseSensitive: boolean; disableRegex: boolean; onChange?: () => void; } declare interface SearchStorage { results: Result[]; currentIndex: number; } export declare interface SetImageAttrsOptions { src?: string; /** The alternative text for the image. */ alt?: string; /** The caption of the image. */ caption?: string; /** The width of the image. */ width?: number | string | null; /** The alignment of the image. */ align?: 'left' | 'center' | 'right'; /** Whether the image is inline. */ inline?: boolean; /** image FlipX */ flipX?: boolean; /** image FlipY */ flipY?: boolean; } export declare const SlashCommand: Extension; declare interface SlashCommandOptions { renderGroupItem?: (extension: Extensions[number], groups: Group[]) => void; } export declare const Strike: Mark; export declare interface StrikeOptions extends StrikeOptions_2, GeneralOptions { } export declare const SubAndSuperScript: Extension; /** * Represents the interface for subscript and superscript options, extending GeneralOptions. */ export declare interface SubAndSuperScriptOptions extends GeneralOptions { /** * subscript options or false, indicating whether subscript is enabled * * @default true */ subscript: Partial | false; /** * superscript options or false, indicating whether superscript is enabled * * @default true */ superscript: Partial | false; } export declare const Table: Node_2; declare interface TableCellBackgroundOptions { HTMLAttributes: Record; types?: any; } export declare const TableOfContents: Node_2; export declare interface TableOptions extends GeneralOptions { HTMLAttributes: Record; resizable: boolean; handleWidth: number; cellMinWidth: number; lastColumnResizable: boolean; allowTableNodeSelection: boolean; /** options for table rows */ tableRow: Partial; /** options for table headers */ tableHeader: Partial; /** options for table cells */ tableCell: Partial; /** options for table cell background */ tableCellBackground: Partial; } export declare const TaskList: Node_2; /** * Represents the interface for task list options, extending TiptapTaskListOptions and GeneralOptions. */ export declare interface TaskListOptions extends TaskListOptions_2, GeneralOptions { /** options for task items */ taskItem: Partial; } export declare const TextAlign: Extension; /** * Represents the interface for text align options, extending TiptapTextAlignOptions and GeneralOptions. */ export declare interface TextAlignOptions extends TextAlignOptions_2, GeneralOptions { /** * List of available alignment options * * @default ['left', 'center', 'right', 'justify'] */ alignments: Alignments[]; } declare interface TextBubbleOptions extends GeneralOptions { } export declare const TextDirection: Extension; /** * Extension based on: * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js * - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts */ declare interface TrailingNodeOptions { node: string; notAfter: string[]; } /** * This extension adds support for tweets. */ export declare const Twitter: Node_2; declare interface TwitterOptions { /** * Controls if the paste handler for tweets should be added. * @default true * @example false */ addPasteHandler: boolean; HTMLAttributes: Record; /** * Controls if the twitter node should be inline or not. * @default false * @example true */ inline: boolean; /** * The origin of the tweet. * @default '' * @example 'https://tiptap.dev' */ origin: string; } export declare const Underline: Mark; export declare interface UnderlineOptions extends UnderlineOptions_2, GeneralOptions { } export declare const Video: Node_2; /** * Represents the interface for video options, extending GeneralOptions. */ export declare interface VideoOptions extends GeneralOptions { /** * Indicates whether fullscreen play is allowed * * @default true */ allowFullscreen: boolean; /** * Indicates whether to display the frameborder * * @default false */ frameborder: boolean; /** * Width of the video, can be a number or string * * @default VIDEO_SIZE['size-medium'] */ width: number | string; /** HTML attributes object for passing additional attributes */ HTMLAttributes: { [key: string]: any; }; /** Function for uploading files */ upload?: (file: File) => Promise; /** The source URL of the video */ resourceVideo: 'upload' | 'link' | 'both'; } export { } declare module '@tiptap/core' { interface Commands { video: { /** * Add an video */ setVideo: (options: Partial) => ReturnType; /** * Update an video */ updateVideo: (options: Partial) => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { fontSize: { /** * Set the text font size. ex: "12px", "2em", or "small". Must be a valid * CSS font-size * (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size). */ setFontSize: (fontSize: string) => ReturnType; /** * Unset the font size */ unsetFontSize: () => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { lineHeight: { setLineHeight: (lineHeight: string) => ReturnType; unsetLineHeight: () => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { imageUpload: { /** * Add an image */ setImageInline: (options: Partial) => ReturnType; /** * Update an image */ updateImage: (options: Partial) => ReturnType; /** * Set image alignment */ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { tableCellBackground: { setTableCellBackground: (color: string) => ReturnType; unsetTableCellBackground: () => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { emoji: { setEmoji: (emoji: { name: string; emoji: string; }) => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { katex: { setKatex: (arg?: IKatexAttrs) => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { columns: { insertColumns: (attrs?: { cols: number; }) => ReturnType; addColBefore: () => ReturnType; addColAfter: () => ReturnType; deleteCol: () => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { search: { setSearchTerm: (searchTerm: string) => ReturnType; setReplaceTerm: (replaceTerm: string) => ReturnType; replace: () => ReturnType; replaceAll: () => ReturnType; goToPrevSearchResult: () => void; goToNextSearchResult: () => void; setCaseSensitive: (caseSensitive: boolean) => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { indent: { /** * Set the indent attribute */ indent: () => ReturnType; /** * Set the outdent attribute */ outdent: () => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { painter: { setPainter: (marks: Mark[]) => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { iframe: { /** * Add an iframe */ setIframe: (options: { src: string; service: string; }) => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { drawer: { setDrawer: (options: any, replace?: any) => ReturnType; setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { imageGifUpload: { /** * Add an image gif */ setImageGif: (options: Partial) => ReturnType; /** * Update an image gif */ updateImageGif: (options: Partial) => ReturnType; /** * Set image alignment */ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { twitter: { /** * Insert a tweet * @param options The tweet attributes * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' }) */ setTweet: (options: SetTweetOptions) => ReturnType; updateTweet: (options: SetTweetOptions) => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { exportWord: { exportToWord: () => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { attachment: { setAttachment: (attrs?: unknown) => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { tableOfContents: { setTableOfContents: () => ReturnType; removeTableOfContents: () => ReturnType; }; } } declare module '@tiptap/core' { interface Commands { mermaid: { setMermaid: (options: any, replace?: any) => ReturnType; setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType; }; } }