         throw new Error "Expecting numbers as arguments"
       c.constructor is "Rte"
 
-      [@startPos, @endPos] = @_relativeFromAbsolute(a, b, c)
-      attr = d
-
-    else if not _.isUndefined(a) and not _.isUndefined(b) and a.pos? and a.word? and b.pos? and b.word?
+      @startPos = @_relativeFromAbsolute a, c
+      @endPos = @_relativeFromAbsolute b, c
+      style = d
+
+    else if not _.isUndefined(a) and not _.isUndefined(b) and
+      a.pos? and a.word? and
+       b.pos? and b.word?
       @startPos = a
       @endPos = b
 

      throw new Error "Expected a string array as second parameter, got #{words}"
    if 0 <= position <= @_rte.words.length
      wordsObj = (new Word w for w in words)
      console.log "splcing!", wordsObj

      left = @_rte.words.slice(0, position)
      right = @_rte.words.slice(position)

  # Convert indexes from beginning of text to coordinates expressed in word and
  # position within word
  #
  # @param [Integer] position index of position to find
  # @param [Rte] rte a rich text editor instance
  _relativeFromAbsolute: (position, rte)->
    index = 0

    while position > 0
      if index >= rte._rte.words.length
        return {word: index, pos: 0}
      if rte._rte.words[index].word.length > position
        return {word: index, pos: position}
      else
        position -= rte._rte.words[index].word.length
        index += 1
    return {word: index, pos: position}

  # Compares the bounds of two selections
  #
