diff --git a/core/modules/macros/slider.js b/core/modules/macros/slider.js index 32d0093a5..d704174d4 100644 --- a/core/modules/macros/slider.js +++ b/core/modules/macros/slider.js @@ -47,8 +47,7 @@ exports.info = { label: {byPos: 2, type: "text"}, tooltip: {byPos: 3, type: "text"}, "default": {byName: true, type: "text"}, - "class": {byName: true, type: "text"}, - content: {byName: true, type: "text"} + "class": {byName: true, type: "text"} }, events: ["click"] }; @@ -76,15 +75,15 @@ exports.saveOpenState = function() { }; exports.getSliderChildren = function() { - if(this.hasParameter("content")) { - return this.wiki.parseText("text/x-tiddlywiki",this.params.content).tree; - } else if(this.hasParameter("target")) { + // Use the target tiddler if specified + if(this.hasParameter("target")) { return [$tw.Tree.Macro("tiddler",{ srcParams: {target: this.params.target}, wiki: this.wiki })]; } else { - return [$tw.Tree.errorNode("No content specified for slider")]; + // Otherwise use the content of the macro + return this.content; } }; diff --git a/tw5.com/tiddlers/SliderTests.tid b/tw5.com/tiddlers/SliderTests.tid index 182ef60df..a9bef4e46 100644 --- a/tw5.com/tiddlers/SliderTests.tid +++ b/tw5.com/tiddlers/SliderTests.tid @@ -15,8 +15,8 @@ And here's another slider that contains a video, with the state stored in VideoS And here's a MiniSlider that works with text, rather than a separate tiddler. -<> +<> And here's a slider that doesn't use a state tiddler: -<> +<>