tiptap-extension-resize-image
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -20,6 +20,5 @@ 'use strict'; | ||
const width = element.getAttribute('width'); | ||
if (!width || isNaN(Number(width))) { | ||
return; | ||
} | ||
return `width: ${width}px; height: auto; cursor: pointer;`; | ||
return width | ||
? `width: ${width}px; height: auto; cursor: pointer;` | ||
: `${element.style.cssText}`; | ||
}, | ||
@@ -26,0 +25,0 @@ }, |
@@ -16,6 +16,5 @@ import Image from '@tiptap/extension-image'; | ||
const width = element.getAttribute('width'); | ||
if (!width || isNaN(Number(width))) { | ||
return; | ||
} | ||
return `width: ${width}px; height: auto; cursor: pointer;`; | ||
return width | ||
? `width: ${width}px; height: auto; cursor: pointer;` | ||
: `${element.style.cssText}`; | ||
}, | ||
@@ -22,0 +21,0 @@ }, |
{ | ||
"name": "tiptap-extension-resize-image", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "A tiptap image resizing extension for React, Vue, Next, and VanillaJS. Additionally, it can align the image position.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
58462
443