> For the complete documentation index, see [llms.txt](https://docs.labii.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.labii.com/widgets/section-widgets/office/text/code-editor.md).

# Code Editor

## Specs

| Label                     | Value                         |
| ------------------------- | ----------------------------- |
| **Version**               | 1.0.0 (updated on 2024-01-04) |
| **Developer**             | Labii Inc.                    |
| **Type**                  | Section                       |
| **Support Configuration** | No                            |

## Overview

The Code Editor widget serves as a versatile interface for developers to create and modify code. It provides a comprehensive set of tools and functionalities to streamline the coding process and make it more efficient. Whether working on a small script or a large project, the Code Editor widget ensures a smooth and hassle-free coding experience.

## Use cases

* Writing and editing code: The Code Editor widget allows developers to write and edit code directly within the interface. It supports a wide range of programming languages and provides useful features like syntax highlighting and code completion, making it easier to spot errors and write clean code.

## Settings

The Code Editor widget does not require any specific settings.

## Interface

The interface of the Code Editor widget is designed to provide developers with a clean and intuitive working environment. It offers a text editor with line numbers, enabling easy navigation within the code. The interface also provides options to switch between different programming languages and code schemas, ensuring flexibility and compatibility.

<figure><img src="/files/fV5iGzU5bJfu18MwGmZU" alt=""><figcaption></figcaption></figure>

It can be customized based on individual preferences or project requirements. Some optional settings that can be configured include:

* Language selection: Developers can choose the programming language they want to work with, and the Code Editor widget will adapt its syntax highlighting and code completion features accordingly.
* Schema selection: The Code Editor widget supports different code schemas, allowing developers to work with specific frameworks or libraries.

## Supported languages

* html
* javascript
* json
* markdown
* mysql
* perl
* python
* r
* shell
* typescript

## AI Assistant

The Code Editor widget includes an AI Assistant feature that helps developers generate, modify, or debug code using natural language prompts. This powerful tool can accelerate development and assist with coding tasks across all supported languages.

<figure><img src="/files/TpYBbjmXkLD7um0GpoGT" alt=""><figcaption></figcaption></figure>

**To use the AI Assistant:**

1. Click the **AI Assistant** button in the editor
2. Input your prompt describing the code you want to generate or modify
3. Click the **Replace** button to update the editor with AI-generated code


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.labii.com/widgets/section-widgets/office/text/code-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.
