1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Ensure global macros are available in modals and notifications

This commit is contained in:
Jermolene 2016-10-18 09:18:56 +01:00
parent b4b77d1681
commit 87fa7f972c

View File

@ -910,6 +910,17 @@ exports.makeTranscludeWidget = function(title,options) {
var parseTree = {tree: [{ var parseTree = {tree: [{
type: "element", type: "element",
tag: "div", tag: "div",
children: [{
type: "importvariables",
attributes: {
filter: {
name: "filter",
type: "string",
value: "[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]"
}
},
tag: "$importvariables",
isBlock: false,
children: [{ children: [{
type: "transclude", type: "transclude",
attributes: { attributes: {
@ -917,7 +928,9 @@ exports.makeTranscludeWidget = function(title,options) {
name: "tiddler", name: "tiddler",
type: "string", type: "string",
value: title}}, value: title}},
isBlock: !options.parseAsInline}]} isBlock: !options.parseAsInline}
]
}]}
]}; ]};
if(options.field) { if(options.field) {
parseTree.tree[0].children[0].attributes.field = {type: "string", value: options.field}; parseTree.tree[0].children[0].attributes.field = {type: "string", value: options.field};