       if start - 1 < 0
         before = []
       else
-        before = @_rte.words[..start-1]
-
-      @_rte.words = before.concat(@_rte.words[end..])
+        before = @getWords(0, start-1)
+
+      @_rte.words = before.concat(@getWords(end))
     @_rte.words
 
   merge: (n) ->
     if 0 <= n < @_rte.words.length
-      w = @_rte.words[n]
+      w = @getWord(n)
       @deleteWords(n)
       @insert({startPos: {word: n, pos:0}}, w)
     else

  isValid: ->
    @startPos.lt(@endPos)

class Rte # Rich Text Editor
  constructor: (content = '')->
    if content.constructor is String
      @_rte = {}
      # TODO: convert HTML
      @_rte.align = 'left'
      @_rte.style = []
      @_rte.selections = []
      @_rte.cursorInformation = {}
      @_rte.words = []
      @push(content)
    else
      throw new Error "Only accepts strings."

  _name: "Rich Text Editor"

  # _getModel:
  # _setModel:
  # observe:
  # unobserve:

  val: (content)->
    if content?

  overlaps: (s) ->
    @startPos.lt(s.endPos) or @endPos.gt(s.startPos)

  #TODO
  setStyle: (@style) ->

  clone: ->
    new Selection(@startPos, @endPos)
