invicticide / fractive

Fractive is a free, open-source, Markdown-based hypertext authoring tool for writing interactive fiction.
http://fractive.io
Other
38 stars 5 forks source link

Functions to generate links at runtime? #61

Closed NQNStudios closed 1 month ago

NQNStudios commented 6 years ago

I can imagine scenarios where I want to generate a list of links at runtime depending on runtime variables. Right now I'd have to generate my own <a> tags, set the data attributes I want, and also call RegisterLinks(), right?

It might be nice to create links with some function like, Core.GenerateLink(linkText, linkDestination) that could compile macros and/or markdown in the link text, and macros in the link destination.

For a concrete example of how this would be useful, I might want to generate a table of contents at runtime.