# How To: Editing Generated Documents

S-Docs allows users to edit generated documents directly within Salesforce using the **Live Edit** feature. When enabled on a template, Live Edit lets users open a generated document, make changes, and save updates without regenerating the document.

This feature is useful when minor adjustments are required after document generation, such as correcting text, formatting, or updating values.

## How Is Live Edit Used in S-Docs?

The Live Edit feature allows users to:

* Open generated documents directly from Salesforce
* Make real-time edits to document content
* Save changes and preview the updated document
* Maintain a single version of the generated file

Live Edit is available wherever the generated document is stored in Salesforce, including the **Documents (S-Docs) Lightning Web Component (LWC)**.

## Enabling Live Edit on a Template

Live Edit must be enabled at the **template level**.

### Steps to Enable Live Edit

{% stepper %}
{% step %}
Navigate to the **S-Docs template record**
{% endstep %}

{% step %}
Open the **Template Editor**
{% endstep %}

{% step %}
Go to the **Document Options** tab
{% endstep %}

{% step %}
Under **Attachment & File Options**, check **Allow Edit**
{% endstep %}

{% step %}
Save the template

Once enabled, documents generated from this template will display an **Edit (pencil) icon**.
{% endstep %}
{% endstepper %}

## Editing a Generated Document

After a document is generated:

{% stepper %}
{% step %}
Locate the document in the **Generated Documents** LWC
{% endstep %}

{% step %}
Click the drop down arrow next to the document
{% endstep %}

{% step %}
Click the **Edit** icon
{% endstep %}

{% step %}
The document opens in **S-Docs Live Edit view** in a new pop window
{% endstep %}
{% endstepper %}

Within the Live Edit screen, users can:

* Make content changes and apply formatting using the toolbar
* Click **Save** to store changes
* Click **Close** to return to Salesforce

Once saved, the edited version is reflected wherever the document is previewed.

{% hint style="info" %}

#### Considerations

* Live Edit applies only to documents generated from templates with **Allow Edit** enabled
* Changes are saved directly to the generated document file
* No regeneration is required after edits are made

#### Limitations

While Live Edit provides flexibility, the following limitations apply:

* Supported formats: **PDF, PDF-Upload, HTML only**
* Editing cannot be restricted to specific sections of the document
* For **PDF-Upload templates**, only merged field data can be edited
  {% endhint %}


---

# 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://help.sdocs.com/sdocs/automation-and-document-lifecycle/workflows/editing-generated-documents-live-edit.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.
