code
- class trame.widgets.code.Editor(completion=None, hover=None, **kwargs)
Bases:
AbstractElementMonaco Editor component
Properties:
- Parameters:
options
value
model_value
theme
language
textmate
completion – a callable
fn(code, line, column)returning a list of completion items, each a dict with keyslabel(required),kind,detail,documentation,insertText.lineis 1-based,column0-based. Registered as a trigger internally so the client can invoke it and receive the returned items (Monaco needs the result back).hover – a callable
fn(code, line, column)returning hover content: a markdown string, a list of markdown strings,{contents: [...]}, orNone. Registered as a trigger internally likecompletion.completion_trigger_characters – list of characters that open the completion list (defaults to
["."]in the component).
Events:
- Parameters:
input