# Redacting a project file

{% hint style="info" %}
**Required guided redaction permission:** Edit file redactions
{% endhint %}

In **Redaction** mode, you add and remove redactions.

To change to **Redaction** mode, in the file heading, click the edit icon.

## **Adding redactions**

In a text file, you can select specific text to redact.

For a PDF, you redact a selected area or an entire page.

### **Redacting selected text in a text file**

To add a single redaction of selected text:

1. Select the text.\
   \
   Note that you can add a redaction of text within an existing redaction.
2. On the redaction panel, select the reference codes that apply.

### **Redacting a selected area in a PDF**

For PDFs, you redact an area that you draw over the page. You can draw over a single word, or you might use this option to redact a displayed image or an entire table.

To redact a selected area:

1. Click **Draw Redaction** or press **d**. This puts you in draw redaction mode.
2. Use the mouse to draw a box over the area to redact.
3. After you draw the box, identify the reference codes that apply.

The selected reference codes replace any individual redactions that were within the area.

However, Textual does save those individual redactions. If you remove the redaction for the selected area, the individual redactions are restored.

To exit draw redaction mode, click **Draw Redaction** or press **d** again.

### **Redacting selected values throughout the file**

If there are multiple instances of a value in a file, then when you redact one instance, you can choose to redact all of the instances in that file.

To redact all of the instances of a selected value in the current file:

1. Select the value - either highlight the text or use area selection.
2. Select the reference codes to apply.
3. Click the file icon.
4. On the confirmation panel, click **Confirm**.

### **Redacting selected values throughout the project**

If there are other instances of the value in other project files, then when you redact one instance, you can choose to redact all of the instances in the project.

To redact all of the instances of a selected value in all of the project files:

1. Select the value - either highlight the text or use area selection.
2. Select the reference codes to apply.
3. Click the folder icon.
4. On the confirmation panel, click **Confirm**.

### **Redacting an entire page**

For PDF files, you can redact an entire page.

To redact the current page:

1. Click **Redact Current Page**.
2. On the panel, select the reference codes that apply.

The selected reference codes replace any individual redactions that were on the page.

However, Textual does save those individual redactions. If you remove the redaction for the entire page, the individual redactions are restored.

## **Identifying redactions that do not have reference codes**

Every redaction must be assigned at least one reference code. To enable Textual to assign reference codes when it performs its scan, you must assign reference codes to the entity types that are present in the project files.

Redactions that do not have reference codes are not redacted in the downloaded output files. They also are not marked in **Review** mode or **Preview** mode.

In Redaction mode:

* In the file content, redactions without a reference code are outlined in red.
* The redactions list displays a separate list of redactions that do not have assigned reference codes. The list heading includes a link to the reference code settings.

## **Changing the assigned reference codes for a redaction**

For each redaction, you can add and remove assigned reference codes.

### **From the file content**

From the file content, to change the assigned reference codes for a redaction:

1. Click the redaction.
2. On the panel, to add a reference code, click **Add**, then select the reference code to add.
3. To remove a reference code, click the delete icon for the reference code.

### **From the redaction list**

The redaction list at the right includes the assigned reference codes for each redaction. A **+** icon displays next to the assigned codes.

To change the assigned reference codes:

1. Click the redaction.
2. On the panel, check the checkboxes for the reference codes to add.

From the list of entities that do not have reference codes, to add reference codes:

1. Click the entity value, then click **Assign reference codes**.
2. On the panel, check the checkboxes for the reference codes to add.

## **Removing redactions**

You can remove redactions from the file.

When you remove a redaction of a selected area or an entire page, Textual restores any individual redactions that were there previously.

### **From the file content**

From the file content, to remove a single redaction:

1. Click the redaction.
2. On the redaction panel, click the delete icon.

### **From the redaction list**

From the redaction list, to remove one or more redactions:

1. Check the checkbox for each redaction to remove.
2. Click **Remove**.

## **Adding and removing text highlights**

Instead of redacting selected text, you can choose to highlight it.

Text highlights are not assigned reference codes. In the redaction list and output, the text is struck through instead of covered.

### **Adding a text highlight**

To add a text highlight:

1. Select the text to highlight.
2. On the panel, click the strikethrough icon.

### **Removing a text highlight**

To remove a highlight:

1. Click the highlight.
2. On the panel, click the delete icon.

## Selecting multiple PDF redactions to update

In a PDF file, to update multiple redactions:

1. Either click **Bulk Selection**, or press **b**. This puts you into bulk selection mode.
2. Use the mouse to draw a box around the redactions to select.
3. On the panel, select the updates to apply.

When you are finished with the updates, to exit bulk selection mode, click **Bulk Selection** or press **b** again.

## **Undoing and redoing redaction changes**

Textual maintains a history of your redaction changes.

To undo the most recent change, click the undo icon.

To restore the most recent undone change, click the redo icon.

When you apply a redaction to all matching values in a file or project, Textual undoes and redoes all of those changes.

For changes applied in bulk selection mode, Textual only undoes or redoes one change at a time. For example, if you selected 3 redactions and then removed them, when you select the undo option, it only restores one of those redactions. To restore all of those redactions, you would select undo 3 times.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonic.ai/textual/guided-redaction/redaction-project-file-process/redaction-project-redact-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
