@mkljczk/lexical-remark
Version:
This package contains Markdown helpers and functionality for Lexical using remark-parse.
16 lines (15 loc) • 677 B
TypeScript
import { Root } from 'mdast';
import { Handler } from './handlers/index.js';
export declare function serializeFromRemark(tree: Root): string;
export declare function $convertToMarkdownViaRemark(options?: {
handlers?: Record<string, Handler>;
}): string;
/**
* Creates a parsing function which converts a Lexical state to a markdown string via remark
*
* @param handlers A set of additional handlers designed to parse Lexical nodes into remark mdast nodes
* @returns A function which returns the state of the active Lexical editor as a markdown string
*/
export declare function $createRemarkExport(options?: {
handlers?: Record<string, Handler>;
}): () => string;