/** * BlockNote Service * * Converts between BlockNote/ProseMirror data structures and Markdown * * Features: * - Convert BlockNote JSON to Markdown * - Convert Markdown to BlockNote JSON * - Support for headings, paragraphs, lists, code blocks * - Support for text styling (bold, italic, strikethrough, code) * - Support for checklist items * * @example * ```typescript * const markdown = blocknoteService.convertToMarkdown({ nodes: blockNoteData }); * const blockNote = blocknoteService.createFromMarkdown('# Hello World'); * ``` */ export declare class BlockNoteService { /** * Converts a BlockNoteJS/Prosemirror data structure into markdown. * * `preserveMentions` keeps mention inline nodes addressable in the markdown * (see `processMention`). It is opt-in because every existing caller wants * the plain alias. */ convertToMarkdown(params: { nodes: any[]; preserveMentions?: boolean; }): string; /** * Converts markdown text into a BlockNoteJS/Prosemirror data structure. */ createFromMarkdown(markdown: string): Promise; /** * Recursively convert marked tokens into nodes. */ protected tokensToNodes(tokens: any[]): any[]; /** * Convert inline tokens to content array. */ protected inlineTokensToContent(tokens: any[]): any[]; /** * Process a single node to markdown. */ protected processNode(node: any, indentLevel?: number, preserveMentions?: boolean): string; protected processParagraph(node: any, preserveMentions?: boolean): string; protected processHeading(node: any, preserveMentions?: boolean): string; protected processBulletListItem(node: any, indentLevel: number, preserveMentions?: boolean): string; protected processNumberedListItem(node: any, indentLevel: number, preserveMentions?: boolean): string; protected processCheckListItem(node: any, indentLevel: number, preserveMentions?: boolean): string; protected processCodeBlock(node: any, preserveMentions?: boolean): string; protected processContent(contentArray: any[], preserveMentions?: boolean): string; /** * Render a BlockNote mention inline node. * * Default: the human-readable alias, so LLM prompts and search indexes see a * name rather than a hole in the text. * * preserveMentions: a markdown link the mention parser can read back, so a * stored message keeps its entity pointers and can be re-rendered with * hovercards. Kept opt-in because the alias form is what the summariser, * chunker and prompt paths want. */ protected processMention(node: any, preserveMentions?: boolean): string; protected applyTextStyles(text: string, styles: any): string; protected processRelationship(node: any): string; protected processContentNodes(nodes: any[]): string; /** * Converts a BlockNoteJS/Prosemirror data structure into plain text (no markdown formatting). */ convertToPlainText(params: { nodes: any[]; }): string; protected processNodeAsPlainText(node: any, indentLevel?: number): string; protected processParagraphAsPlainText(node: any): string; protected processHeadingAsPlainText(node: any): string; protected processBulletListItemAsPlainText(node: any, indentLevel: number): string; protected processNumberedListItemAsPlainText(node: any, indentLevel: number): string; protected processCheckListItemAsPlainText(node: any, indentLevel: number): string; protected processCodeBlockAsPlainText(node: any): string; protected processContentAsPlainText(contentArray: any[]): string; } //# sourceMappingURL=blocknote.service.d.ts.map