mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 05:46:00 +00:00
fix: variable value is lost after refreshing markdown block popup (#5478)
This commit is contained in:
parent
f0abab4ad0
commit
fc79c4397a
@ -150,15 +150,16 @@ export const MarkdownVoid: any = withDynamicSchemaProps(
|
||||
useEffect(() => {
|
||||
setLoading(true);
|
||||
const cvtContentToHTML = async () => {
|
||||
const replacedContent = await getRenderContent(
|
||||
engine,
|
||||
content,
|
||||
compile(variables),
|
||||
compile(localVariables),
|
||||
parseMarkdown,
|
||||
);
|
||||
|
||||
setHtml(replacedContent);
|
||||
setTimeout(async () => {
|
||||
const replacedContent = await getRenderContent(
|
||||
engine,
|
||||
content,
|
||||
compile(variables),
|
||||
compile(localVariables),
|
||||
parseMarkdown,
|
||||
);
|
||||
setHtml(replacedContent);
|
||||
});
|
||||
setLoading(false);
|
||||
};
|
||||
cvtContentToHTML();
|
||||
|
Loading…
Reference in New Issue
Block a user