     @editor.applyDelta(delta, options)
 
   formatText: (index, length, name, value, options) ->
-    [index, length, formats, options] = buildParams(index, length, name, value, options)
+    [index, length, formats, options] = this._buildParams(index, length, name, value, options)
     return unless length > 0
     delta = Tandem.Delta.makeRetainDelta(this.getLength(), index, length, formats)
     @editor.applyDelta(delta, options)

    @editor.root.focus()

  formatLines: (index, length, name, value, options) ->
    [index, length, formats, options] = buildParams(index, length, name, value, options)
    [line, offset] = @editor.doc.findLineAt(index)
    # TODO potential util function with editor._formatAt
    delta = Tandem.Delta.getIdentity(this.getLength())



DEFAULT_API_OPTIONS = { silent: false, source: 'api' }


class Quill extends EventEmitter2
