tameemsafi / typewriterjs

A simple yet powerful native javascript plugin for a cool typewriter effect.
https://www.npmjs.com/package/typewriter-effect
MIT License
2.49k stars 221 forks source link

How to use special characters ? #140

Closed gcabillic closed 2 years ago

gcabillic commented 2 years ago

Hi, and thanks for your excellent plugin.

I got an issue regarding the use of special (french) characters.

I want to dump the word 'managé' - so, I used the html encoding 'managé' as the typeString. But when running, it shows 'managé' and not 'managé'

Do I need to add a flag or do it in another way ?

Thanks! G.

My code:

const typewriter = new Typewriter('#sdlogoText', {
        loop: true,
        delay: 75,
    })

    typewriter
        .pauseFor(200)
        .typeString('managé')
        .start();
gcabillic commented 2 years ago

FYI Found a solution using Javascript string encoding. typeString('manag\u00e9')