             if components.count == 1 {
                 replaceCharacters(inRange: range, withSanitizedString: string)
             } else {
-                replaceCharacters(inRange: range, withComponents: components)
+                replaceCharacters(inRange: range, withComponents: components, separatedBy: ElementNodeDescriptor(elementType: .br))
             }
         }
 

                    prepend(sanitizedString: component)
                } else {
                    let textNode = TextNode(text: component, editContext: editContext)
                    let breakNode = ElementNode.break()
                    
                    parent.insert(textNode, at: insertionIndex)
                    parent.insert(breakNode, at: insertionIndex + 1)
                    
                    insertionIndex = insertionIndex + 2
                }

            if components.count == 1 {
                prepend(sanitizedString: string)
            } else {
                prepend(components: components, separatedBy: ElementNodeDescriptor(elementType: .br))
            }
        }

