Is there a way to have a textarea as a code editor that keep the code formatting?
If you use three backticks before and after your code blocks, it will keep the formatting…
For fields that only contain code, check out the
monospace property: https://getkirby.com/docs/reference/panel/fields/textarea#monospace
If you add language highlighting, you can pass the language after the opening backticks…
```php /// some code ```