Creating a new line by [Enter] key

169 views
Skip to first unread message

Edgaras

unread,
May 14, 2020, 7:17:03 AM5/14/20
to TiddlyWiki
Is there a reason why the natural behaviour of TW is not to create a new line (paragraph) when I tap [Enter] key on the keyboard?

Is there a way to change this default behaviour?

Edgaras

unread,
May 14, 2020, 7:51:03 AM5/14/20
to TiddlyWiki
Sorry, I just noticed similar thread exists here:

PMario

unread,
May 14, 2020, 2:03:31 PM5/14/20
to TiddlyWiki
On Thursday, May 14, 2020 at 1:17:03 PM UTC+2, Edgaras wrote:
Is there a reason why the natural behaviour of TW is not to create a new line (paragraph) when I tap [Enter] key on the keyboard?

Is there a way to change this default behaviour?

IMO: Use 2 linebreaks and you are good to go.

Using single line breaks and the "workaround" described in the linked thread, will cause problems in the long run. IF you start to use advanced wikitext functions, like macros and widgets.

If you stay within "prose text" you should be fine!

-m

Edgaras

unread,
May 14, 2020, 2:11:43 PM5/14/20
to tiddl...@googlegroups.com
Yeah, I was hesitant to try those "hacks" there. I like clean solutions.

I could do 2 line-breaks, but it's visually distracting, the space in between lines is way too big. Especially in cases like this:

This is my list title:
- List element
- List element
- List element

The list title text will be too high. And many other cases...

Or at least it could work by pressing "SHIFT+ENTER", like in many other apps.

TonyM

unread,
May 14, 2020, 7:07:06 PM5/14/20
to TiddlyWiki
Edgaras,

In a way in this example you are asking for "-" to be a markup. We can argue until the cows come home about the way tiddlywiki handles line breaks/paragraphs, trust me I have, but we come to accept it and use the work arounds. 

We already have the ";" and ":" symbols you can use, try this on tiddlywiki.com

;This is my list title:

:- List element
:- List element
::- List element
:- List element


The most flexible work around is to use html and css to alter the symbol displayed in a list such as using the OL UL html tags.

Searching this forum you will see references to the dot paragraph idea, that would allow you to replace ";" with "." to have an unbolded line/paragraph result, 
although I may have found an alternative.

Is this enought?

Regards
Tony

Edgaras

unread,
May 14, 2020, 8:29:57 PM5/14/20
to TiddlyWiki
Thanks Tony, but I would not use this. This gives me html structure that I would probably never use:

<dl><dt>This is my list title:</dt><dd>- List element</dd><dd>- List element<dl><dd>- List element</dd></dl></dd><dd>- List element</dd></dl>

I think I am fine with tiddlytext or markdown regular list markup. I think I will just have to get used to the way the paragraphs are displayed. I just get unexpected outcome sometimes in the view.

Eskha

unread,
May 18, 2020, 10:47:57 AM5/18/20
to TiddlyWiki
Hello Edgaras,

If you are concerned by the display in "view mode" (and not only in "edit mode"), for instance the vertical display between a paragraph text and the first following bullet, you can customize the CSS value for top and bottom margin and padding.

For instance, I use the following value (in a tiddler tagged with $:/tags/Stylesheet)


/* Simple Paragraph */


.tc-tiddler-body p,
.tc-tiddler-preview-preview p {
    margin: 0.8em 0 0 0;
    padding: 0;
    text-indent: 0;
}


/* Unordered lists */

.tc-tiddler-body ul,
.tc-tiddler-preview-preview ul {
    margin: 0;
    padding: 0 0 0 3em;
}

.tc-tiddler-body ul ul,
.tc-tiddler-preview-preview ul ul {
  padding-left: 1.25em;
}


/* Ordered lists */

.tc-tiddler-body ol,
.tc-tiddler-preview-preview ol {
    margin: 0;
    padding: 0 0 0 3em;
}

.tc-tiddler-body ol ol,
.tc-tiddler-preview-preview ol ol {
  padding-left: 1.25em;
}


/* Lists item */

.tc-tiddler-body li,
.tc-tiddler-preview-preview li {
    margin: 0.2em 0 0 0;
    padding: 0;
}


Best regards,

Eskha
Reply all
Reply to author
Forward
0 new messages