slideBackground
Emit the reveal.js HTML comment that sets a slide's background color. Interpolate the result anywhere in a Markdown slide's content{} block — its own line reads best:
markdownSlide {
content {
"""
## Title
${'$'}{slideBackground("#7fbf7f")}
Some body text.
"""
}
}Content copied to clipboard
Placement used to matter: serialization moved the comment onto its own line and indented it, which after a heading made it an indented code block that reveal.js never read. Markdown is now emitted as a text node, so it arrives exactly as written. A dslSlide has no equivalent need: use slideConfig { background } there.
Parameters
color
any valid CSS color value (hex, rgb, named color).