Is Markdown in TiddlyWiki customizable?

166 views
Skip to first unread message

Pekka

unread,
May 17, 2021, 12:14:58 PM5/17/21
to TiddlyWiki
Is it possible to create your own symbols and their functions?

PMario

unread,
May 17, 2021, 4:38:10 PM5/17/21
to TiddlyWiki
On Monday, May 17, 2021 at 6:14:58 PM UTC+2 Pekka wrote:
Is it possible to create your own symbols and their functions?

Markdown isn't customizable. There is a spec. see: https://spec.commonmark.org/
-m

PMario

unread,
May 17, 2021, 4:38:47 PM5/17/21
to TiddlyWiki
Hi,
Can you discribe, what you want to achieve?

On Monday, May 17, 2021 at 6:14:58 PM UTC+2 Pekka wrote:

Pekka

unread,
May 18, 2021, 1:31:15 AM5/18/21
to TiddlyWiki
Hi Mario,

Thank you for your reply.

I would have liked to be able to type some self-defined symbols such as ++ or :: and perform some custom functions.

For example, if I would type: ++ Custom block of text ++, then the HTML output would be <div style="background-color: #FFF">Custom block of text</div>, or wrapped in any other HTML blocks I choose. 

Or perhaps preceding a line with :: could make a bullet point list with specific bullet symbols.


I could of course write a Javascript code that parses the text and produces the same effect but then the tiddler text will be permanently edited, which is different to how Markdown operates.

I hope this illustrated better what I was looking to achieve.

TiddlyTweeter

unread,
May 18, 2021, 1:56:31 AM5/18/21
to TiddlyWiki
Ciao Pekka

PMario is far too shy! HE has, himself, recently, made a complete Custom Markup system for redefining any markup.
It is still in testing. 
All I would say, having been a serious tester of it, it is very good indeed!

It should do all your are asking for :-). 

Regards
TT

Pekka

unread,
May 18, 2021, 2:02:47 AM5/18/21
to TiddlyWiki
That is awesome! It seems exactly what I'm looking for. 

I will dig deeper. Thanks! And thanks to PMario for creating and sharing such a system.

Pekka

TiddlyTweeter

unread,
May 18, 2021, 2:36:54 AM5/18/21
to TiddlyWiki
Pekka

Good! Quick footnote ...

You might find useful some of the discussions on PMario's Github about it ... like one I started on use of it.
To give an idea, I used it to redefine many aspects of HTML markup ...

Good luck, TT

112614462-9a604f00-8e21-11eb-88d5-d2bca0fb2bbd.jpg

PMario

unread,
May 18, 2021, 6:38:48 AM5/18/21
to TiddlyWiki
Hi Pekka,
I did probably misread your question. Markdown is a different "markup language" than Tiddlywiki markup.

With the Custom Markup Plugin, you can probably do what you want in a slightly different way as you described it. ... But the whole thing is incredibly powerfull.

The plugin is still in beta, but the configuration "syntax" should be relatively stable. Except I need to fix 1 bug, that will change the "usage syntax" in an incompatible way.

have fun!
mario

PMario

unread,
May 18, 2021, 6:44:08 AM5/18/21
to TiddlyWiki
On Tuesday, May 18, 2021 at 7:31:15 AM UTC+2 Pekka wrote:

For example, if I would type: ++ Custom block of text ++, then the HTML output would be <div style="background-color: #FFF">Custom block of text</div>, or wrapped in any other HTML blocks I choose. 

A configuration like this isn't very future prove. Hardcodeing styles like: <div style="background-color: #FFF">Custom block of text</div> ... should be a absolute last resort, if there is no other way. .. It will limit you in the future. Trust me!

You should use: <div class="myClass">Custom block of text</div> and create a tiddler with your "custom-styles" which is tagged: $:/tags/Stylesheet

title: my-custom-styles
tags: $:/tags/Stylesheet

.myClass {
  background-color: #fff;
}

This is much more flexible, if you need to change the color in the future. .. You only need to change 1 CSS tiddler instead of every tiddler which contains the hardcoded code. ... Even if the custom-markup plugin is used.

Just a thought.
-mario

PMario

unread,
May 18, 2021, 6:46:12 AM5/18/21
to TiddlyWiki
Hi,
There is a little bit of docs, which you should definitely read first: https://wikilabs.github.io/editions/custom-markup/#Basics:Basics%20Advanced%20Reference
-m

Pekka

unread,
May 19, 2021, 2:21:29 PM5/19/21
to TiddlyWiki
Hi PMario,

I apologize for my inaccurate use of terminology. I actually tried googling the proper term specifically to get it right, but managed to mess it up nevertheless.

I will take your advice and avoid hard coding styles. Thank you for the tip and all the help!

From the examples I have seen, I am impressed! I believe that making text look more appealing will provide a little dopamine hit, which encourages reading the notes more often and makes creating the notes more fun. The green, yellow and pink background colors seem particularly appealing to me. 

Pekka
Reply all
Reply to author
Forward
0 new messages