styleblock rule in Markdown

59 views
Skip to first unread message

Stefan Curtis

unread,
May 6, 2021, 4:56:09 PM5/6/21
to TiddlyWiki

Hi,

I've just started using Tiddlywiki and I'm blown away by it's potential!

I'm using the official Markdown plugin, and I've found out how to add prettylinks to the markdown/renderWikiTextPragma tiddler.

I wondered if there's a way (maybe similar to prettylinks?) of allowing the styleblock widget to be parsed as part of a Markdown tiddler? I did try to add 'styleblock' to the above pragma, but it seemed to have no effect, but I'm not sure whether ordering is important?

Thanks,

Stefan

PMario

unread,
May 6, 2021, 5:19:08 PM5/6/21
to TiddlyWiki
Hi Stefan,

Welcome to the club!

I'm not sure, what you mean by "styleblock" but this:

<style>
.aa {
  color: green;
}
</style>

@@.aa asdf@@

should already work. ... 

The markdown parser is able to handle html elements. Everything that the md-parser can't handle will be passed to the TW parser. ... This is a bit hacky, but very powerful :)

I did use the html <style> elements only because it's easy for testing. you should use: https://tiddlywiki.com/#Using%20Stylesheets

-mario

Stefan Curtis

unread,
May 6, 2021, 6:36:20 PM5/6/21
to tiddl...@googlegroups.com
Hi Mario,

Thanks for the reply!

That was what I was referring to, yes - though I'm specifically interested in the block-level version, so more like:

@@.aa;

asdf

@@


However, I tried your example and couldn't get that to work either... (see attached) Are you using the official MD plugin too?

From what I´ve read, I was under the impression that, although anything the MD parser doesn't understand is passed down to the wikitext parser, only the rules specified in $:/config/markdown/renderWikiTextPragma are actually parsed, which is why I had to add 'prettylink' to get the '[[link]]' syntax to work?



--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/irMbI40kmQE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4efd0bb1-50a8-4fc9-b11d-3918cbe8480cn%40googlegroups.com.
SmartSelectImage_2021-05-06-23-24-20.png

PMario

unread,
May 7, 2021, 3:26:26 AM5/7/21
to TiddlyWiki
I did test it with: https://tiddlywiki.com/#Markdown%20Plugin  There is a link to an edition that should just work in many cases.

-m
Reply all
Reply to author
Forward
0 new messages