---
title: Use the Code Editor
description: Use the Telegraf Controller Code Editor to upload, write, or edit raw Telegraf configuration TOML.
url: https://docs.influxdata.com/telegraf/controller/configs/ui/code-editor/
estimated_tokens: 3347
product: Telegraf
version: v1
---

# Use the Code Editor

#### Telegraf Controller is in Public Beta

Telegraf Controller is in public beta and will be part of the future Telegraf Enterprise offering. While in beta, Telegraf Controller is **not meant for production use**. The Telegraf Controller documentation is a work in progress, and we are actively working to improve it. If you have any questions or suggestions, please [submit an issue](https://github.com/influxdata/docs-v2/issues/new?labels=Telegraf%20Controller). We welcome any and all contributions.

Beta expectations

-   **No configuration or agent limits**  
    While in beta, Telegraf Controller doesn't place any limits on the number of configurations you can store or the number of Telegraf agents you can track. However, upon being generally available, the free distribution of Telegraf Controller will have limits introduced, with the option to increase limits through a Telegraf Enterprise license.
-   **Potential breaking changes**  
    While in beta, we will do our best to no longer make breaking changes to Telegraf Controller, however, they may be necessary. The majority of changes we make will be additive and non-breaking, and include any necessary migrations. When we do need to make breaking changes, we will do our best to communicate them clearly and in advance to minimize disruption.
-   **Flexible release schedule**  
    While in beta, we will continue to create new releases of Telegraf Controller, but likely at irregular intervals. We will provide [Telegraf Controller release notes](/telegraf/controller/reference/release-notes/) to make it easy to track updates.

Provide beta feedback

-   Use the **Feedback** feature in the Telegraf Controller UI.
-   [Join the InfluxDB Community Slack](https://influxdata.com/slack) and post feedback in the **#telegraf-enterprise-alpha** channel.
-   Post feedback in the [InfluxData Community](https://community.influxdata.com).

Join our public channels

-   [InfluxDB Community Slack *(Preferred)*](https://influxdata.com/slack)
-   [InfluxData Community](https://community.influxdata.com)
-   [InfluxDB Subreddit](https://reddit.com/r/influxdb)

Use the Telegraf Controller **Code Editor** to upload, write, or edit raw Telegraf configuration TOML.

![Telegraf Controller Code Editor](/img/telegraf/controller-code-editor.png)

The Code Editor is the default view when managing a configuration. If it is not displayed, click the **Code Editor** tab.

#### Switching from the Code Editor to the Telegraf Builder

Switching from the Code Editor to the Telegraf Builder will reformat the TOML. When reformatting, Telegraf Builder does **not** preserve the following:

-   Comments
-   Indentation
-   Plugin Order

## Upload TOML

To upload a Telegraf configuration file to Telegraf Controller, click **Upload files** to open a file selection dialogue box or drag and drop your configuration file into the Code Editor.

Telegraf Controller supports TOML-formatted files with the following extensions:

-   `.toml`
-   `.conf`
-   `.txt`

Uploaded configuration files fully replace any existing configuration TOML.

## Manually write or edit TOML

The Code Editor is a feature-rich, browser-based editor that lets you write code using keyboard shortcuts similar to those in popular editors and IDEs.

### Keymaps

The Code Editor uses CodeMirror’s default keymaps. The following bindings come from the reference keymaps.

-   `ArrowLeft`: Move left one character (Shift selects)
-   `ArrowRight`: Move right one character (Shift selects)
-   `ArrowUp`: Move up one line (Shift selects)
-   `ArrowDown`: Move down one line (Shift selects)
-   `Ctrl+ArrowLeft`: Move left by word group (Shift selects)
-   `Ctrl+ArrowRight`: Move right by word group (Shift selects)
-   `Alt+ArrowLeft`: Move left by syntax unit (Shift selects)
-   `Alt+ArrowRight`: Move right by syntax unit (Shift selects)
-   `⌘←` (macOS only): Move to line start (Shift selects)
-   `⌘→` (macOS only): Move to line end (Shift selects)
-   `Alt+ArrowUp`: Move line up
-   `Alt+ArrowDown`: Move line down
-   `Shift+Alt+ArrowUp`: Copy line up
-   `Shift+Alt+ArrowDown`: Copy line down
-   `Ctrl+Alt+ArrowUp`: Add cursor above
-   `Ctrl+Alt+ArrowDown`: Add cursor below
-   `⌘↑` (macOS only) or `Ctrl+Home`: Move to document start (Shift selects)
-   `⌘↓` (macOS only) or `Ctrl+End`: Move to document end (Shift selects)
-   `⌃↑` (macOS only) or `PageUp`: Page up (Shift selects)
-   `⌃↓` (macOS only) or `PageDown`: Page down (Shift selects)
-   `Home`: Move to line boundary backward (Shift selects)
-   `End`: Move to line boundary forward (Shift selects)
-   `Enter` and `Shift+Enter`: Insert newline and indent
-   `Ctrl+Enter`: Insert blank line
-   `Ctrl+A`: Select all
-   `Alt+L`: Select line
-   `Ctrl+I`: Select parent syntax
-   `Esc`: Simplify selection
-   `Ctrl+[`: Indent less
-   `Ctrl+]`: Indent more
-   `Shift+Ctrl+K`: Delete line
-   `Shift+Ctrl+&bsol;`: Jump to matching bracket
-   `Ctrl+/`: Toggle line comment
-   `Shift+Alt+A`: Toggle block comment
-   `Backspace`: Delete character backward
-   `Delete`: Delete character forward
-   `Ctrl+Backspace`: Delete word group backward
-   `Ctrl+Delete`: Delete word group forward
-   `⌘⌫` (macOS only): Delete to line start
-   `⌘ fn⌫` (macOS only): Delete to line end

### Dynamic value syntax highlighting

The Telegraf Controller Code Editor automatically applies special syntax highlighting to dynamic values (parameters, environment variables, and secrets) in your configuration TOML to make them more visible.

For more information about using dynamic values, see [Use dynamic values](/telegraf/controller/configs/dynamic-values/).

#### Related

-   [Use dynamic values in configurations](/telegraf/controller/configs/dynamic-values/)
