Commit 6911e026 by Яков

fix

parent 7c036f68
{ {
"name": "react-ag-qeditor", "name": "react-ag-qeditor",
"version": "1.0.89", "version": "1.0.90",
"description": "WYSIWYG html editor", "description": "WYSIWYG html editor",
"author": "atma", "author": "atma",
"license": "MIT", "license": "MIT",
......
...@@ -376,9 +376,19 @@ const ResizableImageExtension = TipTapImage.extend({ ...@@ -376,9 +376,19 @@ const ResizableImageExtension = TipTapImage.extend({
vertical-align: top; vertical-align: top;
position: relative; position: relative;
z-index: 1; z-index: 1;
${align === 'center' ? 'width: 100%; text-align: center;' : ''}
`, `,
'data-align': align 'data-align': align
}, ['img', HTMLAttributes]]; }, ['img', {
...HTMLAttributes,
style: `
${HTMLAttributes.style || ''};
display: ${align === 'center' ? 'inline-block' : 'block'};
margin: ${align === 'center' ? '0 auto' : '0'};
max-width: 100%;
height: auto;
`
}]];
}, },
addNodeView() { addNodeView() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment