Add HyperLink to TextArea

I have a really simple app that outputs a long string to a textarea, is there any simple way I can hyperlinks in that string.

Good morning, @goldstein.ryan, and welcome to the Anvil Forum.

Simple answer: it’s not built-in. But it can be built.

Using the Search button above, search for “formatted text”. You’ll immediately find related articles and solutions written by other Anvil users.

2 Likes

Thanks some of those answers seem really complicated, do you think you could recommend one for me to follow?

I know almost 0 HTML and CSS, which is why i’m using anvil.

Here’s a sample project that uses BBCode to render links and other text styling into a component.

https://anvil.works/build#clone:IT2OZ2C4JD2OPXKM=2V2R4SBRDO45J7OSH64M6WLW

That should be enough to get you started for whatever your use case is.

1 Like

Thank you, I didnt have an upgraded account yet. I’m looking at displaying with a datagrid, but i may upgrade just to get my POC out the door.

You can use bbcode before you have an upgraded account, you just have to pull the source of the Python bbcode parser and add it to your project as another server module, and then import that server module.

I did that before I upgrade my account. Let me see if I can pull up an example of that.

Edit: I updated the clone example above with its own copy of the bbcode parser. Should work on an unpaid plan, it just uses the basic Python 3 runtime now, not the full one.