I know this can't be too hard using prerender or postrender, but I'm not having luck at the moment...
I just want:
<div class="passage">My passage text</div>
to become:
<div class="passage"><div class="my-wrapper">My passage text</div></div>
for every rendered passage. And preferably as early as possible (so that other scripts looking for "my-wrapper" class would still have time to do things in postrender).
Twine 1.4 + SugarCube 2.
Thanks for any help!
Comments
Beyond that, to answer the question asked. Something like that can't be done until postrender. Try something like the following:
The reason for adding the wrapper class is to add a 'typed' container div to passages automatically, for use with typedjs (so all passages will be automatically typed). I want to add a wrapper rather than simply adding '.typed' to the passage div for styling purposes.