Reference
Every option the spotlight plugin accepts.
Enabling the plugin
format:
revealjs:
spotlight:
size: 60
revealjs-plugins:
- spotlightOptions sit under a spotlight key inside the revealjs format. The names are the plugin’s own, so they are camel case rather than Quarto’s usual hyphenated style.
Options
| Option | Default | Description |
|---|---|---|
size |
60 |
Radius of the spotlight, in pixels. 0 is read as unset and gives 60. |
toggleSpotlightOnMouseDown |
true |
Turn the spotlight on by holding the mouse button. |
spotlightOnKeyPressAndHold |
false |
A key code to hold instead. false disables it. |
lockPointerInsideCanvas |
false |
Keep the pointer inside the presentation, through the Pointer Lock API. |
spotlightCursor |
none |
The cursor while the spotlight is on. |
presentingCursor |
none |
The cursor while presenting with the spotlight off. |
initialPresentationMode |
true |
Start in presentation mode. |
disablingUserSelect |
true |
Disable text selection in presentation mode. |
fadeInAndOut |
100 |
Fade duration in milliseconds. 0 or false disables it. |
useAsPointer |
false |
Draw a coloured dot rather than dimming the slide. |
pointerColor |
red |
The colour of that dot. |
Every option is written into the deck configuration by the extension, and what you set is merged over it, so an option you leave out keeps the default in the table rather than falling back to the plugin’s own.
Presentation mode
Neither the mouse button nor the held key does anything unless the deck is in presentation mode, which is the state where the cursor is hidden and text cannot be selected. initialPresentationMode decides whether the deck starts there, and the plugin binds no key to leave it: RevealSpotlight.togglePresentationMode() and RevealSpotlight.toggleSpotlight() are exposed for a deck that needs its own control.
spotlightOnKeyPressAndHold takes a legacy KeyboardEvent.keyCode, not a key name: 73 is I, 32 is the space bar.
Limitations
- RevealJS only.
- The spotlight is drawn in the browser, so it does not survive a PDF export.
lockPointerInsideCanvasuses the Pointer Lock API, which a browser may refuse without a user gesture.