Here are two more examples.
You must hard code any spaces.
( can use either: &nbsp; or &#32; )
font-family: monotype corsiva;
filter: flipH() flipV();
Add a space between letters and double space between words.
var str = "T h i s&#32;&#32;i s&#32;&#32;m y&#32;&#32;v e r t i c a l t e x t".replace(/ /g, '<br>');
The forum removes the double spaces.
Which are now represented by: &#32;&#32;
Adios's example works as written.
If it did not work for you, you must have done something wrong.