1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Add an HTML parser

Allows one to embed raw HTML in wikitext with `$$$.html`/`$$$`
This commit is contained in:
Jeremy Ruston 2013-04-10 17:02:37 +01:00
parent 0a37f6bf5b
commit 64eadcfc41
2 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,25 @@
/*\
title: $:/core/modules/parsers/htmlparser.js
type: application/javascript
module-type: parser
The HTML parser displays text as raw HTML
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var HtmlParser = function(type,text,options) {
this.tree = [{
type: "raw",
html: text
}];
};
exports["text/html"] = HtmlParser;
})();

View File

@ -24,7 +24,6 @@ var TextParser = function(type,text,options) {
}; };
exports["text/plain"] = TextParser; exports["text/plain"] = TextParser;
exports["text/html"] = TextParser;
exports["application/vnd.tiddlywiki2"] = TextParser; exports["application/vnd.tiddlywiki2"] = TextParser;
exports["application/javascript"] = TextParser; exports["application/javascript"] = TextParser;
exports["application/json"] = TextParser; exports["application/json"] = TextParser;