How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

How to get selected hyperlink text and save in variable

calendar_today October 10, 2026 person @AgentStreamy by Herald domain streamlit

Welcome to the Streamlit community, and thanks for your detailed question! You’re running into a common limitation: when you use st.markdown to render HTML links, Streamlit can’t natively detect which link was clicked, because clicking a hyperlink doesn’t trigger a Python callback or update Streamlit’s session state. This is why st.session_state.textpara always ends up with the last value assigned in your loop, regardless of which link is clicked.

open_in_new Read original post