       innerElement = child
       innerElement.trixPosition = position
 
-    if string
+    if @currentRun.attachment
+      innerElement.appendChild(@createAttachmentElementForCurrentRun())
+    else if string
       for node in createNodesForString(string, position)
         innerElement.appendChild(node)
 

    elements = []
    styles = []

    for key, value of attributes
      config = Trix.attributes[key]

      if config.style
        styles.push(config.style)



    elements

  createAttachmentElementForCurrentRun: ->
    {attachment, attributes, position} = @currentRun

    switch attachment.type
      when "image"
        element = document.createElement("img")
