﻿# Edit documents

> [HTML Version](edit-documents-locally.html)

In BRIX, you can edit documents online in the system interface.

To edit a document, make sure that:

- The system administrator has configured [integration with a file viewing or editing service](external_viewer_intergation.md).

- You have permission to edit the **Document**-type** **app item.

## Open a document for editing

The steps for opening a document for editing depend on what you want to edit:

- The current document version or [a new document draft](draft-doc.md). Open the **Document**-type** **app item and click **Edit**.

- A version draft or an outdated version**.** Open the **Document**-type app item, click **All Versions** in the sidebar, and select the required version. In the window that opens, click **Edit**. Save changes.

How changes are saved depends on the status of the document version you are editing.

| | |
|------|------|
| **What you are editing** | **What happens when you save changes** |
| Current version | A new document version is created with a new version number and becomes the current version. The original version moves to the list of outdated versions. |
| Draft of a new document or document version  | The changes are saved to the existing draft without creating a new version. You can make the draft the current version when it is ready. |
| Outdated version | A new version is created with a new version number. When saving changes, you can make it the current version or save it as a draft. In both cases, the original version remains in the list of outdated versions. |


For more information about document statuses and working with versions, see [Version control and document comparison](docs-versions.md).

## Edit the current version or a new document draft online

The current document version and a new document draft are displayed on the view form of the **Document**-type app item.

To edit either one:

1. Open the **Document**-type app item and click **Edit** in the bottom-left corner.

2. The editing window opens. Make your changes and save them.  
  
The result depends on what you edited:

- Current version:** **a new document version is added to the system and becomes the current version.

- New document draft: the changes are saved to the draft without changing its version number. When the document is ready, you can publish it by making it the current version.

## Edit an outdated version or a document version draft online

To edit an outdated version or a document version draft:

1. Open the **Document**-type app item. In the **Document versions** section of the sidebar, click **All Versions**.

2. Select the required version from the list.

3. In the window that opens, click **Edit** in the bottom-left corner.

4. Make your changes and save them.  
  
The next steps depend on the status of the version you edited:

1. **When editing a draft.**  
****  
The changes are saved to the draft without changing its version number. You can return to editing it later or make it the current version in the **Drafts** tab of the window that opens.  
  
The system administrator can hide the **Make Current** button in the [Document Versions](document-version.md) widget settings by selecting **Read only > Yes**.

(edit-docs-1.png)

2. **When editing an outdated version.**  
****  
In the window that opens, choose the status to assign to the edited version:

- Make current: a new version is created based on the edited version. It receives a new version number and becomes the current version. Users will see it when they open the **Document**-type app item.

- Save as draft: enable the **Set as current** option. A draft is created with a new version number.

In both cases, the original outdated version remains in the system with its original version number.

