Replies: 2 comments 4 replies
-
|
Not with a button to render when the user want it, but since codeblocks are not editable anyway there is Each codeblock that you mark with |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks for this. Not sure if this will help me. I need to take the code block and submit it to an API/Endpoint for processing then render the response. Seems that this actually tries to run the code in situ. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm experimenting with building out some documentation using Starlight. The docs will contain lots of code blocks. I would like to bind a button to each block which would grab the content of the block and submit it to a server side function/api for processing. I would then like to render the response below the code block. Basically interactive docs. Is there an obvious way to do this using astro/starlight ? Has anybody done something like this previously ?
Beta Was this translation helpful? Give feedback.
All reactions