A copy of the javascript tiddler of TabTable macro

This commit is contained in:
ulaulaman 2020-08-16 15:42:07 +02:00
parent 1543c0a54a
commit 58715f0a08
1 changed files with 39 additions and 0 deletions

39
js/TagTable.js Normal file
View File

@ -0,0 +1,39 @@
/*\
title: $:/macros/ulaulaman/TagTable.js
type: application/javascript
module-type: macro
<<TagTable tag>>
Example:
<<TagTable>>
<<TagTable "tag">>
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
Create a styled table in order to show tiddlers from a specific tag as a menu.
*/
exports.name = "TagTable";
exports.params = [
{ name: "tag" }
];
/*
Run the macro
*/
exports.run = function(tag) {
if( !tag) tag = "menu";
var output = "{{" + tag + "||$:/core/macros/ulaulaman/TagTable}}";
return output;
};
})();