diff --git a/core/wiki/macros/tabs.tid b/core/wiki/macros/tabs.tid index e06b546d5..cc12c1f41 100644 --- a/core/wiki/macros/tabs.tid +++ b/core/wiki/macros/tabs.tid @@ -1,7 +1,7 @@ title: $:/core/macros/tabs tags: $:/tags/Macro -\define tabs(tabsList,default,state:"$:/state/tab",class,template,buttonTemplate) +\define tabs(tabsList,default,state:"$:/state/tab",class,template,buttonTemplate,retain)
<$list filter="$tabsList$" variable="currentTab"><$set name="save-currentTiddler" value=<>><$tiddler tiddler=<>><$button set=<> setTo=<> default="$default$" selectedClass="tc-tab-selected" tooltip={{!!tooltip}}> @@ -18,7 +18,7 @@ tags: $:/tags/Macro
<$list filter="$tabsList$" variable="currentTab"> -<$reveal type="match" state=<> text=<> default="$default$"> +<$reveal type="match" state=<> text=<> default="$default$" retain="""$retain$"""> <$transclude tiddler="$template$" mode="block"> diff --git a/editions/tw5.com/tiddlers/macros/TabsMacro.tid b/editions/tw5.com/tiddlers/macros/TabsMacro.tid index 779f32583..16b67fa98 100644 --- a/editions/tw5.com/tiddlers/macros/TabsMacro.tid +++ b/editions/tw5.com/tiddlers/macros/TabsMacro.tid @@ -1,6 +1,6 @@ caption: tabs created: 20131228162203521 -modified: 20171113135543552 +modified: 20180408084453861 tags: Macros [[Core Macros]] title: tabs Macro type: text/vnd.tiddlywiki @@ -25,6 +25,8 @@ By default the tabs are arranged horizontally above the content. To get vertical : Optionally, the title of a tiddler to use as a [[template|TemplateTiddlers]] for transcluding the content of the selected tab ;buttonTemplate : Optionally, the title of a tiddler to use as a [[template|TemplateTiddlers]] for transcluding the content of the button for the selected tab +;retain +: Optionally, "yes" specifies that the content of the tabs should be retained when switching to another tab, avoiding re-rendering it (this can be useful to avoid video or audio sources unexpectedly resetting) Within the template, the title of the selected tab is available in the <<.var currentTab>> variable.