> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mainly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CodeEditor

> The CodeEditor control provides a code input field with syntax highlighting.

```
CodeEditor(placeholder="", max_len=16000, rows=4, language="python")
```

# Example

```python theme={null}
from mirmod.controls import CodeEditor

@wob.receiver("value", "code", control=CodeEditor(placeholder="Enter your code here...", rows=10, language="python"))
def receive_code(self, code):
	self.code = code
```

# Parameters

| Name        | Type   | Description                                                     |
| ----------- | ------ | --------------------------------------------------------------- |
| placeholder | string | Placeholder text shown when the editor is empty. Default empty. |
| max\_len    | int    | Maximum character length allowed. Default 16000.                |
| rows        | int    | Number of visible rows in the editor. Default 4.                |
| language    | string | Syntax highlighting language. Default "python".                 |
