mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-06-06 00:24:08 +00:00
Add style attribute to reveal widget
This commit is contained in:
parent
b97336f171
commit
bd6472c1d1
@ -38,6 +38,9 @@ RevealWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
var classes = this["class"].split(" ") || [];
|
var classes = this["class"].split(" ") || [];
|
||||||
classes.push("tc-reveal");
|
classes.push("tc-reveal");
|
||||||
domNode.className = classes.join(" ");
|
domNode.className = classes.join(" ");
|
||||||
|
if(this.style) {
|
||||||
|
domNode.setAttribute("style",this.style);
|
||||||
|
}
|
||||||
parent.insertBefore(domNode,nextSibling);
|
parent.insertBefore(domNode,nextSibling);
|
||||||
this.renderChildren(domNode,null);
|
this.renderChildren(domNode,null);
|
||||||
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
|
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
|
||||||
@ -92,6 +95,7 @@ RevealWidget.prototype.execute = function() {
|
|||||||
this.text = this.getAttribute("text");
|
this.text = this.getAttribute("text");
|
||||||
this.position = this.getAttribute("position");
|
this.position = this.getAttribute("position");
|
||||||
this["class"] = this.getAttribute("class","");
|
this["class"] = this.getAttribute("class","");
|
||||||
|
this.style = this.getAttribute("style","");
|
||||||
this["default"] = this.getAttribute("default","");
|
this["default"] = this.getAttribute("default","");
|
||||||
this.animate = this.getAttribute("animate","no");
|
this.animate = this.getAttribute("animate","no");
|
||||||
this.retain = this.getAttribute("retain","no");
|
this.retain = this.getAttribute("retain","no");
|
||||||
|
@ -22,6 +22,8 @@ The content of the `<$reveal>` widget is displayed according to the rules given
|
|||||||
|tag |Overrides the default HTML element tag (`<div>` in block mode or `<span>` in inline mode) |
|
|tag |Overrides the default HTML element tag (`<div>` in block mode or `<span>` in inline mode) |
|
||||||
|type |The type of matching performed: ''match'', ''nomatch'' or ''popup'' |
|
|type |The type of matching performed: ''match'', ''nomatch'' or ''popup'' |
|
||||||
|text |The text to match when the type is ''match'' and ''nomatch'' |
|
|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'' |
|
|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 |
|
|default |Default value to use when the state tiddler is missing |
|
||||||
|animate |Set to "yes" to animate opening and closure (defaults to "no") |
|
|animate |Set to "yes" to animate opening and closure (defaults to "no") |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user