pub struct MarkdownInputProps {Show 13 fields
pub name: String,
pub value: Signal<FieldValue>,
pub _on_change: Callback<FieldValue>,
pub placeholder: Option<String>,
pub required: Option<bool>,
pub disabled: Option<bool>,
pub class: Option<String>,
pub error: Option<String>,
pub has_error: Option<bool>,
pub show_preview: Option<bool>,
pub show_toolbar: Option<bool>,
pub min_height: Option<u32>,
pub max_height: Option<u32>,
}Expand description
Props for the MarkdownInput component.
Markdown input component with live preview
ยงRequired Props
- name:
impl Into<String>- Field name for the input
- value:
impl Into<Signal<FieldValue>>- Current value of the field
- _on_change:
impl Into<Callback<FieldValue>>- Callback when the value changes
ยงOptional Props
- placeholder:
impl Into<String>- Placeholder text
- required:
bool- Whether the field is required
- disabled:
bool- Whether the field is disabled
- class:
impl Into<String>- CSS classes
- error:
impl Into<String>- Error message to display
- has_error:
bool- Whether the field has an error
- show_preview:
bool- Whether to show preview
- show_toolbar:
bool- Whether to show toolbar
- min_height:
u32- Minimum height in pixels
- max_height:
u32- Maximum height in pixels
Fieldsยง
ยงname: StringField name for the input
value: Signal<FieldValue>Current value of the field
_on_change: Callback<FieldValue>Callback when the value changes
placeholder: Option<String>Placeholder text
required: Option<bool>Whether the field is required
disabled: Option<bool>Whether the field is disabled
class: Option<String>CSS classes
error: Option<String>Error message to display
has_error: Option<bool>Whether the field has an error
show_preview: Option<bool>Whether to show preview
show_toolbar: Option<bool>Whether to show toolbar
min_height: Option<u32>Minimum height in pixels
max_height: Option<u32>Maximum height in pixels
Implementationsยง
Sourceยงimpl MarkdownInputProps
impl MarkdownInputProps
Sourcepub fn builder() -> MarkdownInputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> MarkdownInputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building MarkdownInputProps.
On the builder, call .name(...), .value(...), ._on_change(...), .placeholder(...)(optional), .required(...)(optional), .disabled(...)(optional), .class(...)(optional), .error(...)(optional), .has_error(...)(optional), .show_preview(...)(optional), .show_toolbar(...)(optional), .min_height(...)(optional), .max_height(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of MarkdownInputProps.
Trait Implementationsยง
Auto Trait Implementationsยง
impl Freeze for MarkdownInputProps
impl RefUnwindSafe for MarkdownInputProps
impl Send for MarkdownInputProps
impl Sync for MarkdownInputProps
impl Unpin for MarkdownInputProps
impl UnsafeUnpin for MarkdownInputProps
impl UnwindSafe for MarkdownInputProps
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
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more