/** * @fileoverview Katex 数学公式渲染插件 * 提供基于 KaTeX 的数学公式渲染功能,支持块级和内联公式 * @author Katex Plugin Team */ import React from 'react'; import { CodeNode, ElementProps } from '../../MarkdownEditor/el'; /** * KatexElement 组件 - KaTeX 数学公式元素组件 * * 该组件用于在Markdown编辑器中渲染数学公式,基于KaTeX库实现。 * 支持块级公式渲染、拖拽排序、只读模式等功能。 * * @component * @description KaTeX 数学公式元素组件,支持LaTeX数学公式渲染 * @param {ElementProps} props - 组件属性 * @param {CodeNode} props.element - 代码节点数据 * @param {boolean} [props.element.katex] - 是否为KaTeX公式 * @param {string} [props.element.value] - 公式内容 * @param {Object} props.attributes - Slate元素属性 * @param {React.ReactNode} props.children - 子元素 * * @example * ```tsx * * ``` * * @returns {React.ReactElement|null} 渲染的KaTeX公式组件,非KaTeX节点时返回null * * @remarks * - 基于KaTeX库实现数学公式渲染 * - 支持LaTeX数学语法 * - 提供实时渲染预览 * - 支持拖拽排序功能 * - 响应式布局适配 * - 支持只读模式简化渲染 * - 提供隐藏内容副本用于搜索和SEO * - 集成编辑器状态管理 */ export declare function KatexElement(props: ElementProps): React.JSX.Element | null; export { InlineKatex } from './InlineKatex'; export { Katex } from './Katex';