mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
bdf36ef054
commit
7087766ce4
2 changed files with 53 additions and 10 deletions
7
app/src/protyle/toolbar/util.ts
Normal file
7
app/src/protyle/toolbar/util.ts
Normal 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;
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue