ker/mod/squire2/squire-raw.js
function ( range, root ) {
    var container = range.startContainer,
        block;

    // If inline, get the containing block.
    if ( isInline( container ) ) {
      block = getPreviousBlock( container, root );
    } else if ( container !== root && isBlock( container ) ) {
      block = container;
    } else {
      block = getNodeBefore( container, range.startOffset );
      block = getNextBlock( block, root );
    }
    // Check the block actually intersects the range
    return block && isNodeContainedInRange( range, block, true ) ? block : null;
  }
function ( range, root ) {
    var container = range.startContainer,
        block;

    // If inline, get the containing block.
    if ( isInline( container ) ) {
      block = getPreviousBlock( container, root );
    } else if ( container !== root && isBlock( container ) ) {
      block = container;
    } else {
      block = getNodeBefore( container, range.startOffset );
      block = getNextBlock( block, root );
    }
    // Check the block actually intersects the range
    return block && isNodeContainedInRange( range, block, true ) ? block : null;
  }
function ( range , root ) { var container = range . startContainer , block ; // If inline, get the containing block. if ( isInline ( container ) ) { block = getPreviousBlock ( container , root ) ; } else if ( container !== root && isBlock ( container ) ) { block = container ; } else { block = getNodeBefore ( container , range . startOffset ) ; block = getNextBlock ( block , root ) ; } // Check the block actually intersects the range return block && isNodeContainedInRange ( range , block , true ) ? block : null ; }
Returns the first block at least partially contained by the range, or null if no block is contained by the range.
Returns the first block at least partially contained by the range or null if no block is contained by the range .