     {textAdded, textDeleted}
 
   insertReplacementText: (event) ->
-    newText = event.dataTransfer.getData("text/plain")
+    newText = event.data ? event.dataTransfer.getData("text/plain")
     oldText = getTargetText(event)
     {length} = oldText
     @delegate?.inputControllerWillPerformTyping()

  deleteByDrag: (event) ->

  deleteCompositionText: (event) ->

  deleteContent: (event) ->


{objectsAreEqual, compact, summarizeStringChange} = Trix

class Trix.Level2InputController extends Trix.AbstractInputController
  elementDidMutate: (mutationSummary) ->
    if @composition?
      @delegate?.inputControllerDidAllowUnhandledInput?()
    else
      super

  mutationIsExpected: (mutationSummary) ->
    result = objectsAreEqual(mutationSummary, @inputSummary)
    console.log("[mutation] [#{if result then "expected" else "unexpected"}] #{JSON.stringify({mutationSummary})}")
