pub struct CodeEditorProps {Show 14 fields
pub id: Option<FocusId>,
pub value: Bindable<String>,
pub default_value: Option<String>,
pub on_value_change: Option<Rc<dyn Fn(String)>>,
pub placeholder: String,
pub language: Option<String>,
pub theme: Option<String>,
pub show_line_numbers: bool,
pub width: Dimension,
pub height: Dimension,
pub title: Option<String>,
pub tab_size: usize,
pub autofocus: bool,
pub cursor_style: CursorStyle,
}Fields§
§id: Option<FocusId>§value: Bindable<String>The code. Pass it to control the editor yourself: edits then only
call on_value_change, and the code resets unless you pass the new
value back.
Code shared with the parent, updated on every edit. Pass it as
bind:value={state}.
default_value: Option<String>The code it starts with when nothing else decides.
on_value_change: Option<Rc<dyn Fn(String)>>§placeholder: String§language: Option<String>§theme: Option<String>§show_line_numbers: bool§width: Dimension§height: Dimension§title: Option<String>§tab_size: usize§autofocus: bool§cursor_style: CursorStyleImplementations§
Source§impl CodeEditorProps
impl CodeEditorProps
pub fn builder() -> CodeEditorPropsBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for CodeEditorProps
impl !Send for CodeEditorProps
impl !Sync for CodeEditorProps
impl !UnwindSafe for CodeEditorProps
impl Forget for CodeEditorProps
impl Freeze for CodeEditorProps
impl Move for CodeEditorProps
impl Unpin for CodeEditorProps
impl UnsafeUnpin for CodeEditorProps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more