0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 15:23:29 -05:00

Don' use default block style to replace <br>s

When converting <br>s to our preferred <div> style in fixContainer,
we don't want to use the default block style as that may change the
visual output. We always want to just use a basic <div>; the only
purpose is for line breaks.
This commit is contained in:
Neil Jenkins 2020-01-23 10:16:36 +11:00
parent 43646a062f
commit 2cfba2cf1d

View file

@ -321,16 +321,14 @@ function fixContainer ( container, root ) {
isBR = child.nodeName === 'BR';
if ( !isBR && isInline( child ) ) {
if ( !wrapper ) {
wrapper = createElement( doc,
config.blockTag, config.blockAttributes );
wrapper = createElement( doc, 'div' );
}
wrapper.appendChild( child );
i -= 1;
l -= 1;
} else if ( isBR || wrapper ) {
if ( !wrapper ) {
wrapper = createElement( doc,
config.blockTag, config.blockAttributes );
wrapper = createElement( doc, 'div' );
}
fixCursor( wrapper, root );
if ( isBR ) {