more cleanup of video attachments

This commit is contained in:
or-else
2022-12-14 21:05:40 -08:00
parent f5c628fbb5
commit 13036da36b
8 changed files with 13 additions and 10 deletions
+5 -3
View File
@@ -356,6 +356,8 @@ function inlineImageAttr(attr, data) {
attr.alt = this.formatMessage(messages.drafty_image);
if (!data) {
attr.src = 'img/broken_image.png';
} else {
attr.src = attr.src || 'img/broken_image.png';
}
attr.title = attr.alt;
return attr;
@@ -370,14 +372,14 @@ function inlineVideoAttr(attr, data) {
maxWidth: VIDEO_THUMBNAIL_WIDTH + 'px',
maxHeight: IMAGE_THUMBNAIL_DIM + 'px',
}
attr.alt = this.formatMessage(messages.drafty_video);
attr.className = 'inline-image';
attr.alt = this.formatMessage(messages.drafty_video);
attr.title = attr.alt;
if (!data) {
attr.src = 'img/broken_video.png';
} else {
attr.src = attr.src || 'img/broken_video.png';
}
// React requires this parameter to be lowercase and string.
attr.isvideo = 'T';
return attr;
}