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:
parent
43646a062f
commit
2cfba2cf1d
1 changed files with 2 additions and 4 deletions
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue