ker/mod/squire2/squire-raw.js
function ( event ) {
    var types = event.dataTransfer.types;
    var l = types.length;
    var hasPlain = false;
    var hasHTML = false;
    while ( l-- ) {
      switch ( types[l] ) {
      case 'text/plain':
        hasPlain = true;
        break;
      case 'text/html':
        hasHTML = true;
        break;
      default:
        return;
      }
    }
    if ( hasHTML || hasPlain ) {
      this.saveUndoState();
    }
  }
function ( event ) {
    var types = event.dataTransfer.types;
    var l = types.length;
    var hasPlain = false;
    var hasHTML = false;
    while ( l-- ) {
      switch ( types[l] ) {
      case 'text/plain':
        hasPlain = true;
        break;
      case 'text/html':
        hasHTML = true;
        break;
      default:
        return;
      }
    }
    if ( hasHTML || hasPlain ) {
      this.saveUndoState();
    }
  }
function ( event ) { var types = event . dataTransfer . types ; var l = types . length ; var hasPlain = false ; var hasHTML = false ; while ( l -- ) { switch ( types [ l ] ) { case 'text/plain' : hasPlain = true ; break ; case 'text/html' : hasHTML = true ; break ; default : return ; } } if ( hasHTML || hasPlain ) { this . saveUndoState ( ) ; } }
On Windows you can drag an drop text. We can't handle this ourselves, because as far as I can see, there's no way to get the drop insertion point. So just save an undo state and hope for the best.
On Windows you can drag an drop text . We can t handle this ourselves because as far as I can see there s no way to get the drop insertion point . So just save an undo state and hope for the best .