UNPKG

@lobehub/editor

Version:

A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.

23 lines 725 B
import { Center, Text } from '@lobehub/ui'; import { cx } from 'antd-style'; import { useTranslation } from "../../../../editor-kernel/react/useTranslation"; import { styles } from "../style"; import { jsx as _jsx } from "react/jsx-runtime"; var Placeholder = function Placeholder(_ref) { var mathBlock = _ref.mathBlock; var t = useTranslation(); var node = /*#__PURE__*/_jsx(Text, { as: 'span', className: cx('katex', styles.mathPlaceholder), fontSize: mathBlock ? '1.2em' : '1em', type: 'secondary', children: t('math.placeholder') }); if (!mathBlock) return node; return /*#__PURE__*/_jsx(Center, { padding: 18, width: '100%', children: node }); }; export default Placeholder;