pub struct TuiEditorProps {
pub id: SharedString,
pub height: SharedString,
pub min_height: SharedString,
pub initial_value: SharedString,
pub edit_type: SharedString,
pub preview_style: SharedString,
pub theme: SharedString,
pub locale: SharedString,
pub on_change: Option<EventHandler<String>>,
}
Expand description
The TuiEditor
properties struct for the configuration of the component.
Fields§
§id: SharedString
The editor ID.
height: SharedString
The height of the container.
min_height: SharedString
The min-height of the container.
initial_value: SharedString
The initial value of Markdown string.
edit_type: SharedString
The initial type to show: markdown
| wysiwyg
.
preview_style: SharedString
The preview style of Markdown mode: tab
| vertical
.
theme: SharedString
The theme: light
| dark
.
locale: SharedString
The i18n locale.
on_change: Option<EventHandler<String>>
An event handler to be called when the input value is changed.
Implementations§
Source§impl TuiEditorProps
impl TuiEditorProps
Sourcepub fn builder() -> TuiEditorPropsBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> TuiEditorPropsBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building TuiEditorProps
.
On the builder, call .id(...)
(optional), .height(...)
(optional), .min_height(...)
(optional), .initial_value(...)
, .edit_type(...)
(optional), .preview_style(...)
(optional), .theme(...)
(optional), .locale(...)
(optional), .on_change(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of TuiEditorProps
.
Trait Implementations§
Source§impl Clone for TuiEditorProps
impl Clone for TuiEditorProps
Source§fn clone(&self) -> TuiEditorProps
fn clone(&self) -> TuiEditorProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more