Ciao TonyM

I thought it an interesting question because its trying to find a direct 
simple solution to a layout issue that makes a bunch of sense. 

I thought that PMario's later comment, a pointer, helpful in underlining 
that, actually, HTML is *not* that brilliant on variation.

> There is a limited amount of "text content" html tags 
> <https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Text_content>. 
> Some of them do include indentation by default. Most of them don't. 
> IMO candidates are: 
>  - OL
>  - UL
>  - DL
>  - P  


The issue, I think, is, as you indicate, about parsing? Or, maybe, CSS?

One solution might be to write a modified (JS) parser that will recognise  
either additional characters, or perhaps "combos" of what exists, e.g. ::, 
:;, etc. The issue is the nesting to produce valid HTML, for that, nesting, 
the List parsers would be helpful models. 

Another way might be through CSS because you could define a cascade of 
styling that could be applied differently to different HTML nesting 
structures.

My tuppence
TT

On Sunday, 1 September 2019 05:10:06 UTC+2, TonyM wrote:
>
> Folks,
>
> I make use of the semi-colon and colon a lot to prefix lines. I believe I 
> have identified a very helpful additional wikitext rule.
>
> On parsing *";"* produces the html
> <dl><dt>DL dt content</dt></dl>
> *A Bold line staring at position 1*
>
> On parsing *":"* produces the html
> <dd>DT content</dd>
>     A non bold indented
>
> On parsing ::: produces the html
>
> <dl><dd><dl><dd><dl><dd>Three deep</dd></dl></dd></dl></dd></dl>
>
>                A non bold indented three deep
>
> This behaviour is very useful because you can add a paragraph that wrapps, 
> and a custom editor toolbar button allows one to select multiple rows and 
> apply a leading character.
>
> However it would be useful to extend this with another character that on 
> parsing produces the following html
>
> <dl>DL content</dl>
>
> A non bolded paragraph staring at position 1, or effectively a paragraph
>
> I would like to;
>
>    - Identify a *suitable character* to do this perhaps*"|" or **"^" even 
>    "."* (if it does not cause other problems)
>    - Implement a new parsing rule to provide this
>    - Propose it be added to the standard distribution.
>    - Add an editor toolbar button to *insert/remove* the *suitable 
>    character* from the beginning of lines
>    - Add an editor toolbar button to *cumulatively insert/remove* the 
>    *":" character* from the beginning of lines so you can quickly select 
>    a block and chose the intent (tab equivalent) applied to each 
>    paragraph/line (without installing code mirror editor)
>
> Justification
>
>    - On importing text this is a quick way to convert text without 
>    additional line feeds to behave as paragraphs
>    - Empty dl tags will cause a single line break between paragraphs 
>    (reduces pasted text with multiple blank lines to collapse, if the leading 
>    character is applied to each line)
>    - I wish I had this when I first came to Tiddlywiki5 as it would have 
>    helped me deal with the linefeed issue when pasting text from other 
> sources.
>    - I think it will support adoption as I know this has being a show 
>    stopper for some new users.
>
> Regards
> Tony
>
>

-- 
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/62881c92-c584-48d7-82e2-8c1c71b10113%40googlegroups.com.

Reply via email to