Similar to my <<timedreplace>> macro, this macro creates an internal link that, when clicked, vanishes and is replaced with whatever is between the << replace >> and << endreplace >> tags. This could be useful if (just for starters) you want to have a passage that can be modified by clicking specific details inside it.
Copy the code in here: http://www.glorioustrainwrecks.com/files/TwineMacro-Replace-1.1.0.txt
By default, the text instantly appears with no transition. You can give the replaced text a fade-in transition using this CSS:
.replacement-in {
opacity: 0;
}
.replacement {
transition: 1s;
-webkit-transition: 1s;
}(Feel free to customise this CSS to make your own transition style.)You see <<replace "a half-eaten cake">>a plate of crumbs<<endreplace>>| Attachment | Size |
|---|---|
| TwineMacro-ReplaceTest.html | 186.33 KB |
| TwineMacro-Replace-1.1.0.txt | 1.57 KB |