Skip to content

Commit 86e9c6b

Browse files
Muhammad Faraz  MaqsoodFaraz32123
authored andcommitted
fix: tinyMCE images previews in image selection modal
1 parent 2a78795 commit 86e9c6b

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/editors/sharedComponents/SelectionModal/GalleryCard.jsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,15 @@ const GalleryCard = ({
2828
>
2929
<div className="card-div d-flex flex-row flex-nowrap align-items-center">
3030
<div
31-
className="position-relative"
32-
style={{
33-
width: '200px',
34-
height: '100px',
35-
}}
31+
className="row justify-content-center align-itmes-center p-2"
3632
>
3733
{(thumbnailError && thumbnailFallback) ? (
3834
<div style={{ width: '200px', height: '100px' }}>
3935
{ thumbnailFallback }
4036
</div>
4137
) : (
4238
<Image
43-
style={{ border: 'none', width: '200px', height: '100px' }}
39+
className="selection-modal-image-thumbnail"
4440
src={asset.externalUrl}
4541
onError={thumbnailFallback && (() => setThumbnailError(true))}
4642
/>

src/editors/sharedComponents/SelectionModal/index.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,11 @@
3030
margin-bottom: .4375rem;
3131
margin-top: .4375rem;
3232
}
33+
34+
.selection-modal-image-thumbnail {
35+
width: 180px;
36+
height: 101.25px;
37+
object-fit: contain;
38+
max-width: 100%;
39+
max-height: 100%;
40+
}

0 commit comments

Comments
 (0)