mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 14:23:39 +08:00
FIX: use plain text if available instead of image upload.
Previously, while pasting from Excel 365 it uploaded a table image instead of markdown table.
This commit is contained in:
parent
52fe5b938c
commit
9c96511ec4
|
@ -674,9 +674,9 @@ export default Component.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
const { canUpload, canPasteHtml } = clipboardData(e, true);
|
||||
const { canUpload, canPasteHtml, types } = clipboardData(e, true);
|
||||
|
||||
if (!canUpload || canPasteHtml) {
|
||||
if (!canUpload || canPasteHtml || types.includes("text/plain")) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -891,7 +891,7 @@ export default Component.extend({
|
|||
}
|
||||
}
|
||||
|
||||
if (handled || canUpload) {
|
||||
if (handled || (canUpload && !plainText)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user