mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
This commit is contained in:
parent
d982fd1dde
commit
e2705bc2ac
1 changed files with 1 additions and 1 deletions
|
|
@ -2,6 +2,6 @@ import {fetchPost} from "../../util/fetch";
|
||||||
|
|
||||||
export const previewTemplate = (pathString: string, element: Element) => {
|
export const previewTemplate = (pathString: string, element: Element) => {
|
||||||
fetchPost("/api/file/getFile", {path: pathString.replace(window.siyuan.config.system.dataDir.substring(0, window.siyuan.config.system.dataDir.length - 4), "")}, (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;
|
element.innerHTML = `<div class="b3-typography">${response.data}</div>`;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue