mirror of https://github.com/fantasticit/think.git
feat:improve katex popup position
This commit is contained in:
parent
daa0849e1e
commit
dadc08c39a
|
@ -20,7 +20,7 @@ export const KatexWrapper = ({ editor, node, updateAttributes }) => {
|
||||||
}
|
}
|
||||||
}, [text]);
|
}, [text]);
|
||||||
|
|
||||||
const content = text ? (
|
const content = text.trim() ? (
|
||||||
<span contentEditable={false} dangerouslySetInnerHTML={{ __html: formatText }}></span>
|
<span contentEditable={false} dangerouslySetInnerHTML={{ __html: formatText }}></span>
|
||||||
) : (
|
) : (
|
||||||
<span contentEditable={false}>点击输入公式</span>
|
<span contentEditable={false}>点击输入公式</span>
|
||||||
|
@ -32,10 +32,11 @@ export const KatexWrapper = ({ editor, node, updateAttributes }) => {
|
||||||
{isEditable ? (
|
{isEditable ? (
|
||||||
<Popover
|
<Popover
|
||||||
showArrow
|
showArrow
|
||||||
|
position="bottomLeft"
|
||||||
content={
|
content={
|
||||||
<div style={{ width: 320 }}>
|
<div style={{ width: 320 }}>
|
||||||
<TextArea
|
<TextArea
|
||||||
autoFocus
|
autofocus
|
||||||
placeholder="输入公式"
|
placeholder="输入公式"
|
||||||
autosize
|
autosize
|
||||||
rows={3}
|
rows={3}
|
||||||
|
|
Loading…
Reference in New Issue