-
|
How can I create a template that sends its output to the clipboard instead of inserting it into the current file? And to be clear the challenge I have is how to capture the output. If I knew how to do this then I am confident I can use js to send it to the clipboard. |
Beta Was this translation helpful? Give feedback.
Answered by
Zachatoo
Nov 2, 2025
Replies: 1 comment 3 replies
-
|
Stick this line at the end of your template to copy the output of the template to your clipboard instead of inserting at the current cursor location. The first part copies the template output to your clipboard, the second clears the output so nothing is inserted. <%* await navigator.clipboard.writeText(tR); tR = ""; -%> |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah, I only tested with execution commands, not interpolation commands. This should work. There's probably a way to do it with interpolation commands as well but it'd be more complicated.