Code Engine

Attribute Type Documentation Default Value
id :any

HTML id attribute

name :any

HTML name attribute for form submission

value :any

initial editor content

field %FormField{}

a form field struct retrieved from the form, sets id/name/value automatically

language :string

syntax highlighting language (e.g. javascript, typescript, elixir, python, rust, go, html, css, json, sql, yaml, markdown)

readonly :boolean

makes the editor read-only

false
theme :string

editor color theme

wrap :boolean

enable line wrapping

false
show_topbar :boolean

show topbar with copy button and title

false
show_bottombar :boolean

show bottombar

false
title :string

title shown in topbar (e.g. filename)

class :any

additional CSS classes

rest :global
topbar :slot

custom topbar content (replaces default)

Show slot attributes Hide slot attributes
class :any

wrapper CSS classes

bottombar :slot

custom bottombar content (replaces default)

Show slot attributes Hide slot attributes
class :any

wrapper CSS classes