Mario,

Thanks for your extensive reply, a few notes: These alternate work flows 
and emphasis will most likely be accommodated, but to be clear on my own 
perceived need, some comments.

try the following lines in 0.2.3 and you'll see, it works as you expected. 
> .. *There is no need to add ticks to empty lines. *
> ´ line 1
> ´ line 2
>
> ´ line 3


*I come from the opposite position*, I want to be able to "select all" and 
apply tick, so I am happy for every line to have it, so I do not need to 
add ticks selectively. Although I may go through later and remove them or 
add content.

   - Unfortunately I can no longer see how to achieve this in the latest 
   version even with customisation and especially if I use the tick or angle 
   buttons and there are blank lines in the select.


I understand the issues with \n and \n\n so I am researching this a little 
more.

   - One use that may differ from your own is I have recently started 
   writing a book and generating copy for another book. 
   - As a result I edit to author the content, and only when I am happy, I 
   work through and decide the headings and emphasis etc. 
   - That is the content entry is a separate step, to the finessing of its 
   display. Sure I use bullets headings etc... if I know that is what I will 
   use. 
   - When one is dumping ideas, needing to think too much about how you are 
   typing, gets in the way of creative output.
   - But If I am not using a wikitext prefix (only) the result is either 
   unwanted concatenation in view or unwanted additional lines "\n\n" in the 
   raw editor.
   
And also In reality a lot of editors especially WYSIWIG, word as an example 
places a Paragraph marker in the content when one hits enter. 

   - In word processors You have to shift-enter to insert a new line only.
   - It may be standard to do <enter><enter> in Wikitext and markup but 
   this is not intuitive for those not used to writing in markup or some 
   programming.
   - Perhaps a toggle between the enter key returning one or two new lines, 
   perhaps we call 2 newlines "paragraph break" in wiki text.
   - Or I could use a keybord shortcut tool to make my numeric pad enter 
   generate \n\n as a paragraph break?

On data entry or writing in wiki markup.

   - If I am typing away, and I have entered a set of lines, that I may 
   latter apply tick to, to turn into a paragraph or div, section or article 
   or even simple bullets, 
   - I have already followed each line with a new line, perhaps this is 
   good enough as a draft effort, however when I change to view it all 
   collapses/concatenates to an unreadable single paragraph.
   - This forces me at writing to either prefix with tick etc... or use 
   "\n\n" from the get go, its forcing me to think about my layout while 
   entering text.
   - Perhaps a button on a tiddler in view mode, could toggle if 
   collapses/concatenate lines occurs in the view?

Yours Sincerly,
Somewhat lost again

Tony


