What I’m trying to do
I am trying to understand how to refer to code blocks by ID. While there is information explaining about putting ^id
at the end of a code block, there is much less about how to refer to that using backtick id backtick to “execute” the code blocks in other places. I have been able to make it work (by duplicating the examples on the buttons plugin documentation and making some of my own), I’d like to understand the backtick behavior a little better.
One specific thing I’d like to do: I’d like to see inserted code block executed in edit mode. For example, inline buttons show up fine in edit mode, but the “buttons by reference” (using the backtick thing) only works in read mode (in edit mode, I see the ID in the backticks). Is there something else (besides backticks) that can do this? Or a way to change backtick behavior?
Also: this doesn’t seem to work for tasks code blocks. Is the backtick behavior just for buttons?
Things I have tried
I have been able to make code block references by ID work (mainly learning from the button examples).
I did find the code block id documentation via There's nothing on help.obsidian.md describing block IDs and references - which lead me to the code block documentation, but told me little about how to “execute” an id once I’ve defined it.
I spent a frustrating morning wondering why the examples didn’t work, until I realized they did work just fine in read mode.
I tried a few experiments using the code block ids with tasks code blocks, but was unable to make them work.