mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 18:00:26 +00:00
Changed the SVG parser to use IMG tags
Embed the SVG image in an IMG tag rather than directly, to ensure that it has it's own DOM state (otherwise things like IDs in SVG images are visible to the hosting page)
This commit is contained in:
parent
bd17a389cb
commit
102724b3e8
@ -16,7 +16,7 @@ var SVGParseTree = function() {
|
||||
|
||||
SVGParseTree.prototype.compile = function(type) {
|
||||
if(type === "text/html") {
|
||||
return "(function (tiddler,store,utils) {return tiddler.text;})";
|
||||
return "(function (tiddler,store,utils) {return '<img src=\"data:' + tiddler.type + ',' + encodeURIComponent(tiddler.text) + '\">';})";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -94,7 +94,3 @@ a.tw-tiddlylink-resolves {
|
||||
a.tw-tiddlylink-missing {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 100%;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user