I Would Like To Expand Wikitext

I have been thoroughly enjoying the Internals Plugin. For those of you who haven’t discovered it yet, it’s one of the standard plugins, doesn’t require a reload and allows you to see the HTML as you type Wikitext.

But I wondered if I could hexp expand the Wikitext, giving it more functionality.

Is there someone who could help me get started? For example, add background colours to cells in a table and line widths and line types.

A

Isn’t this a job for CSS?

interesting ! I’m not sure I’ve used it before, gotta check it out

what is your use case - drafting your future web pages in TiddlyWiki or something like that?

I am hopefully soon going to finish this Tiddly to Blog contraption pipeline, so curious about anything related

Well, I recently learned something very useful from TiddlyWiki.com: that you can use transclusion with templates:

https://tiddlywiki.com/#Transclusion%20with%20Templates

Which means you can use WikiText in your template tiddler.

For example: your template tiddler might have |NAME:|{{!!user-name}}|

When a tiddler refers to that template, we don’t need to create another table. If a large template is made, it saves a lot of space in TW.

@vuk mentioned using CSS. That’s also possible in this scenario. But it would be nice to use WikiText in the template instead.

That said, there’s a work-around if you use something like LibreOffice, OpenOffice or Word. When you drag an item into TW (but not your tiddler), you can get the HTML code made up for you. Certain elements are embedded into the HTML which normally should be handled by CSS. However, since you’re using templates through transclusion, much of the need for using single-source CSS (forgive me, I don’t know the proper page-developer term) is not necessary.

The combination of using transclusion with templates and WikiText might simplify layout creation.

See how this plugin adds a new Wikitext syntax: a checkbox syntax. GitHub - tgrosinger/tw5-checklist: Simple checklist widget for TiddlyWiki5: · GitHub

You will use JavaScript, but it won’t be a problem if you leverage AI.

Only use it as learning material. Don’t use this plugin as it is deprecated by a new core feature in this PR https://github.com/TiddlyWiki/TiddlyWiki5/pull/9708

Right. Doable.

The best I have seen on this is @pmario’s Custom Markup.

It’s still in beta after some years. I’m not sure whether the approach is abandoned?
@pmario?

IF it is still actively in development it would be well worth looking at.

TT

Not abandoned, but I am not happy with it, so I do not promote it. It needed some adjustments to work with v5.4.0 … It lacks documentation … It needs to be simpler to use.

If you want to colour table cells, there is a workaround discussed here in the forum, some time ago.

There was a GitHub PR table parser add data attributes for easier styling #8175, which got rejected, because Jeremy thought it produces too much HTML code.

Since it would need to overwrite a core parser, I did not publish it as a plugin, because Maintenance problems.

You can comment at GitHub, but I am not sure if it would help.

Table formatting is probably the most complex parser we have in TW. So you do not really want to mess with that one
-m

The tiddlers involved seem to be in JavaScript and are found:

$:/core/modules/parsers/wikiparser/rules/

That’s “Rules and Regulations” (PIL) for your music collection, TiddlyTitch. Barking up the wrong tree.

Now, what to do…

It is an opinion of mine when the table gets complex and fine grained styling is needed tranfering to full html tables is a smart move. They are a sophisticated and time tested solution and even llms produce decent ones with static data.

A few of us have built tw tables on top of html with nested list widgets and a few such as Mohammeds/Kookamas great dynamic table