import { LexicalEditor } from "lexical"; /** * Post-processes HTML serialised from the Lexical editor, converting class-based * text formatting to inline styles and applying brand-consistent defaults to all elements. * * Specifically: * - Converts Lexical's text format classes (textBold, textItalic, textUnderline) * to their inline style equivalents * - Applies the Sage UI font family to all elements * - Applies link styles (color, cursor, underline) to anchor elements * - Preserves any existing inline styles set by Lexical (e.g. white-space: pre-wrap) * * This ensures the output HTML is portable and renders correctly in contexts where * the Lexical stylesheet is not present, such as email templates or external consumers. */ declare const generateHTMLWithInlineStyles: (html: string) => string; /** * This helper takes the current state of the editor and serializes it into two formats: * 1. HTML * 2. JSON * This allows the editor state to be saved and restored at a later time, in a format suitable * for the majority of customers' use cases. */ declare const SerializeLexical: (editor: LexicalEditor) => { htmlString: undefined; json: undefined; }; /** * This helper takes an HTML string and deserializes it into the editor. * This allows the editor to be restored from a previously saved state. */ declare const DeserializeHTML: (html: string) => string; /** Function to validate a given URL */ declare function validateUrl(url: string): boolean; declare const createFromHTML: (html: string) => string; /** Creates and returns a string representation of an empty editor */ declare const createEmpty: () => string; export { createEmpty, createFromHTML, DeserializeHTML, SerializeLexical, generateHTMLWithInlineStyles, validateUrl, };