Skip to main content

Module inline_editor

Module inline_editor 

Source
Expand description

The Studio’s editor set into a page of prose: the Syntax Guide’s examples, exercises and quoted snippets.

It is CodeEditor with the language server on — the same highlighting, hovers and squiggles — sized to the code it holds instead of filling a panel: the highlight layer sits in the page’s flow and gives the editor its height, and the text area lies exactly over it and never scrolls, so the editor grows line by line as the reader types. A page holds hundreds of them, so each is analysed once it first comes on screen, as VS Code analyses the files it has open rather than every file in the folder.

The editor carries no stylesheet of its own: its host places InlineEditorStyle once, ahead of the host’s markup, so a block’s CSS always comes before what it styles.

Re-exports§

pub use InlineEditorStyle_completions::Component::InlineEditorStyle;
pub use InlineEditor_completions::Component::InlineEditor;

Structs§

InlineEditorProps
Properties for the InlineEditor component.

Functions§

InlineEditor
Props
InlineEditorStyle
The stylesheets an inline editor is drawn with: the editor’s own, and its fit to its code.