mirror of
https://github.com/zadam/trilium.git
synced 2026-01-03 21:24:24 +01:00
feat(share): integrate custom pdf.js viewer
This commit is contained in:
parent
ce0f32e7d5
commit
b68613dee4
@ -481,7 +481,7 @@ function renderImage(result: Result, note: SNote | BNote) {
|
||||
|
||||
function renderFile(note: SNote | BNote, result: Result) {
|
||||
if (note.mime === "application/pdf") {
|
||||
result.content = `<iframe class="pdf-view" src="api/notes/${note.noteId}/view"></iframe>`;
|
||||
result.content = `<iframe class="pdf-view" src="../pdfjs/web/viewer.html?file=../../../share/api/notes/${note.noteId}/view"></iframe>`;
|
||||
} else {
|
||||
result.content = `<button type="button" onclick="location.href='api/notes/${note.noteId}/download'">Download file</button>`;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user