tiptap-extension-resize-image
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -67,5 +67,9 @@ 'use strict'; | ||
}; | ||
// add position style and className | ||
$positionContainer.appendChild($container); | ||
const justifyContent = style.match(/justify-content: (.*?);/); | ||
$positionContainer.setAttribute('style', `display: flex; ${justifyContent ? justifyContent[0] : ''}`); | ||
if (justifyContent) { | ||
$img.className = `tiptap-image-${justifyContent[1]}`; | ||
} | ||
$container.setAttribute('style', `${style}`); | ||
@@ -72,0 +76,0 @@ $container.appendChild($img); |
@@ -63,5 +63,9 @@ import Image from '@tiptap/extension-image'; | ||
}; | ||
// add position style and className | ||
$positionContainer.appendChild($container); | ||
const justifyContent = style.match(/justify-content: (.*?);/); | ||
$positionContainer.setAttribute('style', `display: flex; ${justifyContent ? justifyContent[0] : ''}`); | ||
if (justifyContent) { | ||
$img.className = `tiptap-image-${justifyContent[1]}`; | ||
} | ||
$container.setAttribute('style', `${style}`); | ||
@@ -68,0 +72,0 @@ $container.appendChild($img); |
{ | ||
"name": "tiptap-extension-resize-image", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49790
309