       @editAttachment(attachment)
       false
     else
-      @document.removeTextAtRange(range)
+      @setDocument(@document.removeTextAtRange(range))
       @setPosition(range[0])
 
   moveTextFromRange: (range) ->
     [position] = @getSelectedRange()
-    @document.moveTextFromRangeToPosition(range, position)
+    @setDocument(@document.moveTextFromRangeToPosition(range, position))
     @setSelectedRange(position)
 
   removeAttachment: (attachment) ->
     if range = @document.getRangeOfAttachment(attachment)
       @stopEditingAttachment()
-      @document.removeTextAtRange(range)
+      @setDocument(@document.removeTextAtRange(range))
       @setSelectedRange(range[0])
 
   removeLastBlockAttribute: ->


  insertBlockBreak: ->
    selectedRange = @getSelectedRange()
    @document.insertBlockBreakAtRange(selectedRange)

    startPosition = selectedRange[0]
    endPosition = startPosition + 1

      else
        position += 1

    newDocument = new Trix.Document [block.removeLastAttribute().copyWithoutText()]
    @setDocument(document.insertDocumentAtRange(newDocument, range))
    @setPosition(position)

  insertLineBreak: ->
