Skip to content

Commit

Permalink
enhance comment
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Feb 15, 2024
1 parent c8683c5 commit d0ff9e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web_src/js/features/comp/ImagePaste.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ const uploadClipboardImage = async (editor, dropzone, e) => {

const url = `/attachments/${uuid}`;
let text;
if (width > 0 && dppx > 1) { // Scale down images from HiDPI monitors
if (width > 0 && dppx > 1) {
// Scale down images from HiDPI monitors. This uses the <img> tag because it's the only
// method to change image size in Markdown that is supported by all implementations.
text = `<img width="${Math.round(width / dppx)}" alt="${htmlEscape(name)}" src="${htmlEscape(url)}">`;
} else {
text = `![${name}](${url})`;
Expand Down

0 comments on commit d0ff9e3

Please sign in to comment.