   # Get index of word in rte list
   index: ->
     return @rte._rte.words.indexOf @
+
+  getSelections: ->
+    uniq = (value, index, self) ->
+      self.indexOf(value) == index and value != @
+
+    ret = []
+    if @left and @left.left
+      ret.append(@left.left)
+    if @left and @left.right
+      ret.append(@left.left)
+    if @right and @right.right
+      ret.append(@right.right)
+    if @right and @right.left
+      ret.append(@right.left)
+
+    ret.filter uniq # return a value with unique elements
+
 
 
 # A class describing a selection with a style (bold, italic, …)

      else if delta.delete?
        selection = new Selection position, (position + delta.delete), @
        @deleteSel selection

      else if delta.insert?
        @insert position, delta.insert

        array.splice index, 1
        break

  garbageCollect: ->
    sels = @_rte.selections
    for index in [0..sels.length-1]
      for key, value of sels[index]
        if value == null or value == ""
          sels[index].unbind()
          @removeSel sels[index]
