Changes
- The math plugin now supports three typesetting libraries: KaTeX, MathJax 2 and MathJax 3. We continue to use MathJax 2 as our default so this is fully backwards compatible. Learn how to choose between typesetters and how to configure them in the docs at https://revealjs.com/math#typesetting-libraries (@burgerga in #2559).
- New event:
beforeslidechange
(#3003). This makes it possible to conditionally prevent navigations:// This prevents all slide changes Reveal.addEventListener( 'beforeslidechange', e => e.preventDefault() );
- New keyboard shortcut for skipping fragments while navigating: alt + ←/↑/→/↓.
- New API option for skipping fragments in directional navigation
Reveal.right({ skipFragments: true })
. - Adds a
beforeHighlight
callback to the highlight plugin (@rajgoel in #3026).Reveal.initialize({ highlight: { beforeHighlight: (hljs) => { // interact with highlight.js, for example to register a new language } } })
- Code line numbers can now start from an offset (#3050). For example, this code block would begin its line numbering from 10:
<code data-ln-start-from="10">
. - Better error messaging when the
.reveal
or.slides
containers are missing #2217.
Fixes
- The last slide keyboard shortcut now works for looped presentations (#3007).
- Markdown code blocks can be turned into fragments (@nicojs in #2982).
- Unit tests can now run in Windows (@Vandivier in #3027).
- Restored support for base64 background images, broken since 4.1.1 (#2978).
- Fixes an issue that prevented presentations from looping when
navigationMode
was set tolinear
. - Internal links leading to a slide with video/audio element will now correctly start media playback. This issue only affected mobile browsers.