# Documents

Documents are content objects and represent an individual entity of data, e.g. a page, a product a single element of a website or a data object for a list. The schema of a `document` is defined in a [content type](https://docs.comfortable.io/concepts-1/document-types).

## Adding Documents

At the top right corner of the webapp, you'll find a button with a 'Plus'-icon. On the dropdown menu you can choose from which type you want to create a document.

![](https://1465026891-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LADWNm2iPQ4ngpcPfGc%2F-LAI0KUZyRgDARQ9PtoL%2F-LAI0LXlsB5WpqH31NfQ%2Fadd-document.png?alt=media\&token=95461355-0f75-49f7-ba11-7d8c1ac0dbc8)

## Editing Documents

### The Writing Room

This is the place where editors compose and edit documents. It consists of two main parts, the [Content Area ](#content-area)and the [Sidebar](#sidebar)*.*

### Content Area

All of the fields defined for a `content type` appear on the left, main part of the Writing Room screen:

![](https://1465026891-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LADWNm2iPQ4ngpcPfGc%2F-LCZ7Nk8wCFl0I8_8gCU%2F-LCZ7Q6f6bguPRg5Lp22%2FScreen%20Shot%202018-05-15%20at%2016.08.00.png?alt=media\&token=65bbda75-ba82-4847-9e49-5b55c14beedd)

### Sidebar

The sidebar gives you overview and control over a document:

![](https://1465026891-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LADWNm2iPQ4ngpcPfGc%2F-LCZ7Nk8wCFl0I8_8gCU%2F-LCZ7ofhsUlnntgDRZ1I%2FScreen%20Shot%202018-05-15%20at%2016.09.57.png?alt=media\&token=1bd0c451-4c9b-43a3-b8ff-f4210ebec32a)

### Revisions

With revisions you can review and restore changes or versions of a document. Click the tab 'Revisions' to view and choose from different versions of your content.

You can preview and restore different versions of a document. If the document is published, you can decide to restore a version as draft.

### Drafts

You can create drafts for published documents if the content needs to be reviewed before it gets published, or if you are being interrupted while updating a document.

{% hint style="info" %}
Draft mode is available when a document has the `published` state.
{% endhint %}

### Publishing

#### Switch Button

Control wether a document is published or unpublished by clicking the desired state.

{% hint style="info" %}
**Save** the document for the publishing state to take effect.
{% endhint %}

#### Scheduled Publishing

Documents, e.g. an event, can be published automatically at a certain point in time. They can also be set to unpublished at a date or time, e.g. a few days after the event was over. \
Leave the field blank if you do not want to enable an option.

If you'd like to remove a document from [collections](https://docs.comfortable.io/concepts-1/collections) after it was unpublished, simply enable the checkbox 'Unpublish and move to Archive'.

![](https://1465026891-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LADWNm2iPQ4ngpcPfGc%2F-LAI3vd8u3rI8IsXWsbZ%2F-LAI43Q_D2nViZhJfXYO%2Fpublishing.png?alt=media\&token=c1047ec2-d438-4587-8b4b-d0485671ea9e)

### Tags

Tags are used to describe a documents content or purpose. They may also be used as a filter argument to include or exclude documents from collections.

### Languages

You can filter translatable fields of a language by selecting the corresponding tab on the top of the Writing Room. [Locales](https://docs.comfortable.io/concepts-1/locales) can be managed in the settings area of a repositor&#x79;*.*

![The language tabs](https://1465026891-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LADWNm2iPQ4ngpcPfGc%2F-LANJRqYE_srIeZfaqTf%2F-LANJdXxhHFmqNmTrbV2%2Flanguage-tabs.png?alt=media\&token=83eed418-e86d-4dac-bad4-5d888242ec63)

## Deleting Documents

To delete a document you'll need to **move it to the Archive first**. You can do this by either (1) choosing it from any [collection](https://docs.comfortable.io/concepts-1/collections) or the `All Documents` view by selecting the corresponding checkbox and clicking the 'Trashcan'-Butto&#x6E;*.* Or (2) while in the `Writing Room`, open the Save Buttons context menu on the [sidebar](#sidebar) and click 'Move to Archive'.

The `Archive` collects all of the documents you decided to move their manually, or automatically at a certain point of time, configured in the [Writing Room](#the-writing-room).\
\
**To delete a document permanently:**

1. Navigate to 'Archive' by clicking 'Document Archive' on the bottom of the [Content Tree](https://docs.comfortable.io/concepts-1/content-tree).
2. Select documents by clicking their checkbox.
3. Once you have selected the documents you want to delete, click the 'Trashcan' Button.
4. Confirm.
