diff --git a/examples/06-custom-schema/04-pdf-file-block/PDF.tsx b/examples/06-custom-schema/04-pdf-file-block/PDF.tsx index 447f47fae2..b5be203de9 100644 --- a/examples/06-custom-schema/04-pdf-file-block/PDF.tsx +++ b/examples/06-custom-schema/04-pdf-file-block/PDF.tsx @@ -43,7 +43,8 @@ export const PDF = createReactBlockSpec( default: true, }, previewWidth: { - default: 512, + default: undefined, + type: "number", }, }, content: "none", diff --git a/packages/core/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap b/packages/core/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap index 7a33dd340a..3a53ef0fc2 100644 --- a/packages/core/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap +++ b/packages/core/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap @@ -338,7 +338,6 @@ exports[`Test insertBlocks > Insert multiple blocks after 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -1012,7 +1011,6 @@ exports[`Test insertBlocks > Insert multiple blocks before 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -1606,7 +1604,6 @@ exports[`Test insertBlocks > Insert single basic block after 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -2212,7 +2209,6 @@ exports[`Test insertBlocks > Insert single basic block before (without type) 2`] "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -2806,7 +2802,6 @@ exports[`Test insertBlocks > Insert single basic block before 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -3514,7 +3509,6 @@ exports[`Test insertBlocks > Insert single complex block after 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -4222,7 +4216,6 @@ exports[`Test insertBlocks > Insert single complex block before 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", diff --git a/packages/core/src/api/blockManipulation/commands/mergeBlocks/__snapshots__/mergeBlocks.test.ts.snap b/packages/core/src/api/blockManipulation/commands/mergeBlocks/__snapshots__/mergeBlocks.test.ts.snap index f4e686823e..1c8df9a1c2 100644 --- a/packages/core/src/api/blockManipulation/commands/mergeBlocks/__snapshots__/mergeBlocks.test.ts.snap +++ b/packages/core/src/api/blockManipulation/commands/mergeBlocks/__snapshots__/mergeBlocks.test.ts.snap @@ -214,7 +214,6 @@ exports[`Test mergeBlocks > Basic 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -764,7 +763,6 @@ exports[`Test mergeBlocks > Blocks have different types 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -1314,7 +1312,6 @@ exports[`Test mergeBlocks > First block has children 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -1863,7 +1860,6 @@ exports[`Test mergeBlocks > Second block has children 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -2430,7 +2426,6 @@ exports[`Test mergeBlocks > Second block is empty 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", diff --git a/packages/core/src/api/blockManipulation/commands/moveBlocks/__snapshots__/moveBlocks.test.ts.snap b/packages/core/src/api/blockManipulation/commands/moveBlocks/__snapshots__/moveBlocks.test.ts.snap index b295b6357d..b2d429c343 100644 --- a/packages/core/src/api/blockManipulation/commands/moveBlocks/__snapshots__/moveBlocks.test.ts.snap +++ b/packages/core/src/api/blockManipulation/commands/moveBlocks/__snapshots__/moveBlocks.test.ts.snap @@ -231,7 +231,6 @@ exports[`Test moveBlocksDown > Basic 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -798,7 +797,6 @@ exports[`Test moveBlocksDown > Into children 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -1365,7 +1363,6 @@ exports[`Test moveBlocksDown > Last block 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -1932,7 +1929,6 @@ exports[`Test moveBlocksDown > Multiple blocks 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -2499,7 +2495,6 @@ exports[`Test moveBlocksDown > Multiple blocks ending in block with children 1`] "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -3066,7 +3061,6 @@ exports[`Test moveBlocksDown > Multiple blocks ending in nested block 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -3643,7 +3637,6 @@ exports[`Test moveBlocksDown > Multiple blocks starting and ending in nested blo "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -4210,7 +4203,6 @@ exports[`Test moveBlocksDown > Multiple blocks starting in block with children 1 "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -4776,7 +4768,6 @@ exports[`Test moveBlocksDown > Multiple blocks starting in nested block 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -5343,7 +5334,6 @@ exports[`Test moveBlocksDown > Out of children 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -5909,7 +5899,6 @@ exports[`Test moveBlocksUp > Basic 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -6476,7 +6465,6 @@ exports[`Test moveBlocksUp > First block 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -7043,7 +7031,6 @@ exports[`Test moveBlocksUp > Into children 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -7610,7 +7597,6 @@ exports[`Test moveBlocksUp > Multiple blocks 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -8177,7 +8163,6 @@ exports[`Test moveBlocksUp > Multiple blocks ending in block with children 1`] = "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -8744,7 +8729,6 @@ exports[`Test moveBlocksUp > Multiple blocks ending in nested block 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -9293,7 +9277,6 @@ exports[`Test moveBlocksUp > Multiple blocks starting and ending in nested block "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -9877,7 +9860,6 @@ exports[`Test moveBlocksUp > Multiple blocks starting in block with children 1`] "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -10443,7 +10425,6 @@ exports[`Test moveBlocksUp > Multiple blocks starting in nested block 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -11010,7 +10991,6 @@ exports[`Test moveBlocksUp > Out of children 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", diff --git a/packages/core/src/api/blockManipulation/commands/replaceBlocks/__snapshots__/replaceBlocks.test.ts.snap b/packages/core/src/api/blockManipulation/commands/replaceBlocks/__snapshots__/replaceBlocks.test.ts.snap index 8b16a1536d..04e9a71328 100644 --- a/packages/core/src/api/blockManipulation/commands/replaceBlocks/__snapshots__/replaceBlocks.test.ts.snap +++ b/packages/core/src/api/blockManipulation/commands/replaceBlocks/__snapshots__/replaceBlocks.test.ts.snap @@ -144,7 +144,6 @@ exports[`Test replaceBlocks > Remove multiple consecutive blocks 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -694,7 +693,6 @@ exports[`Test replaceBlocks > Remove multiple non-consecutive blocks 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -991,7 +989,6 @@ exports[`Test replaceBlocks > Remove single block 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -1522,7 +1519,6 @@ exports[`Test replaceBlocks > Replace multiple consecutive blocks with multiple "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -2013,7 +2009,6 @@ exports[`Test replaceBlocks > Replace multiple consecutive blocks with single ba "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -2561,7 +2556,6 @@ exports[`Test replaceBlocks > Replace multiple consecutive blocks with single co "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -3162,7 +3156,6 @@ exports[`Test replaceBlocks > Replace multiple non-consecutive blocks with multi "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -3470,7 +3463,6 @@ exports[`Test replaceBlocks > Replace multiple non-consecutive blocks with singl "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -3835,7 +3827,6 @@ exports[`Test replaceBlocks > Replace multiple non-consecutive blocks with singl "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -4183,7 +4174,6 @@ exports[`Test replaceBlocks > Replace single block with multiple 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -4744,7 +4734,6 @@ exports[`Test replaceBlocks > Replace single block with single basic 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -5362,7 +5351,6 @@ exports[`Test replaceBlocks > Replace single block with single complex 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", diff --git a/packages/core/src/api/blockManipulation/commands/splitBlock/__snapshots__/splitBlock.test.ts.snap b/packages/core/src/api/blockManipulation/commands/splitBlock/__snapshots__/splitBlock.test.ts.snap index f07442152c..b6adcef363 100644 --- a/packages/core/src/api/blockManipulation/commands/splitBlock/__snapshots__/splitBlock.test.ts.snap +++ b/packages/core/src/api/blockManipulation/commands/splitBlock/__snapshots__/splitBlock.test.ts.snap @@ -248,7 +248,6 @@ exports[`Test splitBlocks > Basic 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -832,7 +831,6 @@ exports[`Test splitBlocks > Block has children 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -1416,7 +1414,6 @@ exports[`Test splitBlocks > Don't keep props 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -2000,7 +1997,6 @@ exports[`Test splitBlocks > Don't keep type 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -2578,7 +2574,6 @@ exports[`Test splitBlocks > End of content 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -3163,7 +3158,6 @@ exports[`Test splitBlocks > Keep type 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", diff --git a/packages/core/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap b/packages/core/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap index 232790218d..4849b8bebe 100644 --- a/packages/core/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +++ b/packages/core/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap @@ -302,7 +302,6 @@ exports[`Test updateBlock > Revert all props 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -940,7 +939,6 @@ exports[`Test updateBlock > Revert single prop 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -1578,7 +1576,6 @@ exports[`Test updateBlock > Update all props 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -2216,7 +2213,6 @@ exports[`Test updateBlock > Update children 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -2561,7 +2557,6 @@ exports[`Test updateBlock > Update inline content to no content 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "", @@ -2580,7 +2575,6 @@ exports[`Test updateBlock > Update inline content to no content 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "", @@ -2799,7 +2793,6 @@ exports[`Test updateBlock > Update inline content to no content 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -3722,7 +3715,6 @@ exports[`Test updateBlock > Update inline content to table content 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -7032,7 +7024,6 @@ exports[`Test updateBlock > Update single prop 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -7613,7 +7604,6 @@ exports[`Test updateBlock > Update table content to empty inline content 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -8026,7 +8016,6 @@ exports[`Test updateBlock > Update table content to inline content 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -8203,7 +8192,6 @@ exports[`Test updateBlock > Update table content to no content 1`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "", @@ -8443,7 +8431,6 @@ exports[`Test updateBlock > Update table content to no content 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -8475,7 +8462,6 @@ exports[`Test updateBlock > Update table content to no content 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "", @@ -8910,7 +8896,6 @@ exports[`Test updateBlock > Update type 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -9533,7 +9518,6 @@ exports[`Test updateBlock > Update with plain content 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", @@ -10157,7 +10141,6 @@ exports[`Test updateBlock > Update with styled content 2`] = ` "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "https://via.placeholder.com/150", diff --git a/packages/core/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts b/packages/core/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts index f8e6488627..484b442fdc 100644 --- a/packages/core/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts +++ b/packages/core/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts @@ -19,7 +19,11 @@ export const createResizableFileBlockWrapper = ( ); const wrapper = dom; if (block.props.url && block.props.showPreview) { - wrapper.style.width = `${block.props.previewWidth}px`; + if (block.props.previewWidth) { + wrapper.style.width = `${block.props.previewWidth}px`; + } else { + wrapper.style.width = "fit-content"; + } } const leftResizeHandle = document.createElement("div"); diff --git a/packages/core/src/blocks/ImageBlockContent/ImageBlockContent.ts b/packages/core/src/blocks/ImageBlockContent/ImageBlockContent.ts index 8de45dca10..a1088d4442 100644 --- a/packages/core/src/blocks/ImageBlockContent/ImageBlockContent.ts +++ b/packages/core/src/blocks/ImageBlockContent/ImageBlockContent.ts @@ -37,7 +37,8 @@ export const imagePropSchema = { }, // File preview width in px. previewWidth: { - default: 512, + default: undefined, + type: "number", }, } satisfies PropSchema; @@ -125,7 +126,9 @@ export const imageToExternalHTML = ( image = document.createElement("img"); image.src = block.props.url; image.alt = block.props.name || block.props.caption || "BlockNote image"; - image.width = block.props.previewWidth; + if (block.props.previewWidth) { + image.width = block.props.previewWidth; + } } else { image = document.createElement("a"); image.href = block.props.url; diff --git a/packages/core/src/blocks/VideoBlockContent/VideoBlockContent.ts b/packages/core/src/blocks/VideoBlockContent/VideoBlockContent.ts index 619bea0734..5e5a7cfd77 100644 --- a/packages/core/src/blocks/VideoBlockContent/VideoBlockContent.ts +++ b/packages/core/src/blocks/VideoBlockContent/VideoBlockContent.ts @@ -37,7 +37,8 @@ export const videoPropSchema = { }, // File preview width in px. previewWidth: { - default: 512, + default: undefined, + type: "number", }, } satisfies PropSchema; @@ -124,7 +125,9 @@ export const videoToExternalHTML = ( if (block.props.showPreview) { video = document.createElement("video"); video.src = block.props.url; - video.width = block.props.previewWidth; + if (block.props.previewWidth) { + video.width = block.props.previewWidth; + } } else { video = document.createElement("a"); video.href = block.props.url; diff --git a/packages/core/src/editor/Block.css b/packages/core/src/editor/Block.css index b86e8e1af3..a246b30cdb 100644 --- a/packages/core/src/editor/Block.css +++ b/packages/core/src/editor/Block.css @@ -411,6 +411,7 @@ NESTED BLOCKS display: flex; align-items: center; position: relative; + max-width: 100%; } [data-file-block] .bn-visual-media { diff --git a/packages/core/src/schema/blocks/types.ts b/packages/core/src/schema/blocks/types.ts index 0db756ec74..b2f7998193 100644 --- a/packages/core/src/schema/blocks/types.ts +++ b/packages/core/src/schema/blocks/types.ts @@ -45,7 +45,8 @@ export type FileBlockConfig = { }; // File preview width in px. previewWidth?: { - default: number; + default: undefined; + type: "number"; }; }; content: "none"; diff --git a/packages/react/src/blocks/FileBlockContent/helpers/render/ResizableFileBlockWrapper.tsx b/packages/react/src/blocks/FileBlockContent/helpers/render/ResizableFileBlockWrapper.tsx index 63d12e6a90..73992798a0 100644 --- a/packages/react/src/blocks/FileBlockContent/helpers/render/ResizableFileBlockWrapper.tsx +++ b/packages/react/src/blocks/FileBlockContent/helpers/render/ResizableFileBlockWrapper.tsx @@ -26,7 +26,9 @@ export const ResizableFileBlockWrapper = ( | undefined >(undefined); - const [width, setWidth] = useState(props.block.props.previewWidth! as number); + const [width, setWidth] = useState( + props.block.props.previewWidth + ); const [hovered, setHovered] = useState(false); const ref = useRef(null); @@ -146,7 +148,9 @@ export const ResizableFileBlockWrapper = ( onMouseLeave={wrapperMouseLeaveHandler} style={ props.block.props.url && !showLoader && props.block.props.showPreview - ? { width: `${width}px` } + ? { + width: width ? `${width}px` : "fit-content", + } : undefined }>
diff --git a/packages/server-util/src/context/__snapshots__/ServerBlockNoteEditor.test.ts.snap b/packages/server-util/src/context/__snapshots__/ServerBlockNoteEditor.test.ts.snap index 5bd969bfa8..5cf46c5d02 100644 --- a/packages/server-util/src/context/__snapshots__/ServerBlockNoteEditor.test.ts.snap +++ b/packages/server-util/src/context/__snapshots__/ServerBlockNoteEditor.test.ts.snap @@ -216,7 +216,6 @@ exports[`Test ServerBlockNoteEditor > converts to and from markdown (blocksToMar "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "exampleURL", diff --git a/packages/xl-docx-exporter/src/docx/__snapshots__/basic/document.xml b/packages/xl-docx-exporter/src/docx/__snapshots__/basic/document.xml index f4aa46fbcc..3e8d279cc8 100644 --- a/packages/xl-docx-exporter/src/docx/__snapshots__/basic/document.xml +++ b/packages/xl-docx-exporter/src/docx/__snapshots__/basic/document.xml @@ -402,7 +402,7 @@ - + @@ -427,7 +427,7 @@ - + diff --git a/packages/xl-docx-exporter/src/docx/defaultSchema/blocks.ts b/packages/xl-docx-exporter/src/docx/defaultSchema/blocks.ts index 654c58f5e8..9663ef6405 100644 --- a/packages/xl-docx-exporter/src/docx/defaultSchema/blocks.ts +++ b/packages/xl-docx-exporter/src/docx/defaultSchema/blocks.ts @@ -198,8 +198,8 @@ export const docxBlockMappingForDefaultSchema: BlockMapping< } : undefined, transformation: { - width: block.props.previewWidth, - height: (block.props.previewWidth / width) * height, + width: block.props.previewWidth || width, + height: ((block.props.previewWidth || width) / width) * height, }, }), ], diff --git a/packages/xl-odt-exporter/src/odt/__snapshots__/basic/content.xml b/packages/xl-odt-exporter/src/odt/__snapshots__/basic/content.xml index 733dc014f7..07d23ec74e 100644 --- a/packages/xl-odt-exporter/src/odt/__snapshots__/basic/content.xml +++ b/packages/xl-odt-exporter/src/odt/__snapshots__/basic/content.xml @@ -313,10 +313,10 @@ Open file - + - + diff --git a/packages/xl-odt-exporter/src/odt/__snapshots__/withCustomOptions/content.xml b/packages/xl-odt-exporter/src/odt/__snapshots__/withCustomOptions/content.xml index 7e7d009f10..986e87756c 100644 --- a/packages/xl-odt-exporter/src/odt/__snapshots__/withCustomOptions/content.xml +++ b/packages/xl-odt-exporter/src/odt/__snapshots__/withCustomOptions/content.xml @@ -327,10 +327,10 @@ Open file - + - + diff --git a/packages/xl-odt-exporter/src/odt/defaultSchema/blocks.tsx b/packages/xl-odt-exporter/src/odt/defaultSchema/blocks.tsx index f841bbcdd1..1a6eabd619 100644 --- a/packages/xl-odt-exporter/src/odt/defaultSchema/blocks.tsx +++ b/packages/xl-odt-exporter/src/odt/defaultSchema/blocks.tsx @@ -307,7 +307,7 @@ export const odtBlockMappingForDefaultSchema: BlockMapping< exporter as ODTExporter, block.props ); - const width = block.props.previewWidth; + const width = block.props.previewWidth || originalDimensions.width; const height = (originalDimensions.height / originalDimensions.width) * width; const captionHeight = 20; diff --git a/packages/xl-pdf-exporter/src/pdf/__snapshots__/example.jsx b/packages/xl-pdf-exporter/src/pdf/__snapshots__/example.jsx index dcefc99561..314a0cda69 100644 --- a/packages/xl-pdf-exporter/src/pdf/__snapshots__/example.jsx +++ b/packages/xl-pdf-exporter/src/pdf/__snapshots__/example.jsx @@ -558,13 +558,13 @@ From https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg @@ -627,7 +627,7 @@ From https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm diff --git a/packages/xl-pdf-exporter/src/pdf/__snapshots__/exampleWithHeaderAndFooter.jsx b/packages/xl-pdf-exporter/src/pdf/__snapshots__/exampleWithHeaderAndFooter.jsx index 6934cc578d..11a4be332b 100644 --- a/packages/xl-pdf-exporter/src/pdf/__snapshots__/exampleWithHeaderAndFooter.jsx +++ b/packages/xl-pdf-exporter/src/pdf/__snapshots__/exampleWithHeaderAndFooter.jsx @@ -566,13 +566,13 @@ From https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg @@ -635,7 +635,7 @@ From https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm diff --git a/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx b/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx index f79fc7bb1a..f847fc7820 100644 --- a/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx +++ b/packages/xl-pdf-exporter/src/pdf/defaultSchema/blocks.tsx @@ -167,7 +167,9 @@ export const pdfBlockMappingForDefaultSchema: BlockMapping< {caption(block.props, t)} diff --git a/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/images-json-chromium-linux.json b/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/images-json-chromium-linux.json index 912806cba2..09d895c644 100644 --- a/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/images-json-chromium-linux.json +++ b/tests/src/end-to-end/copypaste/copypaste.test.ts-snapshots/images-json-chromium-linux.json @@ -42,7 +42,7 @@ "url": "https://www.pulsecarshalton.co.uk/wp-content/uploads/2016/08/jk-placeholder-image.jpg", "caption": "", "showPreview": true, - "previewWidth": 462 + "previewWidth": 573 } } ] @@ -79,7 +79,7 @@ "url": "https://www.pulsecarshalton.co.uk/wp-content/uploads/2016/08/jk-placeholder-image.jpg", "caption": "", "showPreview": true, - "previewWidth": 462 + "previewWidth": 573 } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-chromium-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-chromium-linux.json index e1b8557a19..34c6aacd1b 100644 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-chromium-linux.json +++ b/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-chromium-linux.json @@ -19,8 +19,7 @@ "name": "", "url": "", "caption": "", - "showPreview": true, - "previewWidth": 512 + "showPreview": true } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-firefox-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-firefox-linux.json index e1b8557a19..34c6aacd1b 100644 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-firefox-linux.json +++ b/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-firefox-linux.json @@ -19,8 +19,7 @@ "name": "", "url": "", "caption": "", - "showPreview": true, - "previewWidth": 512 + "showPreview": true } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-webkit-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-webkit-linux.json index e1b8557a19..34c6aacd1b 100644 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-webkit-linux.json +++ b/tests/src/end-to-end/images/images.test.ts-snapshots/createImage-webkit-linux.json @@ -19,8 +19,7 @@ "name": "", "url": "", "caption": "", - "showPreview": true, - "previewWidth": 512 + "showPreview": true } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/dragImage-chromium-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/dragImage-chromium-linux.json index 2dec914845..e93714dbe8 100644 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/dragImage-chromium-linux.json +++ b/tests/src/end-to-end/images/images.test.ts-snapshots/dragImage-chromium-linux.json @@ -42,8 +42,7 @@ "name": "", "url": "", "caption": "", - "showPreview": true, - "previewWidth": 512 + "showPreview": true } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/dragImage-firefox-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/dragImage-firefox-linux.json index 2dec914845..e93714dbe8 100644 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/dragImage-firefox-linux.json +++ b/tests/src/end-to-end/images/images.test.ts-snapshots/dragImage-firefox-linux.json @@ -42,8 +42,7 @@ "name": "", "url": "", "caption": "", - "showPreview": true, - "previewWidth": 512 + "showPreview": true } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/dragImage-webkit-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/dragImage-webkit-linux.json index 2dec914845..e93714dbe8 100644 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/dragImage-webkit-linux.json +++ b/tests/src/end-to-end/images/images.test.ts-snapshots/dragImage-webkit-linux.json @@ -42,8 +42,7 @@ "name": "", "url": "", "caption": "", - "showPreview": true, - "previewWidth": 512 + "showPreview": true } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-chromium-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-chromium-linux.png index cea6ae3ebe..dd90c45c38 100644 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-chromium-linux.png and b/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-chromium-linux.png differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-firefox-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-firefox-linux.png index 4671db1b37..7ee04acce0 100644 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-firefox-linux.png and b/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-firefox-linux.png differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-webkit-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-webkit-linux.png index c78563d388..23362c0967 100644 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-webkit-linux.png and b/tests/src/end-to-end/images/images.test.ts-snapshots/embed-image-webkit-linux.png differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-chromium-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-chromium-linux.json index cab7789128..3307cf11b4 100644 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-chromium-linux.json +++ b/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-chromium-linux.json @@ -19,8 +19,7 @@ "name": "jk-placeholder-image.jpg", "url": "https://www.pulsecarshalton.co.uk/wp-content/uploads/2016/08/jk-placeholder-image.jpg", "caption": "", - "showPreview": true, - "previewWidth": 512 + "showPreview": true } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-firefox-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-firefox-linux.json index cab7789128..3307cf11b4 100644 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-firefox-linux.json +++ b/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-firefox-linux.json @@ -19,8 +19,7 @@ "name": "jk-placeholder-image.jpg", "url": "https://www.pulsecarshalton.co.uk/wp-content/uploads/2016/08/jk-placeholder-image.jpg", "caption": "", - "showPreview": true, - "previewWidth": 512 + "showPreview": true } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-webkit-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-webkit-linux.json index cab7789128..3307cf11b4 100644 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-webkit-linux.json +++ b/tests/src/end-to-end/images/images.test.ts-snapshots/embedImage-webkit-linux.json @@ -19,8 +19,7 @@ "name": "jk-placeholder-image.jpg", "url": "https://www.pulsecarshalton.co.uk/wp-content/uploads/2016/08/jk-placeholder-image.jpg", "caption": "", - "showPreview": true, - "previewWidth": 512 + "showPreview": true } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-chromium-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-chromium-linux.png index be97c394e4..e131f46303 100644 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-chromium-linux.png and b/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-chromium-linux.png differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-firefox-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-firefox-linux.png index f135f089ad..ac40250315 100644 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-firefox-linux.png and b/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-firefox-linux.png differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-webkit-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-webkit-linux.png index 9ab3997aa6..450be71f6b 100644 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-webkit-linux.png and b/tests/src/end-to-end/images/images.test.ts-snapshots/resize-image-webkit-linux.png differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-chromium-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-chromium-linux.json index 2f032bec02..96580f8502 100644 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-chromium-linux.json +++ b/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-chromium-linux.json @@ -20,7 +20,7 @@ "url": "https://www.pulsecarshalton.co.uk/wp-content/uploads/2016/08/jk-placeholder-image.jpg", "caption": "", "showPreview": true, - "previewWidth": 462 + "previewWidth": 573 } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-firefox-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-firefox-linux.json index 2f032bec02..96580f8502 100644 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-firefox-linux.json +++ b/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-firefox-linux.json @@ -20,7 +20,7 @@ "url": "https://www.pulsecarshalton.co.uk/wp-content/uploads/2016/08/jk-placeholder-image.jpg", "caption": "", "showPreview": true, - "previewWidth": 462 + "previewWidth": 573 } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-webkit-linux.json b/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-webkit-linux.json index 2f032bec02..96580f8502 100644 --- a/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-webkit-linux.json +++ b/tests/src/end-to-end/images/images.test.ts-snapshots/resizeImage-webkit-linux.json @@ -20,7 +20,7 @@ "url": "https://www.pulsecarshalton.co.uk/wp-content/uploads/2016/08/jk-placeholder-image.jpg", "caption": "", "showPreview": true, - "previewWidth": 462 + "previewWidth": 573 } } ] diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-chromium-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-chromium-linux.png index 4f81679196..368ab649a8 100644 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-chromium-linux.png and b/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-chromium-linux.png differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-firefox-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-firefox-linux.png index 9c8e16205a..800fc4f0b5 100644 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-firefox-linux.png and b/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-firefox-linux.png differ diff --git a/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-webkit-linux.png b/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-webkit-linux.png index f0f491eaa6..e9337209a8 100644 Binary files a/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-webkit-linux.png and b/tests/src/end-to-end/images/images.test.ts-snapshots/upload-image-webkit-linux.png differ diff --git a/tests/src/unit/core/clipboard/copy/__snapshots__/text/html/image.html b/tests/src/unit/core/clipboard/copy/__snapshots__/text/html/image.html index 3d97d675dd..8b48774f5b 100644 --- a/tests/src/unit/core/clipboard/copy/__snapshots__/text/html/image.html +++ b/tests/src/unit/core/clipboard/copy/__snapshots__/text/html/image.html @@ -1,6 +1,5 @@ BlockNote image \ No newline at end of file diff --git a/tests/src/unit/core/clipboard/copy/__snapshots__/text/html/nestedImage.html b/tests/src/unit/core/clipboard/copy/__snapshots__/text/html/nestedImage.html index 7983b6974c..9184e0d829 100644 --- a/tests/src/unit/core/clipboard/copy/__snapshots__/text/html/nestedImage.html +++ b/tests/src/unit/core/clipboard/copy/__snapshots__/text/html/nestedImage.html @@ -2,7 +2,6 @@ BlockNote image

Nested Paragraph 1

\ No newline at end of file diff --git a/tests/src/unit/core/clipboard/paste/__snapshots__/text/html/pasteImage.json b/tests/src/unit/core/clipboard/paste/__snapshots__/text/html/pasteImage.json index c0252a327f..7cc29bb0fa 100644 --- a/tests/src/unit/core/clipboard/paste/__snapshots__/text/html/pasteImage.json +++ b/tests/src/unit/core/clipboard/paste/__snapshots__/text/html/pasteImage.json @@ -24,7 +24,6 @@ "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "exampleURL", diff --git a/tests/src/unit/core/formatConversion/export/__snapshots__/nodes/image/button.json b/tests/src/unit/core/formatConversion/export/__snapshots__/nodes/image/button.json index e0aef86d8e..3ab8083ff6 100644 --- a/tests/src/unit/core/formatConversion/export/__snapshots__/nodes/image/button.json +++ b/tests/src/unit/core/formatConversion/export/__snapshots__/nodes/image/button.json @@ -10,7 +10,7 @@ "attrs": { "caption": "", "name": "", - "previewWidth": 512, + "previewWidth": undefined, "showPreview": true, "textAlignment": "left", "url": "", diff --git a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/basicBlockTypes.json b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/basicBlockTypes.json index 1a9bd562f2..6bc7199977 100644 --- a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/basicBlockTypes.json +++ b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/basicBlockTypes.json @@ -78,7 +78,6 @@ "backgroundColor": "default", "caption": "Image Caption", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "exampleURL", diff --git a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/deepNestedContent.json b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/deepNestedContent.json index 959dbbcd5a..48a4125142 100644 --- a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/deepNestedContent.json +++ b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/deepNestedContent.json @@ -146,7 +146,6 @@ "backgroundColor": "default", "caption": "Image Caption", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "exampleURL", diff --git a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/fakeImageCaption.json b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/fakeImageCaption.json index 3964251638..c197b4d31e 100644 --- a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/fakeImageCaption.json +++ b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/fakeImageCaption.json @@ -7,7 +7,6 @@ "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "exampleURL", diff --git a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/imageInParagraph.json b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/imageInParagraph.json index 28369c981f..5117c1a549 100644 --- a/tests/src/unit/core/formatConversion/parse/__snapshots__/html/imageInParagraph.json +++ b/tests/src/unit/core/formatConversion/parse/__snapshots__/html/imageInParagraph.json @@ -7,7 +7,6 @@ "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", "url": "exampleURL",