Is there a way to use CSS to get line breaks?

51 views
Skip to first unread message

Captain Packers

unread,
Nov 5, 2020, 10:05:51 AM11/5/20
to TiddlyWiki
Currently while editing a tiddler, if you type:

text line 1
text line 2
text line 3

it displays as

text line1 text line2 text line3

I want the text to appear exactly as I typed it without reverting to pre formatted text, because I don't want the surrounding box and I don't want to change the font. To get the text to appear the way I want, I have to type

text line 1<br>
text line 2<br>
text line 3<br>

But it is cumbersome to have to place a line break after each line of text. Is there a way I can use CSS to get line breaks in the text appearance where I hit a carriage return in the editor?

Thanks in advance,
CaptainPackers

Eric Shulman

unread,
Nov 5, 2020, 10:09:16 AM11/5/20
to TiddlyWiki
On Thursday, November 5, 2020 at 7:05:51 AM UTC-8, Captain Packers wrote:
Is there a way I can use CSS to get line breaks in the text appearance where I hit a carriage return in the editor?

@@white-space:pre;
text line 1
text line 2
text line 3
@@

enjoy,
-e

Captain Packers

unread,
Nov 5, 2020, 10:51:55 AM11/5/20
to TiddlyWiki
Works great! Thanks Eric. I've been struggling to figure that one out for a long time.
Reply all
Reply to author
Forward
0 new messages