feat: adds supported width and height attributes to embeds

This commit is contained in:
Jacob Overgaard
2024-09-26 14:56:26 +02:00
parent ad88d3a08f
commit 7b0fda5591

View File

@@ -33,6 +33,12 @@ export default class UmbTiptapEmbedExtensionApi extends UmbTiptapToolbarElementA
const result = await modalHandler.onSubmit().catch(() => undefined);
if (!result) return;
editor?.commands.setEmbeddedMedia(result);
editor?.commands.setEmbeddedMedia({
markup: result.markup,
url: result.url,
constrain: result.constrain,
height: result.height?.toString(),
width: result.width?.toString(),
});
}
}