# open_in_editor

> **Function** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/editor/open_in_editor)

Open current_text in an external editor.

Creates a temp .md file, launches the editor, and reads back the result.

## Signature

```python
open_in_editor(
    current_text: str,
) -> str | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `current_text` | `str` | Yes | The text to pre-populate in the editor. |

## Returns

`str | None`

The edited text with normalized line endings, or `None` if the editor
exited with a non-zero status, was not found, or the result was
empty/whitespace-only.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/64ecf141be0479f859f4efe25d139166b45ee18c/libs/cli/deepagents_cli/editor.py#L73)