mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
add canvas properties with a button to copy reference to clipboard which allows inserting canvas as an image into text notes
This commit is contained in:
@@ -495,6 +495,14 @@ function copyHtmlToClipboard(content) {
|
||||
navigator.clipboard.write([clipboardItem]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {FNote} note
|
||||
* @return {string}
|
||||
*/
|
||||
function createImageSrcUrl(note) {
|
||||
return `api/images/${note.noteId}/${encodeURIComponent(note.title)}?timestamp=${Date.now()}`;
|
||||
}
|
||||
|
||||
export default {
|
||||
reloadFrontendApp,
|
||||
parseDate,
|
||||
@@ -533,5 +541,6 @@ export default {
|
||||
sleep,
|
||||
escapeRegExp,
|
||||
areObjectsEqual,
|
||||
copyHtmlToClipboard
|
||||
copyHtmlToClipboard,
|
||||
createImageSrcUrl
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user