mirror of https://github.com/fantasticit/think.git
tiptap: fix get image size
This commit is contained in:
parent
2932e1d6bd
commit
1ccad83686
|
@ -50,7 +50,7 @@ export const ImageWrapper = ({ editor, node, updateAttributes }) => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const src = await uploadFile(file);
|
const src = await uploadFile(file);
|
||||||
const size = await getImageWidthHeight(file);
|
const size = await getImageWidthHeight(src);
|
||||||
updateAttributes({ ...fileInfo, ...size, src });
|
updateAttributes({ ...fileInfo, ...size, src });
|
||||||
toggleLoading(false);
|
toggleLoading(false);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue