mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-24 11:54:41 +00:00
Compare commits
3 Commits
element-ma
...
fix-canoni
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26fe15670c | ||
|
|
f825255bb8 | ||
|
|
ee42f2f731 |
@@ -11,17 +11,16 @@ The image parser parses an image into an embeddable HTML element
|
||||
|
||||
var ImageParser = function(type,text,options) {
|
||||
var element = {
|
||||
type: "element",
|
||||
tag: "img",
|
||||
attributes: {}
|
||||
};
|
||||
type: "image",
|
||||
attributes: {}
|
||||
};
|
||||
if(options._canonical_uri) {
|
||||
element.attributes.src = {type: "string", value: options._canonical_uri};
|
||||
element.attributes.source = {type: "string", value: options._canonical_uri};
|
||||
} else if(text) {
|
||||
if(type === "image/svg+xml" || type === ".svg") {
|
||||
element.attributes.src = {type: "string", value: "data:image/svg+xml," + encodeURIComponent(text)};
|
||||
element.attributes.source = {type: "string", value: "data:image/svg+xml," + encodeURIComponent(text)};
|
||||
} else {
|
||||
element.attributes.src = {type: "string", value: "data:" + type + ";base64," + text};
|
||||
element.attributes.source = {type: "string", value: "data:" + type + ";base64," + text};
|
||||
}
|
||||
}
|
||||
this.tree = [element];
|
||||
|
||||
10
editions/tw5.com/tiddlers/releasenotes/5.4.0/#9570.tid
Normal file
10
editions/tw5.com/tiddlers/releasenotes/5.4.0/#9570.tid
Normal file
@@ -0,0 +1,10 @@
|
||||
title: $:/changenotes/5.4.0/#9570
|
||||
description: Fix images loaded from _canonical_uri tiddlers not having progress classes assigned
|
||||
release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: bugfix
|
||||
change-category: internal
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9570
|
||||
github-contributors: jermolene
|
||||
|
||||
Fixes issue whereby transcluding a _canonical_uri tiddler with a missing image did not assign the progress classes `tc-image-loading`, `tc-image-loaded` and `tc-image-error`.
|
||||
Reference in New Issue
Block a user