nutshell icon indicating copy to clipboard operation
nutshell copied to clipboard

Unable to change Nutshell options

Open cs-mshah opened this issue 2 years ago • 1 comments

I tried to include nutshell using the script tag, but inside it, even after changing the options, they don't reflect in the webpage.

<script src="https://cdn.jsdelivr.net/gh/ncase/nutshell/nutshell.js">
    Nutshell.setOptions({
        startOnLoad: true, // Start Nutshell on load? (default: true)
        lang: 'en', // Language (default: 'en', which is English)
        dontEmbedHeadings: true // If 'true', removes the "embed this as a nutshell" option on headings
    });
</script>

The dontEmbedHeadings still shows the nutshell logo next to headings.

cs-mshah avatar May 27 '23 05:05 cs-mshah

Hi, I think it works if you split it into two script tags, like this:

<script src="https://cdn.jsdelivr.net/gh/ncase/nutshell/nutshell.js"> </script>
<script>
    Nutshell.setOptions({
        startOnLoad: true, // Start Nutshell on load? (default: true)
        lang: 'en', // Language (default: 'en', which is English)
        dontEmbedHeadings: true // If 'true', removes the "embed this as a nutshell" option on headings
    });
</script>

mr4tt avatar Apr 03 '24 13:04 mr4tt

Thanks. This indeed worked!

cs-mshah avatar May 19 '24 06:05 cs-mshah