* Fix right-click paste command for images (Issue #8826) * Fix clipboard logic for multiple paste types * fix: remove unused code * refactor & robustness * fix: creating paste event with image files --------- Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
@@ -214,9 +214,9 @@ export const IMAGE_MIME_TYPES = {
|
||||
jfif: "image/jfif",
|
||||
} as const;
|
||||
|
||||
export const ALLOWED_PASTE_MIME_TYPES = ["text/plain", "text/html"] as const;
|
||||
|
||||
export const MIME_TYPES = {
|
||||
text: "text/plain",
|
||||
html: "text/html",
|
||||
json: "application/json",
|
||||
// excalidraw data
|
||||
excalidraw: "application/vnd.excalidraw+json",
|
||||
@@ -230,6 +230,12 @@ export const MIME_TYPES = {
|
||||
...IMAGE_MIME_TYPES,
|
||||
} as const;
|
||||
|
||||
export const ALLOWED_PASTE_MIME_TYPES = [
|
||||
MIME_TYPES.text,
|
||||
MIME_TYPES.html,
|
||||
...Object.values(IMAGE_MIME_TYPES),
|
||||
] as const;
|
||||
|
||||
export const EXPORT_IMAGE_TYPES = {
|
||||
png: "png",
|
||||
svg: "svg",
|
||||
|
||||
Reference in New Issue
Block a user