 
         /// Replace characters in targetRange by a node with the name in nodeName and attributes
         ///
-        /// - parameter targetRange:        The range to replace
-        /// - parameter elementDescriptor:  The descriptor for the element to replace the text with.
-        ///
-        func replaceCharacters(inRange targetRange: NSRange, withElement elementDescriptor: ElementNodeDescriptor) {
+        /// - parameter targetRange: The range to replace
+        /// - parameter descriptor:  The descriptor for the element to replace the text with.
+        ///
+        func replaceCharacters(in targetRange: NSRange, with descriptor: NodeDescriptor) {
             
             guard let textNode = lowestTextNodeWrapping(targetRange) else {
                 return

            let absoluteLocation = textNode.absoluteLocation()
            let localRange = NSRange(location: targetRange.location - absoluteLocation, length: targetRange.length)
            textNode.split(forRange: localRange)
            
            let imgNode = ElementNode(descriptor: elementDescriptor, editContext: editContext)
            
            guard let index = textNode.parent?.children.index(of: textNode) else {
                assertionFailure("Can't remove a node that's not a child.")

                return
            }
            
            textNodeParent.insert(node, at: index)
            textNodeParent.remove(textNode)
        }

