pub struct Props {
pub src: AttrValue,
pub onclick: Option<Callback<MarkdownMouseEvent, ()>>,
pub render_links: Option<Callback<LinkDescription<Html>, Html>>,
pub theme: Option<&'static str>,
pub wikilinks: bool,
pub hard_line_breaks: bool,
pub parse_options: Option<Options>,
pub components: CustomComponents,
pub frontmatter: Option<UseStateHandle<String>>,
pub send_debug_info: Option<Callback<Vec<String>>>,
}Fields§
§src: AttrValue§onclick: Option<Callback<MarkdownMouseEvent, ()>>§render_links: Option<Callback<LinkDescription<Html>, Html>>§theme: Option<&'static str>§wikilinks: bool§hard_line_breaks: bool§parse_options: Option<Options>§components: CustomComponents§frontmatter: Option<UseStateHandle<String>>§send_debug_info: Option<Callback<Vec<String>>>Trait Implementations§
Source§impl<'a> Context<'a, 'static> for &'a Props
impl<'a> Context<'a, 'static> for &'a Props
type View = VNode
type Handler<T: 'static> = Callback<T>
type MouseEvent = MouseEvent
Source§fn props(self) -> MarkdownProps
fn props(self) -> MarkdownProps
get all the properties from the context
Source§fn el_with_attributes(
self,
e: HtmlElement,
inside: Self::View,
attributes: ElementAttributes<Callback<MouseEvent>>,
) -> Self::View
fn el_with_attributes( self, e: HtmlElement, inside: Self::View, attributes: ElementAttributes<Callback<MouseEvent>>, ) -> Self::View
creates a html element
attributes contains the html attributes for this elementSource§fn el_span_with_inner_html(
self,
inner_html: String,
attributes: ElementAttributes<Callback<MouseEvent>>,
) -> Self::View
fn el_span_with_inner_html( self, inner_html: String, attributes: ElementAttributes<Callback<MouseEvent>>, ) -> Self::View
renders raw html, inside a span
Source§fn el_hr(
self,
attributes: ElementAttributes<Callback<MouseEvent>>,
) -> Self::View
fn el_hr( self, attributes: ElementAttributes<Callback<MouseEvent>>, ) -> Self::View
renders a
hr element, with attributesSource§fn el_fragment(self, children: Vec<Self::View>) -> Self::View
fn el_fragment(self, children: Vec<Self::View>) -> Self::View
takes a vector of views and return a view
Source§fn mount_dynamic_link(
self,
rel: &str,
href: &str,
integrity: &str,
crossorigin: &str,
)
fn mount_dynamic_link( self, rel: &str, href: &str, integrity: &str, crossorigin: &str, )
add a styleshit to the markdown component
fn el_input_checkbox( self, checked: bool, attributes: ElementAttributes<Callback<MouseEvent>>, ) -> Self::View
Source§fn call_handler<T: 'static>(callback: &Self::Handler<T>, input: T)
fn call_handler<T: 'static>(callback: &Self::Handler<T>, input: T)
calls a callback with the given input
Source§fn make_md_handler(
self,
position: Range<usize>,
stop_propagation: bool,
) -> Self::Handler<MouseEvent>
fn make_md_handler( self, position: Range<usize>, stop_propagation: bool, ) -> Self::Handler<MouseEvent>
creates a callback that will fire when the user clicks on markdown
fn has_custom_links(self) -> bool
fn render_links(self, link: LinkDescription<Html>) -> Result<Html, String>
Source§fn set_frontmatter(&mut self, frontmatter: String)
fn set_frontmatter(&mut self, frontmatter: String)
write the frontmatter (or metadata) string
present at the top of the markdown source
fn has_custom_component(self, name: &str) -> bool
fn render_custom_component( self, name: &str, input: MdComponentProps, ) -> Result<Self::View, ComponentCreationError>
Source§fn el(self, e: HtmlElement, inside: Self::View) -> Self::View
fn el(self, e: HtmlElement, inside: Self::View) -> Self::View
creates a html element, with default attributes
fn render_tasklist_marker(self, m: bool, position: Range<usize>) -> Self::View
fn render_rule(self, range: Range<usize>) -> Self::View
fn render_code(self, s: CowStr<'a>, range: Range<usize>) -> Self::View
fn render_text(self, s: CowStr<'a>, range: Range<usize>) -> Self::View
fn render_link( self, link: LinkDescription<Self::View>, ) -> Result<Self::View, String>
Source§impl Properties for Props
impl Properties for Props
impl StructuralPartialEq for Props
Auto Trait Implementations§
impl Freeze for Props
impl !RefUnwindSafe for Props
impl !Send for Props
impl !Sync for Props
impl Unpin for Props
impl !UnwindSafe for Props
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.