ink icon indicating copy to clipboard operation
ink copied to clipboard

External links?

Open jgurang opened this issue 8 years ago • 3 comments

Hi-- just wondering if anyone knows how to link out of an Inky story. Wrapping an <a> tag around the choice doesn't seem to do it-- any ideas? Many thanks!

jgurang avatar Oct 25 '17 20:10 jgurang

You'll need to add some code into the game layer; I'm guessing you're using the "export to web" option so you'll need to add it to the javascript file that's exported (and then use "export story.js" option so you don't overwrite your changes!)

How you do it is up to you - you'll need to parse the output from the story somehow and turn it into a link. Good luck!

On Wed, Oct 25, 2017 at 9:27 PM jgurang [email protected] wrote:

Hi-- just wondering if anyone knows how to link out of an Inky story. Wrapping an tag about the choice doesn't seem to do it-- any ideas? Many thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/inkle/ink/issues/378, or mute the thread https://github.com/notifications/unsubscribe-auth/AA40o0pUvfi5LV_kCqyR9NKGpOmwL2Ugks5sv5mrgaJpZM4QGnBk .

joningold avatar Oct 25 '17 21:10 joningold

You've probably worked it out by now given that this was 2 and a half years ago, but for anyone else finding this issue:

I was able to create an external link by just including the following in the text of my story

<a href="https:\/\/www.google.com">click here</a>

It doesn't display properly in the Inky IDE, but it works fine when exported to web

CruseCtrl avatar Apr 06 '20 22:04 CruseCtrl

You've probably worked it out by now given that this was 2 and a half years ago, but for anyone else finding this issue:

and now we dig it out again.. ;)

I was able to create an external link by just including the following in the text of my story

<a href="https:\/\/www.google.com">click here</a>

Or even in a new tab to not break your flow in the story: <a target="_blank" rel="noopener noreferrer" href="http://your_url_here.html">Link</a>

pipuvic avatar Dec 29 '20 18:12 pipuvic