logseq-music-notation icon indicating copy to clipboard operation
logseq-music-notation copied to clipboard

Explanation of slot ui

Open fivestones opened this issue 3 years ago • 1 comments

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!

fivestones avatar Sep 05 '22 16:09 fivestones

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! 😄

phoebejaffe avatar Oct 10 '22 21:10 phoebejaffe