1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-29 03:20:27 +00:00
TiddlyWiki5/js/macros/echo.js
Jeremy Ruston 1326b12948 Removed "optional" field from macro parameters
Macros need to tolerate missing parameters
2012-02-17 17:32:32 +00:00

24 lines
367 B
JavaScript

/*\
title: js/macros/echo.js
\*/
(function(){
/*jslint node: true */
"use strict";
var Renderer = require("../Renderer.js").Renderer;
exports.macro = {
name: "echo",
types: ["text/html","text/plain"],
params: {
text: {byPos: 0, type: "text"}
},
execute: function(macroNode,tiddler,store) {
return [Renderer.TextNode(macroNode.params.text)];
}
};
})();