π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
fix: svg not supported in image uploads in the editor (#5558)
M. Palanikannan069f8b950e86
diff --git a/packages/editor/src/core/helpers/editor-commands.ts b/packages/editor/src/core/helpers/editor-commands.tsindex db3b4d66d0..7cf3e8d1f1 100644--- a/packages/editor/src/core/helpers/editor-commands.ts+++ b/packages/editor/src/core/helpers/editor-commands.ts@@ -146,7 +146,7 @@ export const insertImageCommand = (if (range) editor.chain().focus().deleteRange(range).run();const input = document.createElement("input");input.type = "file";- input.accept = ".jpeg, .jpg, .png, .webp, .svg";+ input.accept = ".jpeg, .jpg, .png, .webp";input.onchange = async () => {if (input.files?.length) {const file = input.files[0];diff --git a/packages/editor/src/core/plugins/image/utils/validate-file.ts b/packages/editor/src/core/plugins/image/utils/validate-file.tsindex a7952a0e11..b79ca6683e 100644--- a/packages/editor/src/core/plugins/image/utils/validate-file.ts+++ b/packages/editor/src/core/plugins/image/utils/validate-file.ts@@ -4,9 +4,9 @@ export function isFileValid(file: File): boolean {return false;}- const allowedTypes = ["image/jpeg", "image/jpg", "image/png", "image/webp", "image/svg+xml"];+ const allowedTypes = ["image/jpeg", "image/jpg", "image/png", "image/webp"];if (!allowedTypes.includes(file.type)) {- alert("Invalid file type. Please select a JPEG, JPG, PNG, WEBP, or SVG image file.");+ alert("Invalid file type. Please select a JPEG, JPG, PNG, or WEBP image file.");return false;}