       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

  createElementForAttachment = ({attachment, attributes, position}) ->
    switch attachment.type
      when "image"
        element = document.createElement("img")

    elements = []
    styles = []

    for key, value of attributes when config = Trix.attributes[key]
      if config.style
        styles.push(config.style)

