mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-20 16:42:02 +00:00
Support global macros via the importvariables widget
The new importvariables widget imports macro/variable definitions from the specified tiddlers and makes them available to its children. Allows us to split PageMacros up into separate tiddlers. We still support loading macros from $:/core/ui/PageMacros to help people upgrading. Fixes #644 and #559
This commit is contained in:
@@ -21,7 +21,7 @@ exports.synchronous = true;
|
||||
// Default story and history lists
|
||||
var PAGE_TITLE_TITLE = "$:/core/wiki/title"
|
||||
var PAGE_STYLESHEET_TITLE = "$:/core/ui/PageStylesheet";
|
||||
var PAGE_TEMPLATE_TITLE = "$:/core/ui/PageMacros";
|
||||
var PAGE_TEMPLATE_TITLE = "$:/core/ui/PageTemplate";
|
||||
|
||||
// Time (in ms) that we defer refreshing changes to draft tiddlers
|
||||
var DRAFT_TIDDLER_TIMEOUT = 400;
|
||||
@@ -49,7 +49,7 @@ exports.startup = function() {
|
||||
$tw.styleElement.innerHTML = $tw.styleContainer.textContent;
|
||||
}
|
||||
}));
|
||||
// Display the $:/core/ui/PageMacros tiddler to kick off the display
|
||||
// Display the $:/core/ui/PageTemplate tiddler to kick off the display
|
||||
$tw.perf.report("mainRender",function() {
|
||||
$tw.pageWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TEMPLATE_TITLE,{document: document, parentWidget: $tw.rootWidget});
|
||||
$tw.pageContainer = document.createElement("div");
|
||||
|
||||
Reference in New Issue
Block a user