mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
8 lines
292 B
TypeScript
8 lines
292 B
TypeScript
|
|
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;
|
||
|
|
})
|
||
|
|
}
|