Selecting part of a text widget - save highlighted text to OnLoadVariable?

Hi folks - pretty sure you can’t do this - BUT thought I’d ask the community! :slight_smile:

I’d like to double click within a text paragraph to highlight some text - or come to that use any valid text selection method (eg click and strike over). And for the highlighted text to get saved to a variable.

Pretty easy if it’s the whole of a text widget - but I’d like it to work on selected text within a widget.

Any wisdom available - greatly appreciated! Cheers - M

Just toying with making text links within the paragraph - and then gaming them to work in the way I want - bit off a faff though! (And doesn’t work he added)

maybe you need to inject javascript:

https://odjeoc.axshare.com

but i dont’t think that is axure in my mind.

2 Likes

Thanks Jorkin - can you share the source .rp? M

highlight_selection.rp (48.6 KB)

1 Like

Thanks @Jorkin - got it working :+1:

For any others who are non-technical - like me (!) - the magic is happening in a couple of places…

There’s an PAGE LOADED ‘Open Link’ script which is opening some javascript:

And some deep dark magic going on in web fonts - I really really haven’t a clue - and as @Jorkin says - not much to do with Axure.

To get it working in your project download Jorkin’s file - and in your file import the page from Jorkin’s download - straightforward - and also the HTML configuration - which includes the font magic.

You need to copy the Pageload script to any page you want to run it on and also make sure you’re previewing / exporting using the correct HTML configuration.

Thanks again @Jorkin - M