import Op from 'quill-delta/dist/Op'; export interface BlockLockInfo { locked: number; userId: string; displayName: string; password?: string; } export declare type TextAlign = 'left' | 'right' | 'center' | 'justify'; export interface SimpleUser { userId: string; displayName: string; timestamp?: number; } export interface BlockBase { type: string; id: string; children?: string[]; lock?: BlockLockInfo; align?: TextAlign; quoted?: boolean; heading?: number; markerData?: string; markerWidth?: number; markerExpired?: boolean; padding?: number; comments?: string[]; styles?: string[]; abstract?: string; inlineStyle?: string; checkbox?: string; copilot?: { users: SimpleUser[]; }; } export interface DocBlock extends BlockBase { text?: any[]; } export interface DocComment { id: string; groupId: string; userId: string; displayName: string; avatarUrl: string; abstract: string; blocks: DocBlock[]; created: number; modified: number; _addToOldDoc?: boolean; } declare type BlocksType = DocBlock[]; declare type CommentsType = { [index: string]: DocComment; }; declare type MetaType = { [index: string]: any; }; export interface EditorDoc { blocks: BlocksType; comments: CommentsType; meta: MetaType; [index: string]: BlocksType | CommentsType | MetaType; } export declare function getDocTextLength(doc: EditorDoc): number; export declare function isEmptyTextBlock(block: DocBlock): boolean; export declare function isEmptyDoc(doc: EditorDoc): boolean; export declare function isEmptyDocForAddingTemplate(doc: EditorDoc): boolean; export declare function isRichDocument(ops: Op[]): boolean; export declare const FILL_CHAR = "\u200B"; export declare function toPlainText(ops: Op[], options?: { fillCharForBox: boolean; }): string; export declare const MARKDOWN_SAFE_SPACE = "\u2003"; export declare function replaceLeadSpaceToMarkdownSafeSpace(text: string): string; export declare function replaceMarkdownSafeSpaceToSpace(text: string): string; export declare function richTextToMarkdown(ops: Op[], escapeText: boolean): string; export declare type ResourceUrlBuilder = (src: string) => string; export interface Doc2MarkdownOptionalOptions { buildResourceUrl?: ResourceUrlBuilder; keepImageSize?: boolean; keepComments?: boolean; customConverter?: (doc: EditorDoc, containerId: string, blockIndex: number, blockData: DocBlock, options: Doc2MarkdownOptionalOptions) => string | undefined; } export declare function createRichText(text: string): Op[]; export declare function createTextBlockData(text: string): DocBlock; export declare function mergeOps(ops: Op[]): Op[]; export declare function removeLastBr(ops: Op[]): Op[]; export {};