     (@_get "characters").delete position, length
 
   createChar: (char, left=[], right=[]) ->
-    return new Y.Object {
+    return new @_model.custom_types.Object {
       char: char
       left: left
       right: right

      @_setModel @_model

      # listen to events on the model using the function propagateToEditor
      @_model.observe @propagateToEditor
    return @_model

  _setModel: (model) ->

    if not @_model?
      super

      @_set "selections", new YSelections()
      @_set "characters", new YList()
      @_set "cursors", new YList()

      if @_characters?
        (@_get "characters").insert 0, @_characters
