0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-09 08:20:08 -05:00

Removing all formatting also removes INPUT elements.

This commit is contained in:
Gert K. Sønderby 2015-08-26 15:42:01 +02:00
parent edfd35ccec
commit 8238b7a8e4
3 changed files with 4 additions and 4 deletions

View file

@ -3768,7 +3768,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

@ -1643,7 +1643,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;
}