diff --git a/core/modules/macros/story/story.js b/core/modules/macros/story/story.js index 492660927..55857ed0c 100644 --- a/core/modules/macros/story/story.js +++ b/core/modules/macros/story/story.js @@ -65,7 +65,7 @@ exports.eventMap["tw-navigate"] = function(event) { if(typeof(navTiddler) !== "undefined") { // If we found our tiddler, just tell the storyview to navigate to it if(this.storyview && this.storyview.navigate) { - this.storyview.navigate(this.children[0].children[navTiddler],false,event); + this.storyview.navigate(this.storyNode.children[navTiddler],false,event); } } else { // Add the tiddler to the bottom of the story (subsequently there will be a refreshInDom() call which is when we'll actually do the navigation) @@ -144,17 +144,21 @@ exports.eventMap["tw-SaveTiddler"] = function(event) { }; exports.executeMacro = function() { - var story = this.getStory(), - storyNode = $tw.Tree.Element("div",{"class": "tw-story-frame"},[]); + // Create the story frame + var story = this.getStory(); + this.contentNode = $tw.Tree.Element("div",{"class": "tw-story-content"},this.content); + this.contentNode.execute(this.parents,this.tiddlerTitle); + this.storyNode = $tw.Tree.Element("div",{"class": "tw-story-frame"},[]); + // Create each story element for(var t=0; t t) { // First delete the DOM nodes for(n=t; n story.tiddlers.length) { - for(t=story.tiddlers.length; t story.tiddlers.length) { + for(t=story.tiddlers.length; t< {{navigation-panel{ <> }}} {{zoomer-panel{ <> }}} -{{container-fluid{ -<> +>> }}}