Skip to content

Build your personal knowledge base with Trilium Notes

set EXCALIDRAW_ASSET_PATH to avoid loading from unpkg.com

Tom24415156667a
diff --git a/src/public/app/widgets/type_widgets/canvas_note.js b/src/public/app/widgets/type_widgets/canvas_note.js
index 93d03c0b8c..7ff779eaab 100644
--- a/src/public/app/widgets/type_widgets/canvas_note.js
+++ b/src/public/app/widgets/type_widgets/canvas_note.js
@@ -87,6 +87,8 @@ export default class ExcalidrawTypeWidget extends TypeWidget {
// config
this.debounceTimeOnchangeHandler = 750; // ms
+ // ensure that assets are loaded from trilium
+ window.EXCALIDRAW_ASSET_PATH = `${window.location.origin}/node_modules/@excalidraw/excalidraw/dist/`;
// temporary vars
this.currentNoteId = "";