0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

Merge pull request #127 from gertsonderby/remove-all-cleans-inputs

This commit is contained in:
Neil Jenkins 2015-08-27 11:16:20 +01:00
commit 02df8f9ed4
3 changed files with 4 additions and 4 deletions

View file

@ -3772,7 +3772,7 @@ function removeFormatting ( self, root, clean ) {
for ( node = root.firstChild; node; node = next ) {
next = node.nextSibling;
if ( isInline( node ) ) {
if ( node.nodeType === TEXT_NODE || isLeaf( node ) ) {
if ( node.nodeType === TEXT_NODE || node.nodeName === 'BR' || node.nodeName === 'IMG' ) {
clean.appendChild( node );
continue;
}

File diff suppressed because one or more lines are too long

View file

@ -1647,7 +1647,7 @@ function removeFormatting ( self, root, clean ) {
for ( node = root.firstChild; node; node = next ) {
next = node.nextSibling;
if ( isInline( node ) ) {
if ( node.nodeType === TEXT_NODE || isLeaf( node ) ) {
if ( node.nodeType === TEXT_NODE || node.nodeName === 'BR' || node.nodeName === 'IMG' ) {
clean.appendChild( node );
continue;
}