typewriterjs icon indicating copy to clipboard operation
typewriterjs copied to clipboard

Colors?

Open 2lag opened this issue 2 years ago • 1 comments

Not an issue, more of a question about if something is possible, and if not, if it can be made possible, but can the callFunction() function be used in vanilla JavaScript to change the color of the outputted text? It's not working if I set a div or span around the text, so it wouldn't be possible with document.getElementsByClassName or document.getElementsById within the typeString function, but maybe I'm going about it the wrong way...

If anybody could at least point me in the right direction it would be greatly appreciated!

Thank you in advance!

2lag avatar Nov 20 '22 09:11 2lag

as per the documentation it is possible to output colored texts via:

typewriter .typeString('<span style="color: #27ae60;">5kb</span>') .start();

Does this help?

kenshanta avatar Jan 03 '24 15:01 kenshanta