react-latex-editor
Version:
A professional React rich text editor with mathematical equation support, built on TipTap with MathLive integration. Production-ready with TypeScript support, accessibility features, and industrial-grade error handling.
54 lines • 1.41 kB
TypeScript
/**
* Advanced utility functions for editor management
*/
/**
* Validate LaTeX syntax
*/
export declare function validateLatex(latex: string): {
isValid: boolean;
error?: string;
};
/**
* Sanitize HTML content
*/
export declare function sanitizeHtml(html: string): string;
/**
* Extract plain text from HTML
*/
export declare function extractTextFromHtml(html: string): string;
/**
* Count words in text
*/
export declare function countWords(text: string): number;
/**
* Format file size
*/
export declare function formatFileSize(bytes: number): string;
/**
* Debounce function for performance optimization
*/
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;
/**
* Throttle function for performance optimization
*/
export declare function throttle<T extends (...args: any[]) => any>(func: T, limit: number): (...args: Parameters<T>) => void;
/**
* Check if browser supports features needed by the editor
*/
export declare function checkBrowserSupport(): {
supported: boolean;
missingFeatures: string[];
};
/**
* Deep clone an object
*/
export declare function deepClone<T>(obj: T): T;
/**
* Check if content is empty
*/
export declare function isContentEmpty(html: string): boolean;
/**
* Generate unique ID
*/
export declare function generateId(): string;
//# sourceMappingURL=helpers.d.ts.map