better visual style of broken images

This commit is contained in:
or-else
2020-11-21 17:21:56 -08:00
parent 231635f86d
commit a7998a1d29
8 changed files with 42 additions and 10 deletions
+1
View File
@@ -181,6 +181,7 @@ function draftyFormatter(style, data, values, key) {
attr.style = { width: dim.dstWidth + 'px', height: dim.dstHeight + 'px' };
if (!Drafty.isProcessing(data)) {
attr.src = this.props.tinode.authorizeURL(sanitizeImageUrl(attr.src));
attr.alt = data.name;
if (attr.src) {
attr.onClick = this.handleImagePreview;
attr.className += ' image-clickable';