--- layout: v0.20 permalink: /0.20/docs/modules/authorship/ title: Authorship Module - Quill v0.20 ---

# Authorship

The Authorship module highlights the background of text to show who wrote what.

Enabling this module will also add a new format `author` to the list of recognized formats. The value of the `author` format is the id of the author. Changes made to the Quill editor will also attach the local author metadata.

### Configuration

Parameter | Type | Description
--- | --- | ---
`authorId` | String | ID of current author.
`button` | String | CSS selector for button that toggles authorship colors on/off.
`color` | String | Color to correspond with current author. Can be any valid CSS color.

### Methods

- `addAuthor(id, color)`

Parameter | Type | Description
--- | --- | ---
`id` | String | ID of author to add.
`color` | String | Color to correspond with author id. Can be any valid CSS color.

### Example

    var editor = new Quill('#editor');

    var module = editor.addModule('authorship', {
      authorId: 'id-1234',
      button: '#author-button',
      color: 'rgb(255, 0, 255)'
    });

    module.addAuthor('id-5678', 'rgb(255, 255, 0)'); // Set external authors

    editor.on('text-update', function(delta) {
      // If the user types an 'a' into the editor, normally we would get:
      //   delta.ops = [{ 'a' }]
      // But with the author module enabled we would now get:
      //   delta.ops = [{ value: 'a', attributes: { author: 'id-1234' } }]
    });