No newline in the quote part

67 views
Skip to first unread message

imleg...@gmail.com

unread,
Aug 21, 2020, 9:16:44 AM8/21/20
to tiddl...@googlegroups.com

t.png

Plz check that the newline mark not shown in the quote part after render, why this happpened. 

I think the quote content should be
export xxxxx
export xxxxx
export xxxxx

like this. 

One more question please, how to filter posts in this new format google group.

Eric Shulman

unread,
Aug 21, 2020, 10:39:59 AM8/21/20
to tiddl...@googlegroups.com
On Friday, August 21, 2020 at 6:16:44 AM UTC-7, imleg...@gmail.com wrote:
Plz check that the newline mark not shown in the quote part after render, why this happpened. 

I think the quote content should be
export xxxxx
export xxxxx
export xxxxx

like this. 

As with all web content (not just TiddlyWiki), HTML content is rendered "inline", which joins separate lines and reduces multiple spaces to single spaces.

Thus, the following:
foo bar
baz    mumble frotz
gronk
snork      snerfle     argle bargle

is displayed as:
foo bar baz mumble frotz gronk snork snerfle argle bargle

Blockquotes in wikitext (see https://tiddlywiki.com/#Block%20Quotes%20in%20WikiText) are no exception.

To force a newline within HTML content, it is standard practice to embed <br/> where you want the newline to occur.

Of course, this can be somewhat inconvenient when you have multiple lines of content for which you want each line to remain separate.

In this case, you can use CSS to control the "white-space" handling, like this:
<blockquote style="white-space:pre;">
line one
line two
line three
</blockquote>

You can also accomplish this using a CSS *classname*:
<style> .whitespace { white-space:pre; } </style>

<blockquote class="whitespace">
line one
line two
line three
</blockquote>

The same CSS class technique can also be applied to TW wikitext blockquotes, like this:
<style> .whitespace { white-space:pre; } </style>

<<<.whitespace
line1
line2
line3
<<<

Note that, rather than putting the <style>...</style> directly in the tiddler content, it is better to put it in a separate tiddler which will define the class once for use as many times as you like:

1) create a tiddler, e.g., MyStyles, tagged with $:/tags/Stylesheet, containing:
.whitespace { white-space:pre; }

2) Use that CSS class anywhere you like:
<<<.whitespace
line 1
line 2
line 3
<<< 

enjoy,
-e

Zhe Lee

unread,
Sep 12, 2020, 11:59:16 PM9/12/20
to TiddlyWiki
Hi anyway to make all the tiddlder process newline as usually processed for all tiddler? 

For now make double enter as newline a litter boring

Reply all
Reply to author
Forward
0 new messages