Code editor
Monospace intentions — JSON payloads, snippets, config that shouldn’t look like prose.
Standalone
Section titled “Standalone”from almasix.orbit.forms import Form, CodeEditor
form = Form.make("demo").schema([ CodeEditor.make("payload").label("JSON").rows(10)])In a Resource
Section titled “In a Resource”from almasix.orbit import Resourcefrom almasix.orbit.forms import Form, CodeEditor
class PostResource(Resource): @classmethod def form(cls, form: Form) -> Form: return form.schema([ CodeEditor.make("script").rows(16), CodeEditor.make("config").helper_text("YAML or JSON"), ])Key methods
Section titled “Key methods”Inherits TextareaAddsor-editor or-editor-code``.rows(n) / .required() / .readonly().default("{}")
Closures work on .label(), .helper_text(), .placeholder(), .visible(), .disabled(), and .required() — see Form closures.
Preview
Section titled “Preview”
