mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-27 10:30:28 +00:00
551ebdc005
We now use a fake DOM implementation on the server to let us share more rendering code between the text output vs. DOM output paths.
34 lines
668 B
JavaScript
34 lines
668 B
JavaScript
/*\
|
|
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
|
|
|
|
})();
|