About "WikiScript"; And MarkUp: Markdown is better or Wikitext is better

Said in Is it possible to trigger an action on mouse over or hover? - #7 by TW_Tones, @TW_Tones call things like <$widget /> <<macro>> \define definition as WikiScript.
And I think things like bold, iterlic, list, title, are just MarkUp, which will transform to HTML (HT Markup Language)

Markdown is mainly composed of MarkUp, but I think recently it can also use most of the WikiScript (or all of them? I haven’t use md a lot), and rendering result is exactly the same as wikitext Markup.

In WYSIWYG editor, Markup part is currently using Wikitext version. For example, when you type #, it will only regard it as a ShortCut, then autocomplete as a list, not as a title. But this is totally configurable, user can switch to MD shortcuts.
(while keep those really good part of wikitext markup shortcuts, like [img[xxx.png]], which is much better than ![](xxx.png))

What’s being saved by a WYSIWYG editor is also configurable. Currently, I save wikitext markup by default.
But considering the popularity of MD, I’m considering if we should save it as md by default?

Another question is, do you prefer md markup or wikitext markup? (While keeping using all the WikiScript unchanged)

1 Like

I suppose it would be good to have WYSIWYG for both wikitext and markdown, but wikitext is tiddlywikis default and would have a larger audience, even if there are lot of markdown users.

The thread title states: “Markdown is better or Wikitext is better” … In my opinion there is no better. They are different

That’s right. With TW Release v5.2.6 we switched the TW markdown-plugin back to the markdown-it library. The TW plugin contains several md-plugins that should improve “quality of live” for MD based text imported to TW.

Tiddlers with the MIME-type: text/markdown and text/x-markdown are rendered with the markdown library. Then it hands the result over to the wiki-text parser, which is responsible to create the final HTML output. So it’s possible to “mix” MD MarkUp with WikiText syntax.

Realizing the possibility of mixing Markdown and Wikitext was an epiphany for me. IMO standardization is most important and though I don’t see it happening, replacing TW syntax for with MD for basic markup would be a huge leap toward more adoption. I try to use markdown as much as possible bc I can use it across every editor. I would have to say then that Markdown is superior bc it is ‘cross-platform’. It is however no replacement for Wikitext, or HTML for that matter, since it is extremely limited in its output.

All that being said aren’t they all just different forms of markup - ways of ‘speaking’ to the browser? Ie WikiScript, HTML, and Markdown are all different ways of displaying content in a web browser.

Perhaps, but I tend to think of HTML as the way to display the content, the various markdowns markup, macros and “TiddlyWiki script” are “shorthand” or a “meta language” for html.

We are very fortunate to be able to get one tiddler to use one markup or part there of to use another. You could even make a tool within tiddlywiki to translate between one and another if the rules are consistent and complete. The Internals plugin on tiddlywiki.com already allows us to see and copy html versions of any supported markdown.

The largest advantage that Markdown has over other markup systems is mostly irrelevant in TW.

Markdown has an extremely readable source format. This makes it easier to write; it can be written simply without any WYSIWYG controls. And you don’t have to convert it to HTML to read and understand it.

Wikitext is much, much less readable. It is of course much more powerful, but even in the subset of wikitext that overlaps with Markdown, Markdown is to my mind much easier to read, an effect magnified by the number of places on the web that allow you to create content with Markdown.

But that advantage is irrelevant in TiddlyWiki.

There is little case for reading TW source code markup. It is only there to generate HTML, add hooks for CSS, and connect to JS widgets and macros. As a creator of tiddlers, I can write with a WYSIWYG editor if I choose, and with plain markup when I’m more experienced. There’s a preview mode to see my changes live. And I will likely be adding widgets and macros, to use dynamic lists, and in general perform things that won’t be readily readable in any source format. As a reader of tiddlers, I will always want to see the generated HTML/CSS/JS app.

For reasons of familiarity and interoperability, if we could go back in time, I would definitely prefer that TW used the same markup for the simple things that Markdown supplies, *italics* rather than //italics// for instance. But TW came out around the same time that Markdown did, well before Markdown became ubiquitous. It’s hard to undo the years of differences.

2 Likes

I find // more indicative of italics than *!

2 Likes

Neither is strongly indicative. But those who’ve been using Markdown in the many places it’s accepted have probably come to a strong association. Tiddlywiki’s markup isn’t used anywhere else (that I’m aware of.)

Markdown took its cues from USENET and plain text email, where *emphasis* and **strong empasis** were a very common convention. Typographically, that’s usually italics and bold.

I can certainly see mnemonic reason to use the slash, but the point is a combination of overall readability and familiarity. However, as I was saying, I think this ship sailed long ago.

1 Like