 Characters = require 'characters'
 Selections = require '../../y-selections'
 
+# A class holding the information about rich text
 class RichText
-  constructor: (content, editor) ->
+  # @param content [String] an initial string
+  # @param editor [Editor] an editor instance
+  # @param author [String] the name of the local author
+  constructor: (content, editor, author) ->
     # TODO: generate a UID
     @selections = new Selections
     @characters = new Characters content, @selections
-    @_cursors = []
+
+    @author = author
 
     @editor = editor
+    # shouldn't go there
     @editor.cursors = @editor.getModule("multi-cursor")
 
   _getModel: (Y, Operation) ->

            ]}
          @editor.setContents delta

          # propagate new string
        when "selections"
          selectionStart = @characters.indexOf (event.object.left or event.oldValue.left)
          selectionEnd = @characters.indexOf (event.object.right or event.oldValue.right)

    # TODO: check that our cursor is in the cursors
    @_model = model
    delete @_cursors

  set: (key, val) ->
    @_model.val key, val
  get: (key) ->
