trilium icon indicating copy to clipboard operation
trilium copied to clipboard

Cannot add libraries(Bug report)

Open BadCactus634 opened this issue 2 years ago • 5 comments

Trilium Version

0.54.3

What operating system are you using?

Windows

What is your setup?

Local + server sync

Operating System Version

Windows 10 Home version 21H2

Description

I have spent almost two hours to trying to figure out how am I suppose to use the icons libraries in the Canvas thing. I've searched on Google but didn't find anything at all. Even the wiki doesn't mention it. This is the function I am referring to: image image

I can do two things: click on the blue button and add a library by file, or click on the purple one and go to a library list, but from there I can only download them, because if I click on the "Add to Excalidraw" thing than all I get are errors saying that I am not logged in.

If I download the desired library and I use the blue button in Trilium, I am able to add the library BUT, if I dare to restart the app than all the libraries that I've previously imported are gone. Why? I can't spend 5 minutes every time I open the app or reload the browser window (if I use the server version) to add all the libraries that I use. And why the documentation does not provide any details about these libraries?

BadCactus634 avatar Sep 18 '22 20:09 BadCactus634

The integration with excalidraw is not perfect and some feature might not work fully. I don't know about this specific one, maybe @thfrei might know?

zadam avatar Sep 19 '22 20:09 zadam

It does NOT work. I didn't even know, that you can manually upload a library.

However it is on the roadmap. The idea is to manually add the libraries json as a json-note into trilium and then reference it. See here: https://github.com/zadam/trilium/blob/b8a89ee52ac49994a6f1de9efa4808915f59b784/src/public/app/widgets/type_widgets/canvas.js#L80

So I'd say it is a feature request :-)

thfrei avatar Sep 20 '22 13:09 thfrei

Glad to see that is not only my problem. Thank you, will wait for the feature to be added 😅

BadCactus634 avatar Sep 20 '22 16:09 BadCactus634

Any update on this? As there will be a RFC on image support in https://github.com/zadam/trilium/issues/3682.

Nriver avatar Mar 15 '23 08:03 Nriver

No progress yet. I checked and it looks like excalidraw has some library related API - https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/#onlibrarychange

zadam avatar Mar 15 '23 15:03 zadam

It does NOT work. I didn't even know, that you can manually upload a library.

However it is on the roadmap. The idea is to manually add the libraries json as a json-note into trilium and then reference it. See here:

https://github.com/zadam/trilium/blob/b8a89ee52ac49994a6f1de9efa4808915f59b784/src/public/app/widgets/type_widgets/canvas.js#L80

So I'd say it is a feature request :-)

So sorry, I've added new note json with contents downloaded from excalidraw. But I don't know how to reference this for my new canva note. Could you please let me know. Thank you so much for the genius notes!

NguyenThiHuongVN avatar Oct 06 '23 02:10 NguyenThiHuongVN

Support for persisting excalidraw libraries has been added in 0.61 beta.

zadam avatar Oct 06 '23 18:10 zadam