import type * as React from "react"; import type { RichTextEditorAccessibilityResult, RichTextEditorAiToolkit, RichTextEditorCollab, RichTextEditorComments, RichTextEditorDictation, RichTextEditorDocumentMetrics, RichTextEditorDocumentOutlineItem, RichTextEditorFootnoteItem, RichTextEditorInstance, RichTextEditorLinkAuditOptions, RichTextEditorLinkAuditResult, RichTextEditorMentions, RichTextEditorPageSetup, RichTextEditorReviewLedger, RichTextEditorRevisionHistory, RichTextEditorSlashCommands, RichTextEditorStructuredDocument, RichTextEditorStructuredInput, RichTextEditorTableOfContentsItem, RichTextEditorTableOfContentsOptions, RichTextEditorTextStatistics, RichTextEditorValueFormat } from "../index"; export interface RichTextEditorReactHandle { focus(): void; getEditor(): RichTextEditorInstance | null; getHTMLCode(): string; getJSON(): RichTextEditorStructuredDocument | null; setHTMLCode(value: string): void; setJSON(value: RichTextEditorStructuredInput): void; getTextStatistics(): RichTextEditorTextStatistics | null; getSelectionStatistics(): RichTextEditorTextStatistics | null; getDocumentMetrics(): RichTextEditorDocumentMetrics | null; getDocumentPageSetup(): RichTextEditorPageSetup | null; setDocumentPageSetup(pageSetup: RichTextEditorPageSetup | null): RichTextEditorInstance | null; getDocumentOutline(): RichTextEditorDocumentOutlineItem[]; getFootnotes(): RichTextEditorFootnoteItem[]; getTableOfContents(options?: RichTextEditorTableOfContentsOptions): RichTextEditorTableOfContentsItem[]; syncTableOfContents(options?: RichTextEditorTableOfContentsOptions): RichTextEditorStructuredDocument | null; auditAccessibility(): RichTextEditorAccessibilityResult | null; auditLinks(options?: RichTextEditorLinkAuditOptions): RichTextEditorLinkAuditResult | null; /** * Convenience accessors that forward to the underlying RichTextEditor * instance's v2.0 plugin namespaces. Each returns `null` when the editor * is not yet initialised, and `undefined` when the corresponding plugin * is not loaded for this build. */ getAiToolkit(): RichTextEditorAiToolkit | null | undefined; getDictation(): RichTextEditorDictation | null | undefined; getRevisionHistory(): RichTextEditorRevisionHistory | null | undefined; getCollab(): RichTextEditorCollab | null | undefined; getSlashCommands(): RichTextEditorSlashCommands | null | undefined; getMentions(): RichTextEditorMentions | null | undefined; getComments(): RichTextEditorComments | null | undefined; getReviewLedger(): RichTextEditorReviewLedger | null | undefined; } export interface RichTextEditorReactProps extends Omit, "defaultValue" | "onChange"> { assetBasePath?: string; autoload?: boolean; config?: Record; defaultValue?: RichTextEditorStructuredInput; onChange?: ( value: string | RichTextEditorStructuredDocument, editor: RichTextEditorInstance ) => void; onError?: (error: Error) => void; onReady?: (editor: RichTextEditorInstance) => void; value?: RichTextEditorStructuredInput; valueFormat?: RichTextEditorValueFormat; } export const RichTextEditorReact: React.ForwardRefExoticComponent< RichTextEditorReactProps & React.RefAttributes >; export const RichTextEditor: typeof RichTextEditorReact; export { auditAccessibility, auditLinks, createStructuredContent, createStructuredDocument, fromMarkdown, getDocumentPageSetup, getDocumentMetrics, getDocumentOutline, getFootnotes, getTableOfContents, getTextStatistics, loadRichTextEditorAssets, renderHTML, setDocumentPageSetup, syncTableOfContents, toMarkdown, validateStructuredContent } from "../integrations/shared"; export { RichTextEditorLinkAuditOptions, RichTextEditorLinkAuditResult };