From 119ec51770110ee15522bc3a1b70e99cf45be802 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 13 Mar 2023 11:06:39 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7643 --- app/src/ai/actions.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/ai/actions.ts b/app/src/ai/actions.ts index 94b98ef64..1059775cc 100644 --- a/app/src/ai/actions.ts +++ b/app/src/ai/actions.ts @@ -5,11 +5,17 @@ import {insertHTML} from "../protyle/util/insertHTML"; import {Dialog} from "../dialog"; import {isMobile} from "../util/functions"; import {getContenteditableElement} from "../protyle/wysiwyg/getBlock"; +import {blockRender} from "../protyle/markdown/blockRender"; +import {processRender} from "../protyle/util/processCode"; +import {highlightRender} from "../protyle/markdown/highlightRender"; export const fillContent = (protyle:IProtyle, data:string, elements:Element[]) => { setLastNodeRange(getContenteditableElement(elements[elements.length - 1]), protyle.toolbar.range); protyle.toolbar.range.collapse(true); insertHTML(data, protyle, true, true); + blockRender(protyle, protyle.wysiwyg.element); + processRender(protyle.wysiwyg.element); + highlightRender(protyle.wysiwyg.element); }; export const AIActions = (elements: Element[], protyle: IProtyle) => {