From 576df91eedcb165a8a3ab8c0ed90b6fdbbf7723f Mon Sep 17 00:00:00 2001 From: Taku Amano Date: Fri, 5 Dec 2025 08:42:03 +0900 Subject: [PATCH 1/2] Fixed AssetUploader and aliment handling. --- mt-static/plugins/MTBlockEditor/src/Block/MTImage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mt-static/plugins/MTBlockEditor/src/Block/MTImage.tsx b/mt-static/plugins/MTBlockEditor/src/Block/MTImage.tsx index fcaa769..f001989 100644 --- a/mt-static/plugins/MTBlockEditor/src/Block/MTImage.tsx +++ b/mt-static/plugins/MTBlockEditor/src/Block/MTImage.tsx @@ -92,7 +92,7 @@ const Editor: React.FC = blockProperty(({ focus, block }) => { imageWidth: block.imageWidth, alternativeText: block.alternativeText, caption: block.caption, - alignment: block.alignment, + align: block.alignment, }, ], insert: ([data]) => { @@ -102,7 +102,7 @@ const Editor: React.FC = blockProperty(({ focus, block }) => { url: data.assetThumbnailUrl, imageWidth: data.assetThumbnailWidth, imageHeight: data.assetThumbnailHeight, - // alignment: data.assetThumbnailWidth, + alignment: data.align, alternativeText: data.alternativeText, caption: data.caption, hasCaption: (data.caption || "") !== "", From c92d5cee52b3fd62b9fd6f1854c34521c2026cab Mon Sep 17 00:00:00 2001 From: Taku Amano Date: Fri, 5 Dec 2025 08:42:38 +0900 Subject: [PATCH 2/2] Cleaned up code by removing commented out dead code. --- mt-static/plugins/MTBlockEditor/src/Block/MTImage.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mt-static/plugins/MTBlockEditor/src/Block/MTImage.tsx b/mt-static/plugins/MTBlockEditor/src/Block/MTImage.tsx index f001989..e5026f1 100644 --- a/mt-static/plugins/MTBlockEditor/src/Block/MTImage.tsx +++ b/mt-static/plugins/MTBlockEditor/src/Block/MTImage.tsx @@ -108,10 +108,6 @@ const Editor: React.FC = blockProperty(({ focus, block }) => { hasCaption: (data.caption || "") !== "", }; - // if (!newData.linkUrl && newData.linkToOriginal) { - // newData.linkUrl = newData.assetUrl; - // } - addEditUpdateBlock(editor, block, newData); Object.assign(block, newData);