   # Append new words at the end of the word list
   # @param [String] content the string to append
   push: (content) ->
+    console.log '"' + content + '"'
     preSpaces = content.match PreSpacesRegExp
     if preSpaces isnt null
       @_rte.words.push(new Word (preSpaces[0]))
     words = content.match WordRegExp
+    console.log '"' + preSpaces + '"'
+    console.log words
     if _.isArray(words)
       for w in words
         @_rte.words.push (new Word w)

    index = sel.startPos.word   #position to work from
    pos = sel.startPos.pos

    preSpaces = content.search PreSpacesRegExp

    currWord = @getWord index

    # move the spaces to the previous word if a pos == 0
    if preSpaces > -1
      if pos == 0
        if index = 0
          index += 1
          @insertWord 0, (new Word '')
        prevWord = @getWord (index-1)
        prevWord += content.substring(0, preSpaces)
        content = content.substring(preSpaces)

    # insert the content at position
    currWord = currWord.substring(0, pos) + content + currWord.substring(pos)

    # cut the word
    newWords = currWord.match WordRegExp
    tmp = currWord.search PreSpacesRegExp
    if (tmp) > - 1
      newWords[0] = (currWord.substring 0, tmp) + newWords[0]
    console.log newWords
    @setWord index, newWords[0]
    @insertWords index+1, newWords[1..]


  split: (n) ->
    word = @getWord n

  merge: (n) ->
    if 0 <= n < @_rte.words.length
      w = @getWord(n).trimRight()
      @deleteWords(n)
      @insert({startPos: {word: n, pos:0}}, w)
    else
      throw new Error "Impossible to merge"

