Dynamically Change Highlight.js Theme with Button Toggle (Light/Dark Mode)
I’m using the highlight.js library to display code snippets on my webpage. I’d like to add a button that allows users to switch between light and dark themes for the code snippets. Ideally, clicking the button should dynamically change the CSS theme file linked to highlight.js, transitioning the code snippet’s appearance from light to dark or vice versa.