Skip to main content

Module code_editor

Module code_editor 

Source
Expand description

Syntax-highlighted code editor component.

Provides a textarea with real-time syntax highlighting overlay. Uses a transparent textarea layered over a highlighted pre element for editing.

§Components

  • CodeEditor - Editable code editor with syntax highlighting
  • CodeView - Read-only syntax highlighted display

§Languages

  • Logos: Imperative .logos files (zones, parallel, etc.)
  • Vernacular: Math/theorem mode (Definition, Check, Eval)
  • Rust: Generated Rust output

§Props (CodeEditor)

  • value - Current code content
  • on_change - Callback when content changes
  • language - Syntax highlighting mode
  • placeholder - Optional placeholder text
  • readonly - Whether editing is disabled

Re-exports§

pub use CodeEditor_completions::Component::CodeEditor;
pub use CodeView_completions::Component::CodeView;

Structs§

CodeEditorProps
Properties for the CodeEditor component.
CodeViewProps
Properties for the CodeView component.

Enums§

Language
Language mode for syntax highlighting.

Functions§

CodeEditor
Syntax-highlighted code editor component.
CodeView
Read-only syntax-highlighted code view.