1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-04 00:56:17 +00:00
TiddlyWiki5/core/modules/rendertree/renderers/raw.js

34 lines
668 B
JavaScript
Raw Normal View History

/*\
title: $:/core/modules/rendertree/renderers/raw.js
type: application/javascript
module-type: wikirenderer
Raw HTML renderer
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Raw HTML renderer
*/
var RawRenderer = function(renderTree,parentRenderer,parseTreeNode) {
// Store state information
this.renderTree = renderTree;
this.parentRenderer = parentRenderer;
this.parseTreeNode = parseTreeNode;
};
RawRenderer.prototype.renderInDom = function() {
var domNode = this.renderTree.document.createElement("div");
domNode.innerHTML = this.parseTreeNode.html;
return domNode;
};
exports.raw = RawRenderer
})();