Annotated_text in Streamlit

Hi,

I am using the package st-annotated-text to highlight some words in texts on my streamlit app.
However, I noticed that when the text is too long, the app shows a truncated text.
Someone had the same problem ? Is there anyway to solve this problem ?

Thanks,

Hi @syo, welcome to the Streamlit community!

@thiago wrote this package, maybe he has some suggestions. Tagging him here for the next time he comes to the forum.

Best,
Randy

Hey @syo ,

I had the same problem once.

Following the #7 you can see that passing a height might work:

annotated_text("This is text", height=200)

If it does not work, you can still follow along the commit and change it in the package by
adding **kwargs to streamlit.components.v1.html(str(out), **kwargs) and def annotated_text(*args, **kwargs). Hope that helps.

1 Like

Hi,

Thanks @randyzwitch, I’ll tag for the next time.

Thanks @chris_klose for your help !

You’re welcome :slight_smile: