mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
moving canvas_note_share to src/share and add routes
This commit is contained in:
parent
83f1a68bfd
commit
f85ed672cc
@ -1,4 +1,10 @@
|
||||
// const {elements, appState, files} = window.triliumExcalidraw;
|
||||
/**
|
||||
* this is used as a "standalone js" file and required by a shared note directly via script-tags
|
||||
*
|
||||
* data input comes via window variable as follow
|
||||
* const {elements, appState, files} = window.triliumExcalidraw;
|
||||
*/
|
||||
|
||||
document.getElementById("excalidraw-app").style.height = appState.height+"px";
|
||||
|
||||
const App = () => {
|
@ -114,7 +114,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||
<div id="excalidraw-app"></div>
|
||||
<hr>
|
||||
<a href="api/images/${note.noteId}/${note.title}?utc=${note.utcDateModified}">Get Image Link</a>
|
||||
<script src="../../libraries/excalidraw/canvas_note_share.js"></script>
|
||||
<script src="./canvas_note_share.js"></script>
|
||||
</div>`;
|
||||
}
|
||||
else {
|
||||
|
@ -1,3 +1,6 @@
|
||||
const express = require('express');
|
||||
const path = require('path');
|
||||
|
||||
const shaca = require("./shaca/shaca");
|
||||
const shacaLoader = require("./shaca/shaca_loader");
|
||||
const shareRoot = require("./share_root");
|
||||
@ -55,6 +58,8 @@ function register(router) {
|
||||
});
|
||||
}
|
||||
|
||||
router.use('/share/canvas_note_share.js', express.static(path.join(__dirname, 'canvas_note_share.js')));
|
||||
|
||||
router.get(['/share', '/share/'], (req, res, next) => {
|
||||
shacaLoader.ensureLoad();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user