how to process the newline mark as the normal text?

55 views
Skip to first unread message

imleg...@gmail.com

unread,
Oct 7, 2020, 9:02:30 AM10/7/20
to TiddlyWiki
Normally when I type `enter` newline mark in the tiddlywiki it will be render as none. Double `enter` will be render as one newline mark in the tiddlywiki. How to make just one enter to one enter just like normal text editor?

Eric Shulman

unread,
Oct 7, 2020, 10:04:39 AM10/7/20
to TiddlyWiki
On Wednesday, October 7, 2020 at 6:02:30 AM UTC-7, imleg...@gmail.com wrote:
Normally when I type `enter` newline mark in the tiddlywiki it will be render as none. Double `enter` will be render as one newline mark in the tiddlywiki. How to make just one enter to one enter just like normal text editor?

By default, TiddlyWiki content uses standard HTML formatting for newlines; i.e., text is automatically "flowed" and word-wrapped without regard to embedded newlines.  Unlike HTML, TiddlyWiki uses a doubled newline to indicate a paragraph break (HTML uses a <p> tag for this purpose).  There are several ways to bypass this automatic formatting.

See https://tiddlywiki.com/#Hard%20Linebreaks%20with%20CSS for one method.  You can apply a CSS "white-space" attribute to any section of text you like.

For example, to "preserve" all whitespace as-is, you can write:
<div style="white-space:pre">
...your content here...
</div>

You can also use TiddlyWiki wikitext syntax to achieve a similar (but not identical) result:
```
This text is multi-line and preserves all whitespace.
It also uses a fixed width font (like a typewriter)
and surrounds the content with a border and background 
```

Hope this helps...

enjoy,
-e
Reply all
Reply to author
Forward
0 new messages