Hi Mark,

here is my macro code:
/*\

title: $:/plugins/mirodin/ebooks/linklist.js
type: application/javascript
module-type: macro

\*/
(function() {

"use strict";

/*
List all field values as comma separated list of clickable links.
*/

exports.name = "linklist";

exports.params = [];

/*
Run the macro
*/
exports.run = function(field) {
 if (typeof field === "undefined") {
 return "''Please pass field.''";
 }
 var elements = field.split(",");
 var result = "";
 for (var i = 0; i < elements.length; i++) {
 result += "[[" + elements[i] + "]], ";
 }
 result = result.slice(0, -2);
 return result;
};

})();

Thanks for your hint, that works for me too and the whole call is way more 
readable.

Cheers
Tristan

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/44475e17-e08a-4306-8e4e-d3fa349ccd95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to