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

Make enter break through all levels of blockquoting

This commit is contained in:
Neil Jenkins 2011-11-17 18:33:24 +11:00
parent 09308b729b
commit 3ca646a1d1

View file

@ -716,6 +716,17 @@
return frag;
};
var removeBlockQuote = function ( frag ) {
var blockquotes = frag.querySelectorAll( 'blockquote' ),
l = blockquotes.length,
bq;
while ( l-- ) {
bq = blockquotes[l];
bq.replaceWith( bq.empty() );
}
return frag;
};
var makeList = function makeList ( nodes, type ) {
var i, l, node, tag, prev, replacement;
for ( i = 0, l = nodes.length; i < l; i += 1 ) {
@ -1198,7 +1209,7 @@
}
// Break blockquote
else if ( block.nearest( 'BLOCKQUOTE' ) ) {
return modifyBlocks( decreaseBlockQuoteLevel, range );
return modifyBlocks( removeBlockQuote, range );
}
}