mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-09-02 02:48:03 +00:00
Fixed issue with textnodes ignoring insertBefore parameter
This commit is contained in:
@@ -29,9 +29,13 @@ Text.prototype.render = function(type) {
|
||||
return type === "text/html" ? $tw.utils.htmlEncode(this.text) : this.text;
|
||||
};
|
||||
|
||||
Text.prototype.renderInDom = function(domNode) {
|
||||
Text.prototype.renderInDom = function(parentDomNode,insertBefore) {
|
||||
this.domNode = document.createTextNode(this.text);
|
||||
domNode.appendChild(this.domNode);
|
||||
if(insertBefore) {
|
||||
parentDomNode.insertBefore(this.domNode,insertBefore);
|
||||
} else {
|
||||
parentDomNode.appendChild(this.domNode);
|
||||
}
|
||||
};
|
||||
|
||||
exports.Text = Text;
|
||||
|
Reference in New Issue
Block a user