> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/en/work/file-library/online-editing.md).

# Online Editing

Edit Markdown, TXT, SQL, JSON, and CSV files directly in the File Library and create a new version each time you save. Learn how concurrent edits are handled and how to update other formats by uploadi

For small changes, you do not need to download and re-upload a file. Edit text-based files directly in the File Library and save to create a new version. You can restore earlier versions at any time.

{% hint style="info" %}
Your organization must enable online editing separately. If the file details do not show an <mark style="color:blue;">Edit</mark> button, contact your organization administrator.
{% endhint %}

## Use Case <a href="#use-case" id="use-case"></a>

A customer service supervisor notices a typo in an FAQ. She opens FAQ.md in the File Library, clicks <mark style="color:blue;">Edit</mark> to fix the line, switches to <mark style="color:blue;">Preview</mark> to check the formatting, and clicks <mark style="color:blue;">Save</mark>. “Saved v4” appears in the upper-right corner, and the version list gains an entry for her change.

***

## Edit a Text File <a href="#edit-text-file" id="edit-text-file"></a>

### 1. Open the Editor <a href="#open-editor" id="open-editor"></a>

Click the file name to open its details, then click <mark style="color:blue;">Edit</mark> to open the full-page editor. The editor provides line numbers and syntax highlighting. CSV files use a table editor where you can add or delete rows.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-0dc4e48894ddd4c8c550d9517f14075bcd5c5ce7%2Ffile-library-online-editor.png?alt=media" alt="Online Markdown editor with line 10 modified and the Save button enabled in the upper-right corner"><figcaption><p>The Save button in the upper-right corner becomes available after you make changes</p></figcaption></figure>

### 2. Switch to Preview <a href="#preview" id="preview"></a>

For Markdown files, switch between <mark style="color:blue;">Edit</mark> and <mark style="color:blue;">Preview</mark> at the top. You cannot make changes in preview mode; return to <mark style="color:blue;">Edit</mark> to continue editing.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-166386fe982835ddcd879327ed60cc584feec61c%2Ffile-library-online-editor-preview.png?alt=media" alt="Markdown preview mode showing the formatted FAQ content"><figcaption><p>Preview the formatted content</p></figcaption></figure>

### 3. Save as a New Version <a href="#save-version" id="save-version"></a>

Click <mark style="color:blue;">Save</mark> to save the content as a new version. “Saved v○” appears in the upper-right corner. Use the version menu to view previous versions or switch back to an earlier version's content. The editor does not save automatically. If you have unsaved changes when leaving, the system prompts you.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-9312bee2a01c22662002c09897bda7f1ba1fbc83%2Ffile-library-online-editor-versions.png?alt=media" alt="Version menu in the upper-right corner of the editor listing the current version v4 and versions v3, v2, and v1"><figcaption><p>Each save creates a new version</p></figcaption></figure>

### Supported Formats and Limits <a href="#supported-formats" id="supported-formats"></a>

| Formats                 | Limits                                            |
| ----------------------- | ------------------------------------------------- |
| MD, TXT, SQL, JSON, CSV | 5 MB per file; up to 50,000 rows for CSV and JSON |

Files that exceed these limits can only be previewed and downloaded.

***

## Concurrent Editing <a href="#concurrent-editing" id="concurrent-editing"></a>

If a colleague saves a new version while you are editing, clicking Save displays “○○ saved a new version at ○○. You are editing the content of v○” and offers two options:

* <mark style="color:blue;">Save My Content as a New Version Anyway</mark>: Keep your changes and save them as the latest version (your colleague's version remains in the version list).
* <mark style="color:blue;">Load Latest Version</mark>: Discard your current changes and continue editing from your colleague's latest version.

***

## Upload a New Version <a href="#upload-new-version" id="upload-new-version"></a>

For a file you have edited locally, use <mark style="color:blue;">Upload New Version</mark> in the file details to add it as a new version of the same file, keeping the file name and location. The uploaded file must use the **same format** as the original, with a limit of 10 MB per file. This supports text-based files as well as XLSX, DOCX, and PPTX. Like online editing, this feature must be enabled by your organization.

***

## Related Pages <a href="#related" id="related"></a>

* [Version History and Restore](https://docs.maiagent.ai/maiagent-user-guide/en/work/file-library/versions.md)
* [Let AI Edit and Organize Files](https://docs.maiagent.ai/maiagent-user-guide/en/work/file-library/ai-edit.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/maiagent-user-guide/en/work/file-library/online-editing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
