From a4a9daa40b940c3188a72f1c626870343c48464f Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 18 Mar 2015 11:39:50 +0000 Subject: [PATCH] Extend wiki.makeTranscludeWidget() to control mode --- core/modules/wiki.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 2709037bc..bb42d5f8a 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -905,6 +905,7 @@ Make a widget tree for transclusion title: target tiddler title options: as for wiki.makeWidget() plus: options.field: optional field to transclude (defaults to "text") +options.mode: transclusion mode "inline" or "block" options.children: optional array of children for the transclude widget */ exports.makeTranscludeWidget = function(title,options) { @@ -924,6 +925,9 @@ exports.makeTranscludeWidget = function(title,options) { if(options.field) { parseTree.tree[0].children[0].attributes.field = {type: "string", value: options.field}; } + if(options.mode) { + parseTree.tree[0].children[0].attributes.mode = {type: "string", value: options.mode}; + } if(options.children) { parseTree.tree[0].children[0].children = options.children; }