   createExtraNewlineElement: ->
     if string = @currentRun?.string
       if /\n$/.test(string)
-        node = createNodesForString("\n", @text.getLength())[0]
+        @currentRun = { string: "\n", position: @text.getLength() }
+        node = @createStringNodesForCurrentRun()[0]
         @elements.push(node)
-
-  createElementsForAttributes = (attributes, parentAttribute) ->
-    elements = []
-    styles = []
-
-    for key, value of attributes when config = Trix.attributes[key]
-      if config.style
-        styles.push(config.style)
-
-      if config.tagName
-        unless config.parent and key is parentAttribute
-          element = document.createElement(config.tagName)
-          element.setAttribute(key, value) unless typeof(value) is "boolean"
-
-          if config.parent
-            elements.unshift(element)
-          else
-            elements.push(element)
-
-    unless elements.length
-      if styles.length
-        elements.push(document.createElement("span"))
-      else
-        elements.push(document.createDocumentFragment())
-
-    for style in styles
-      elements[0].style[key] = value for key, value of style
-
-    elements
 
   createAttachmentElementForCurrentRun: ->
     {attachment, attributes, position} = @currentRun

        element.style[key] = attributes[key] + "px" for key in ["width", "height"] when attributes[key]?
        element

  createNodesForString = (string, position) ->
    nodes = []

    for substring, index in string.split("\n")


    if @currentRun.attachment
      innerElement.appendChild(@createAttachmentElementForCurrentRun())
    else if @currentRun.string
      for node in @createStringNodesForCurrentRun()
        innerElement.appendChild(node)

    if parentAttribute
