Vanessa 2022-08-18 20:13:03 +08:00
parent 7087766ce4
commit d982fd1dde

View file

@ -1,7 +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) => {
fetchPost("/api/file/getFile", {path: pathString.replace(window.siyuan.config.system.dataDir.substring(0, window.siyuan.config.system.dataDir.length - 4), "")}, (response) => {
element.innerHTML = response.data;
})
}