tiptap-extension-resize-image
Advanced tools
Comparing version
@@ -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
49790
1.75%309
2.66%