phoebejaffe / logseq-music-notation

MIT License
19 stars 3 forks source link

Explanation of slot ui #2

Closed fivestones closed 1 month ago

fivestones commented 2 years ago

I'm trying to figure out how to render an svg in logseq in a plugin I'm working on. I have the svg element with the svg data, and I think what I need to do is something like what you did in this plugin, using the slot ui. I saw the documentation at https://logseq.github.io/plugins/interfaces/IAppProxy.html and I looked at your code (the logseq.App.onMacroRendererSlotted(async (event) => { and logseq.provideUI({... bits, but I don't really understand how it works. Did you learn from some other documentation I haven't seen, or just figure this out? Do you have time to explain it? Thanks!

phoebejaffe commented 2 years ago

Sorry for the late reply @fivestones! I also found it very undocumented, so I searched around github code to find other people using it, and asked around on the Logseq Discord group. Sadly I probably don't have much more context for you, but if you add your voice to the voices asking them to document it better, maybe it'll get on their todo list. Best of luck! 😄