   # Document delegate
 
   didEditDocument: (document) ->
-    if @skipRender
-      delete @skipRender
-    else
+    if @render
+      delete @render
       @delegate?.compositionDidChangeDocument?(@document)
 
   documentDidAddAttachment: (document, attachment) ->

            @insertBlock(newBlock)
          # Stay in the block, add a newline
          else
            @insertString("\n")
    else
      @insertString("\n")

  insertHTML: (html) ->
    document = Trix.Document.fromHTML(html)

    @document.insertDocumentAtLocationRange(document, locationRange)
    @setPosition(position + document.getLength())

  insertString: (string, options = {}) ->
    attributes = @getCurrentTextAttributes()
    text = Trix.Text.textForStringWithAttributes(string, attributes)
    updatePosition = options.updatePosition ? @currentTextAttributesRequireRender()
    @insertText(text, {updatePosition})

  currentTextAttributesRequireRender: ->
    locationRange = @getLocationRange()