On Saturday, 12 September 2020 10:41:37 UTC+10, PMario wrote:
>
> On Saturday, September 12, 2020 at 12:26:14 AM UTC+2, TonyM wrote:
>
> This is what is making me unsure, around the \n and \n\n cases;
>>
>> I did create the "Add a new-line at the end of the line" toolbar button, 
>>> that will double up every existing \n to convert a marked block of text 
>>> into html P tags.
>>
>>
>> Is this so you can take multiple lines and combine them into one 
>> paragraph?
>>
>
> No. If I want to combine multiple lines I remove the single line break. 
> ... Except for the last one it gets 2. 
>
>>
>>    - so you use \n\n as the end of block "endString"? 
>>
>> That's the default behaviour of TW. 2 newlines give a P tag. Angle qoute 
> internally uses \n\n .... All the others use \n
>
>>
>>    - Is this why you started using div for blocks because P separated 
>>    every line?
>>
>> 1 newline gives a DIV, that is styled with the same margin-top and 
> -bottom as a P tag. I used a DIV, because it is more flexible with valid 
> html content. 
>
> If you create a <p><div>....</div></p> you create an invalid html 
> structure, because P tags should only contain "phrasing content 
> <https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content>".
>  
> .. Sure browsers show it, but technically it is wrong. 
>  
>
>> The reason I wanted to do this based on \n only is as follows;
>>
>>    - if \n can be used as the end string to create a paragraph, once a 
>>    paragraph is created there is always a blank line that follows that 
>>    paragraph, HTML standard with P
>>    - if there is a second or third \n, ie blank lines and you apply the 
>>    same prefix to each then please follow what happens below;
>>
>> try the following lines in 0.2.3 and you'll see, it works as you 
> expected. .. There is no need to add ticks to empty lines. 
>
> ´ line 1
> ´ line 2
>
>
> ´ line 3
>  
>
>> In this example I use 'p to represent the custom tick for paragraph
>> Individually or bulk inclusion of the 'p<spaces> to every line gives
>> 'p Paragraph
>> 'p
>> 'p
>> 'p penultimate paragraph
>> 'p Last paragraph
>>
>> Becomes on render
>> <p>Paragraph</p>
>> <p></p>
>> <p></p>
>> <p>penultimate paragraph</p>
>> <p>Last Paragraph</p>
>>
>
> The actual code doesn't work that way anymore. ... Have a closer look. 
>  
> [...]
>
>> It seems to me that my use case exclusively needs only \n as the end 
>> string, it's when you wish to block format such as a div that this changes, 
>> and where we may want to have an alternative end string such as \n\n, 
>>
>
> Yes. That's your usecase. But in my texts there is no single linebreak for 
> a pragraph. If I do have 1 newline, I will double it. So TW will create P 
> tags. Those P tags will be styled using the "angle quote". 
>  
>
>>
>>    - Are you placing "\n\n" in the content effectivly so you can use it 
>>    as an end string?
>>
>> Yes. That was the reason for the toolbar button. 
>
>>
>>    - Or Can you NOT rely on the \n\n in the content in many cases, thus 
>>    you need to add it?
>>
>> If there are 2 newlines it's OK, if there is only 1 I'll add more or 
> remove it. ... That's how it works for me.
>  
>
>> Given we can now specify the end string, perhaps the default behaviour 
>> should be endstring "\n" on newlines (visible or not). After all this is 
>> what 
>>
>  confuses everyone new to tiddlywiki, ie when using line based wiki text 
>> the line feed is honoured
>>
>
> Most wikitext parsers works that way. That's not specific to TW.  
>
> eg * # ! a newline is created, but any "free text" ends up concatenated 
>> with the content above and the (first) new line hidden.
>>
>
> That's the default behaviour of every wikitext engine. It's the same 
> behaviour for most markdown parsers. There is only 1 exception "markdown 
> github flavour". 
>
> Even the new Commonmark spec 
> <https://spec.commonmark.org/0.29/#soft-line-breaks>uses this behaviour. 
> Have a look at the "soft linebreak" ... scroll up a little bit and you'll 
> see "hard linebreaks" definition.
>
>  
>
>> It seems to me that given the value of a 'p to resolve this issue, with 
>> line breaks, *just as every other wikitext special character does as 
>> well,* 
>>
>>    - but in this case on any/every line then this should be a primary 
>>    focus, 
>>    - with the \n\n cases only secondary?
>>
>> That's you point of view. --- From my point of view it's completely 
> different. I don't have blocks of text with only 1 newline. And if I have 
> them I either need to remove them or make 2 to indicate a new paragraph. 
> (Single newlines are poison for me. They will create problems in the 
> future. Trust me. I remove them, or use 2! Always)
>  
>
>> Restated, we need to fix the fact that in the editor
>> This is a line or paragraph
>> This is another line or paragraph
>> Automatically becomes
>> This is a line or paragraph This is another line or paragraph
>>
>
> No. That's OK and standard. TW core will not change this and it shouldn't. 
> HTML ignores \n characters completely and there is a reason! They use CSS 
> settings to show hard-line breaks. .. That's OK. We can do so now. 
>
> ´ This is a line or paragraph
> ´ This is another line or paragraph
>
> And
>> This is a line or paragraph
>>
>> This is another line or paragraph
>> *Looks the same after render*
>>
>
> If we use ticks now. ... Yes. 
>
> Note: There is no way to display this as entered (without workarounds)
>> This is a line or paragraph
>> This is another line or paragraph
>>
>
>  Sure. Just change the CSS settings and you are good to go. 
>
>
> I have chosen to use paragraphs to help when the content has many extra 
>> line breaks, but other html tags will deliver the output as seen in the 
>> editor text.
>>
>>    - Note this is \n in action not \n\n
>>
>> I hope this is clearer.
>>
>
> I think I know what you want, and all the IDs work that way. .. Except the 
> "angle quote". It works with \n\n by default, because I need it that way to 
> indent and style TW paragraphs.  
>
> As a mentor once said to me if you perceive a problem then consider some 
>> possible solutions then come to me with the "problem and possible 
>> solution", not just the problem. So I will try.
>>
>
> As I wrote. It seems my workflow is completely different to yours. But 
> that's OK. With the "tick-text" plugin I think we both can have what we 
> wanted and much more. 
>
> have fun!
> mario
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/0281cc67-4882-4e14-b1f3-c407faf0aa01o%40googlegroups.com.

Reply via email to