# Editor

**Help URL:** `/forms/editor`

## Purpose

View and edit text files stored in the current project repository (for example test files under `Tests/`).

## Common Tasks

* Open an existing repository file (commonly a `.js` Playwright test) and edit it.
* Save changes back to GitHub.
* Revert unsaved changes to the last loaded/saved content.
* Create a new file when content is provided (for example, from the Playwright recorder flow).

## Key UI Elements

* Editor surface: Displays the current file content.
* Save: Writes the current editor text back to the repository file (prompts for a file name when creating a new file).
* Revert: Restores the editor text to the last loaded/saved content.
* Close: Exits without saving.

## Notes

* Saving commits directly to the repository via the GitHub API (you’ll be asked to confirm before saving).
* When initialized with new content, TestVibe can ask AI for a suggested filename and use it as the editor title.
* Common entry points: open code from [Test](/reference/forms/test.md), or review generated/recorded files after using [Recorder (Playwright)](/reference/forms/recorder-help.md).


---

# 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.testvibe.com/reference/forms/editor.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.
