Skip to main content

Autoscroll & Highlighting

Autoscroll and highlighting are key features of the Speechify ecosystem that make it easy for users to follow along while they listen. Both of these features are enabled by default.

To control them, use the enableAutoScroll and enableHighlighting properties.

Example

Here's an example where both autoscroll and highlighting are disabled.

import(
"https://storage.googleapis.com/speechify-api-cdn/speechifyapi.min.mjs"
).then(async (speechifyWidget) => {
// widget configuration
const config = {
rootElement: document.getElementById("article"),
useSpeechifyRoot: true,
enableAutoScroll: false,
enableHighlighting: false,
};
// initialize the widget with config and mount it on the page
const widget = speechifyWidget.makeSpeechifyExperience(config);
await widget.mount();
});