Enhance text widget to optionally use "text" attribute

This lets us use the text widget to render text in macros that we don’t
want to be wikified.
This commit is contained in:
Jermolene
2014-01-19 21:45:55 +00:00
parent d5df78d979
commit 95cb99adb9
2 changed files with 18 additions and 1 deletions
+3 -1
View File
@@ -28,8 +28,10 @@ Render this widget into the DOM
*/
TextNodeWidget.prototype.render = function(parent,nextSibling) {
this.parentDomNode = parent;
this.computeAttributes();
this.execute();
var textNode = this.document.createTextNode(this.parseTreeNode.text);
var text = this.getAttribute("text",this.parseTreeNode.text),
textNode = this.document.createTextNode(text);
parent.insertBefore(textNode,nextSibling);
this.domNodes.push(textNode);
};