Commit 6c1501b1 authored by Яков's avatar Яков
Browse files

update image

parent 0b426860
{
"name": "react-ag-qeditor",
"version": "1.1.36",
"version": "1.1.37",
"description": "WYSIWYG html editor",
"author": "atma",
"license": "MIT",
......
......@@ -380,7 +380,13 @@ const ResizableImageTemplate = ({ node, updateAttributes, editor, getPos, select
const sharedMargin = { marginTop: '0.5rem', marginBottom: '0.5rem' };
if (align === 'center') {
return { ...sharedMargin, display: 'block', lineHeight: 0 };
// Используем float:left+width:100% чтобы не создавать block-in-inline внутри <p>
// (иначе параграф получает лишнюю высоту). textAlign:center центрирует внутренний inline-block.
return {
...sharedMargin, lineHeight: 0,
display: 'inline-block', float: 'left', clear: 'both',
width: '100%', textAlign: 'center',
};
}
if (!wrap) {
// no-wrap: float:left + width:100% — занимает всю строку, текст не может встать рядом.
......
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