HTML Render Component - Capturing Link URL during OnLinkPress Event

Hi there AG community,

I’m passing through dynamic html content into the HTML Renderer component using a data resource and I am struggling to figure out how to capture the link URL that a user presses to pass as a parameter when opening my webview page within the app.

At times I’ll have multiple links and dynamic text within the same HTML Renderer component and I’d like to keep the user within the app versus opening a Google Chrome or Safari web browser.

I’ve connected the logic node onLinkPress --> Open Page Navigation but can’t figure out how to capture the URL for the specific link that was pressed.

I originally tried using the rich text component and markdown syntax but couldn’t figure it out using that component either.

Any suggestions or thoughts?

Hmm, I haven’t really worked with HTML Renderer but you should try to see if the event the onLinkPress event emits has the info about the URL. Do this by e.g. alerting with a formula ENCODE_JSON(outputs["Component onLinkPress"].eventValue) or .event :thinking:

1 Like

Thanks @Mevi! It worked just using the formula and didn’t need to utilize Encode_JSON function. It seems that just the standard binding didn’t match up but switching to a formula works just fine.

:unicorn: :unicorn: :unicorn: :unicorn: :unicorn: :unicorn: :unicorn: :unicorn: :unicorn: :unicorn: :unicorn: :unicorn: :unicorn: :unicorn: :unicorn: :unicorn: :unicorn:

1 Like