Formatting in chapter content is tag-based (<tag>...</tag>), and every tag maps to a named style that has been defined in the Style Manager.
Style tags
This is <b>bold</b> and this is <i>italic</i>.
<tagname>...</tagname>wraps the enclosed text in a span with classstyle-tagname.- That class only does something if a style with key
tagnamehas been created in the Styles Manager.<b>needs a style whose key is literallyb,<i>needs one keyedi, and so on. - A style with key
baseis special. Instead of generating a.style-baseclass, it targets the app root directly, so it acts as a default, global text style rather than something you have to wrap text in. - Tags can carry extra data after the name, e.g.
<shake 400>text</shake>. Anything after the tag name is stored and available to that style's CSS or animation asdata-args.
What a style can define
Each entry in the Styles Manager can set:
css: the base rules applied to.style-<key>(color, font-size, letter-spacing, text-shadow, transform, anything).font: a font family to use for this style.animations: one or more@keyframesdefinitions plus the rule that triggers them, for things like shake, pulse, or glow text effects.
Inline links
Talk to <link node_shopkeeper>the shopkeeper</link> about the sword.
<link nodeId>...</link> is a special style. Clicking the wrapped text jumps straight to nodeId, the same as [AutoLink(nodeId)] but as an inline hyperlink inside running text rather than a full action tag.
Comments
/* this whole block is stripped and never shown to the player */
/* ... */ comments, including a trailing newline right after the closing */, are removed entirely before the text reveals. Use them for developer notes directly in chapter content.
Suppressing a newline
A backtick immediately before a newline swallows that newline in the output. That's useful when you want to wrap a long line in your source for readability without it becoming a visible line break on screen:
This is one long line of dialogue that I've wrapped across`
two lines in the source file, but it reveals as a single line.
The same swallowing also happens automatically after any [Action(...)] tag. See Actions.