1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 00:50:28 +00:00

Tweaked mechanism so that macros can be nested directly inside other macros

This commit is contained in:
Jeremy Ruston 2012-06-09 18:50:01 +01:00
parent 1251a35375
commit 9247bb0186
5 changed files with 5 additions and 2 deletions

View File

@ -66,6 +66,7 @@ exports.refreshInDom = function(changes) {
this.execute(this.parents,this.tiddlerTitle);
// Render to the DOM
this.child.renderInDom(parent,nextSibling);
this.domNode = this.child.domNode;
this.addEventHandlers();
}
} else {

View File

@ -45,7 +45,6 @@ exports.info = {
}
};
exports.executeMacro = function() {
var templateType = "text/x-tiddlywiki",
templateText = "<<view title link>>",

View File

@ -145,6 +145,7 @@ exports.refreshInDom = function(changes) {
parent.removeChild(this.child.domNode);
this.execute(this.parents,this.tiddlerTitle);
this.child.renderInDom(parent,nextSibling);
this.domNode = this.child.domNode;
} else {
this.child.refreshInDom(changes);
}

View File

@ -60,7 +60,7 @@ exports.executeMacro = function() {
wiki: this.wiki
});
link.execute(parents,this.tiddlerTitle);
return $tw.Tree.Element("span",{},[link]);
return link;
}
break;
case "wikified":

View File

@ -177,6 +177,7 @@ Macro.prototype.render = function(type) {
Macro.prototype.renderInDom = function(parentDomNode,insertBefore) {
if(this.child) {
this.child.renderInDom(parentDomNode,insertBefore);
this.domNode = this.child.domNode;
this.addEventHandlers();
this.postRenderInDom();
}
@ -221,6 +222,7 @@ Macro.prototype.refreshInDom = function(changes) {
parent.removeChild(this.child.domNode);
this.execute(this.parents,this.tiddlerTitle);
this.child.renderInDom(parent,nextSibling);
this.domNode = this.child.domNode;
this.addEventHandlers();
} else {
if(this.child) {