pub struct MarkdownViewer { /* private fields */ }Available on crate feature
markdown only.Expand description
Markdown viewer component.
Renders markdown content with support for:
- Headings (h1-h6)
- Paragraphs
- Bold, italic, and strikethrough text
- Code (inline and blocks)
- Lists (ordered and unordered)
- Tables
- Images
- Blockquotes
- Horizontal rules
§Example
fn app() -> impl IntoElement {
MarkdownViewer::new("# Hello World\n\nThis is **bold** and *italic* text.")
}Implementations§
Trait Implementations§
Source§impl Component for MarkdownViewer
impl Component for MarkdownViewer
fn render(&self) -> impl IntoElement
fn render_key(&self) -> DiffKey
Source§impl ContainerExt for MarkdownViewer
impl ContainerExt for MarkdownViewer
fn position(self, position: impl Into<Position>) -> Self
fn padding(self, padding: impl Into<Gaps>) -> Self
fn margin(self, margin: impl Into<Gaps>) -> Self
fn min_width(self, minimum_width: impl Into<Size>) -> Self
fn min_height(self, minimum_height: impl Into<Size>) -> Self
fn max_width(self, maximum_width: impl Into<Size>) -> Self
fn max_height(self, maximum_height: impl Into<Size>) -> Self
fn visible_width(self, visible_width: impl Into<VisibleSize>) -> Self
fn visible_height(self, visible_height: impl Into<VisibleSize>) -> Self
Source§impl KeyExt for MarkdownViewer
impl KeyExt for MarkdownViewer
Source§impl LayoutExt for MarkdownViewer
impl LayoutExt for MarkdownViewer
fn get_layout(&mut self) -> &mut LayoutData
fn layout(self, layout: LayoutData) -> Self
Source§impl MarkdownViewerThemePartialExt for MarkdownViewer
impl MarkdownViewerThemePartialExt for MarkdownViewer
fn color(self, color: impl Into<Color>) -> MarkdownViewer
fn background_code(self, background_code: impl Into<Color>) -> MarkdownViewer
fn color_code(self, color_code: impl Into<Color>) -> MarkdownViewer
fn background_blockquote( self, background_blockquote: impl Into<Color>, ) -> MarkdownViewer
fn border_blockquote( self, border_blockquote: impl Into<Color>, ) -> MarkdownViewer
fn background_divider( self, background_divider: impl Into<Color>, ) -> MarkdownViewer
fn heading_h1(self, heading_h1: impl Into<f32>) -> MarkdownViewer
fn heading_h2(self, heading_h2: impl Into<f32>) -> MarkdownViewer
fn heading_h3(self, heading_h3: impl Into<f32>) -> MarkdownViewer
fn heading_h4(self, heading_h4: impl Into<f32>) -> MarkdownViewer
fn heading_h5(self, heading_h5: impl Into<f32>) -> MarkdownViewer
fn heading_h6(self, heading_h6: impl Into<f32>) -> MarkdownViewer
fn paragraph_size(self, paragraph_size: impl Into<f32>) -> MarkdownViewer
fn code_font_size(self, code_font_size: impl Into<f32>) -> MarkdownViewer
fn table_font_size(self, table_font_size: impl Into<f32>) -> MarkdownViewer
Source§impl PartialEq for MarkdownViewer
impl PartialEq for MarkdownViewer
impl StructuralPartialEq for MarkdownViewer
Auto Trait Implementations§
impl Freeze for MarkdownViewer
impl !RefUnwindSafe for MarkdownViewer
impl Send for MarkdownViewer
impl Sync for MarkdownViewer
impl Unpin for MarkdownViewer
impl !UnwindSafe for MarkdownViewer
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> ComponentKey for Twhere
T: Component,
impl<T> ComponentKey for Twhere
T: Component,
fn default_key(&self) -> DiffKey
Source§impl<T> ComponentProps for T
impl<T> ComponentProps for T
fn changed(&self, other: &(dyn ComponentProps + 'static)) -> bool
Source§impl<T> ContainerSizeExt for Twhere
T: ContainerExt,
impl<T> ContainerSizeExt for Twhere
T: ContainerExt,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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