Vanessa 2022-08-18 20:07:58 +08:00
parent bdf36ef054
commit 7087766ce4
2 changed files with 53 additions and 10 deletions

View file

@ -0,0 +1,7 @@
import {fetchPost} from "../../util/fetch";
export const previewTemplate = (pathString: string, element: Element) => {
fetchPost("/api/file/getFile", {path: pathString.replace(window.siyuan.config.system.dataDir, "")}, (response) => {
element.innerHTML = response.data;
})
}