vUX / AutoWriter / v4.1.0

Built for

writer.writeText(h1, "Type it. Pause it. Take it back.~1200~")

01Playground

Edit the script, move the sliders, press Run. Everything below is one writeText() call: the pauses and the backspacing are in the string, not in your code.

Script
Config
output
idle
Equivalent code

                

02Directives

Three sequences are read as instructions instead of being typed. Everything else goes in literally.

|

Line break

Inserts a real <br>. It counts as one erasable unit, so backspacing through it removes the break whole.

*n*

Backspace

Deletes n units at typing speed, then carries on with the rest of the string. Sequenced, never racing.

~n~

Pause

Waits n milliseconds. The caret blinks while it waits, which is the only time it blinks.

03One call, many elements

Hand writeText() a NodeList and a matching array of strings and they type in sequence: each starts when the last finishes. The callback runs once, at the end.

01 / DECLARE

02 / CONFIGURE

03 / WRITE

04Bad input fails immediately

Directives are checked when writeText() is called, not when they are reached, so a typo throws to your code straight away instead of failing seconds later inside a timer.

No error yet: press one of the buttons above.