Mario and Mat

I think perhaps we should consider generalising this now!

Here is a detailed and comprehensive solution I would like to see coming 
from this recent work.


> [...] My main point, in the latter posts, are that if the "indicator" can 
>> be a distinctive string rather than only a single character, then we don't 
>> need ticks or angle quotes. My interpretation is that the system *can *deal 
>> with multi-character indicators such as @@.
>>
>
Fair enough, but I find @@ for one, too distracting when editing, why use 
two characters (or is that four to close @@?)  when you can use one? 
 

>
> The problem is, that "distinctive stings" need to be part of the js code. 
> So they are hardcoded. What if we don't provide the right "distinctive 
> strings" It's not only 10 of them. Users will probably create combinations, 
> we can't even think of.
>
> You are right. The parser needs some "standardized" characters, so it can 
> detect special behaviour.
>

*My approach feeding of both your ideas.* 

If you had *only one appropriate "escape" character *you can code multiple 
behaviours by what you provide after that. An escape character is more 
reliable if people cant normally enter it via the keyboard, but a custom 
shortcut can insert any character and editor toolbar buttons can simplify 
this. 

   - Perhaps not with the proposed tick and angle brackets, I would like to 
   see the ability to
   - escape character, provide html tag name (any name eg; div, p, even 
   PRETTY) then allow a one or more .classnames 
   - Eg using the aforementioned §
      - §htmltag.classname.classname<space>
      - Or if no tag is provided default to div (because p is a trivial 
      alternative)
         - §.classname.classname<space>
         - §<space> would wrap from beginning of line to \n in a div
         - §p<space> would wrap from beginning of line to \n in a p
         - This would allow ANY special html and CSS markup to be added to 
   any "line"
      - Remember any html tag can already have css assigned to it, 
      including made up ones, even use sophisticated conditionals eg the first 
      pretty within a div, so more often than not just §htmltag<space> will be 
      needed.
   - To keep the solution comprehensive and consistent
      - We also need a way to do this inline something §span.classname 
      something else<space>§<space> and something else.
         - Perhaps close at \n if places at the beginning of the line, if 
         not at the beginning of a line ie inline, then close when you see § OR 
the 
         \n which ever comes first. or use ".§" which closes and add a period, 
then 
         only § need be placed after an existing sentence to end, and there 
will be 
         less false positives.
      - The above examples automatically close the html tag when it reaches 
      \n
         - We need a way to wrap a block of multiple lines and close the 
         tag when a close indicator appears.
         - Perhaps an option to close when it reaches \n\n only could be an 
         option
         - 
         - This is not too transparent because you can actually see the 
   html tag that has being chosen, even if the class name is not in front of 
   you but in a stylesheet.
   - Finally as Mario has already done, adding a default class 
   (special-tagname) to the also has its advantages so §tagname.classname will 
   result in <tagname class=".classname special-tagname"> Selected line/ text 
   </tagname>

I hope this is as valuable suggestion to you as I think it is?


Post script.
With the above solution we can also;

Use the css content and psudo classes like the class "e" for errors

.e::after {
  content:" !";
}

Perhaps one day we could somehow use 
§a.classname https://tiddlwiki.com tiddlywiki.com to result in <a 
href="https://tiddlyiki.com";>tiddlywiki.com</a>

to look like tiddlywiki.com ie feed content into the html tags attributes.

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/42b58faa-38bb-4953-8fbc-70ee8a67850do%40googlegroups.com.

Reply via email to