mirror of
https://github.com/fastmail/Squire.git
synced 2025-01-18 04:32:28 -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';
|
isBR = child.nodeName === 'BR';
|
||||||
if ( !isBR && isInline( child ) ) {
|
if ( !isBR && isInline( child ) ) {
|
||||||
if ( !wrapper ) {
|
if ( !wrapper ) {
|
||||||
wrapper = createElement( doc,
|
wrapper = createElement( doc, 'div' );
|
||||||
config.blockTag, config.blockAttributes );
|
|
||||||
}
|
}
|
||||||
wrapper.appendChild( child );
|
wrapper.appendChild( child );
|
||||||
i -= 1;
|
i -= 1;
|
||||||
l -= 1;
|
l -= 1;
|
||||||
} else if ( isBR || wrapper ) {
|
} else if ( isBR || wrapper ) {
|
||||||
if ( !wrapper ) {
|
if ( !wrapper ) {
|
||||||
wrapper = createElement( doc,
|
wrapper = createElement( doc, 'div' );
|
||||||
config.blockTag, config.blockAttributes );
|
|
||||||
}
|
}
|
||||||
fixCursor( wrapper, root );
|
fixCursor( wrapper, root );
|
||||||
if ( isBR ) {
|
if ( isBR ) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue