diff --git a/core/modules/widgets/reveal.js b/core/modules/widgets/reveal.js index 39cc6b1e6..4eec55ad3 100755 --- a/core/modules/widgets/reveal.js +++ b/core/modules/widgets/reveal.js @@ -38,6 +38,9 @@ RevealWidget.prototype.render = function(parent,nextSibling) { var classes = this["class"].split(" ") || []; classes.push("tc-reveal"); domNode.className = classes.join(" "); + if(this.style) { + domNode.setAttribute("style",this.style); + } parent.insertBefore(domNode,nextSibling); this.renderChildren(domNode,null); if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) { @@ -92,6 +95,7 @@ RevealWidget.prototype.execute = function() { this.text = this.getAttribute("text"); this.position = this.getAttribute("position"); this["class"] = this.getAttribute("class",""); + this.style = this.getAttribute("style",""); this["default"] = this.getAttribute("default",""); this.animate = this.getAttribute("animate","no"); this.retain = this.getAttribute("retain","no"); diff --git a/editions/tw5.com/tiddlers/widgets/RevealWidget.tid b/editions/tw5.com/tiddlers/widgets/RevealWidget.tid index acc8898be..0748c0626 100644 --- a/editions/tw5.com/tiddlers/widgets/RevealWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/RevealWidget.tid @@ -22,6 +22,8 @@ The content of the `<$reveal>` widget is displayed according to the rules given |tag |Overrides the default HTML element tag (`
` in block mode or `` in inline mode) | |type |The type of matching performed: ''match'', ''nomatch'' or ''popup'' | |text |The text to match when the type is ''match'' and ''nomatch'' | +|class |An optional CSS class name to be assigned to the HTML element| +|style |An optional CSS style attribute to be assigned to the HTML element | |position |The position used for the popup when the type is ''popup''. Can be ''left'', ''above'', ''aboveright'', ''right'', ''belowleft'' or ''below'' | |default |Default value to use when the state tiddler is missing | |animate |Set to "yes" to animate opening and closure (defaults to "no") |