I'm working on a more robust solution, but in the meanwile I hacked together a little script that turns {http://example.com Link name} into a hypertext link.
Edit the main HTML file (if you use the release with an interpreter option it's play.html, otherwise index.html). Add the following script somewhere appropriate, just before the </body> tag at the end is a good place:
Code:
<script>
$( document ).bind( 'TextOutput', function( data ) {
$( '#content' ).html( $( '#content' ).html().replace( /{(.*?)([\< ].*?)}/g, '<a href="$1" target="_blank">$2</a>' ) );
} );
</script>
This will open the links in a new window. If you want to open the links in the same window just remove the
target="_blank" part from the above.
You must also remove the word
defer from the script tags that load the libraries at the start of the file:
Code:
<script src="interpreter/jquery.min.js"></script>
<script src="interpreter/parchment.min.js"></script>
(these say lib/ instead of interpreter/ if you use the stand-alone Parchment installation.)
This works only in the latest version of Parchment. If you're using the one built into Inform, you have to update the Parchment library files and the jQuery library. Download these files:
parchment.min.js,
zmachine.min.js and
jquery.min.js and replace the old ones in the interpreter directory.
Now you can add hyperlinks in Inform like this:
Code:
Test is a room. "Visit {http://intfiction.org/forum Intfiction.org forums} and {http://ifdb.tads.org IFDB}!"
Remember that this is just a very quick and dirty hack and it's not supposed to be a general solution. Also, because it runs the whole story text through the regex every time it might slow down the interpreter if the transcript is very long, but I suspect it would become a problem only after an hour of play or so. I haven't tested this with Internet Explorer but I don't see a reason why it wouldn't work (although you never know).