mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 07:15:51 +01:00
feat(react/floating_buttons): port copy image reference
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import dayjs from "dayjs";
|
||||
import type { ViewScope } from "./link.js";
|
||||
import { FNote } from "./frontend_script_entrypoint.js";
|
||||
|
||||
const SVG_MIME = "image/svg+xml";
|
||||
|
||||
@@ -574,8 +575,7 @@ function copyHtmlToClipboard(content: string) {
|
||||
document.removeEventListener("copy", listener);
|
||||
}
|
||||
|
||||
// TODO: Set to FNote once the file is ported.
|
||||
function createImageSrcUrl(note: { noteId: string; title: string }) {
|
||||
export function createImageSrcUrl(note: FNote) {
|
||||
return `api/images/${note.noteId}/${encodeURIComponent(note.title)}?timestamp=${Date.now()}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user