RESOLVED - iscript-... target? A way to add more control where expansions are inserted #35
Replies: 1 comment 1 reply
-
I like these ideas a lot, and will add them to the next release. I honestly haven't worked with the ^id system much, but I'll look into it. One clarification:
If the second is preferred (which, again, makes sense) then one solution would be: on the first click of "iscript-after", an ^id is added to the next output position, and the "iscript-after" link is replaced with "iscript-append ^id". If you have further thoughts on this then I'd love to hear them. |
Beta Was this translation helpful? Give feedback.
-
Currently, the three ways to craft link-trigger inline scripts are:
iscript
to do the expansion in-place repeatedly.iscript-once
to do the expansion in-place once, permanently.iscript-append
to add the expansion to the very end of the note... no matter how large the note is or how many different links you might have running inline scripts.I propose two new options to control where in a note the expansion is added with a bit more nuance.
iscript-before: d20 | Roll a d20!
to insert the results before the link.iscript-after: d20 | Roll a d20!
to insert the results after this link rather than after the contents of the entire noteAND, also a proposed option to all of these to control the target of where the insert happens in relation to. For example, to make an inline script link that appends to a specific list on a page, or even to the top of the list.
script ^roll-result: d6 | Roll 6!
to replace the block identified as^roll-result
in the current note. This would replace the block contents but keep the identifier on it.script-append ^todo-list: new-todo
would add a new item to a list in the section^todo-list
Beta Was this translation helpful? Give feedback.
All reactions