Skip to main content

CodeEditor

Function CodeEditor 

Source
pub fn CodeEditor(_: CodeEditorProps) -> Element
Expand description

Syntax-highlighted code editor component.

§Props

For details, see the props struct definition.

  • value : String
  • on_change : EventHandler<String>
  • language : Language
  • placeholder : String
  • readonly : bool
  • language_server : bool

    Run the language’s service over the source — the LOGOS language server, or the Hardware specs’ own (hardware_spec): a VS Code-style hover for the word under a resting pointer, and squiggles under the problems it finds.

  • stylesheet : bool

    Inline CODE_EDITOR_STYLE ahead of the editor. A host that sets editors into its own markup places the stylesheet once, ahead of that markup, and turns this off.

  • status : Option<Signal<EditorStatus>>

    Where to tell a status bar where the caret is, what is selected, and how many problems the language service found.