Hello,
I wanted to create a console log typing effect with the GSAP TextPlugin. I have a container that has preserved formatted text (spaces for indentations and line breaks without <br>) that I tried to animate with gsap.from() method and the text: {value: ""} property. However, when not manipulated by GSAP, the formatting is fine. But when I used the method mentioned above, all indentations and line breaks are not respected.
Is there a way for GSAP to preserve such format?
I have tried the below example to simulate a text typing effect (another version with a timeout/await between each iteration) but I lose easing functionality that I would really love to have, though the method preserved the formatting.
for (var i = 0; i < text.length; i++) {
container.textContent += text[i]
}
Thank you for your considerations.