pub struct MarkdownConfig {Show 24 fields
pub h1_size: f32,
pub h2_size: f32,
pub h3_size: f32,
pub h4_size: f32,
pub h5_size: f32,
pub h6_size: f32,
pub body_size: f32,
pub code_size: f32,
pub text_color: Color,
pub text_secondary: Color,
pub link_color: Color,
pub code_bg: Color,
pub code_text: Color,
pub blockquote_border: Color,
pub blockquote_bg: Color,
pub hr_color: Color,
pub paragraph_spacing: f32,
pub heading_spacing: f32,
pub list_indent: f32,
pub list_item_spacing: f32,
pub blockquote_padding: f32,
pub code_padding: f32,
pub list_marker_width: f32,
pub list_marker_gap: f32,
}Expand description
Configuration for markdown rendering
Fields§
§h1_size: f32H1 heading size
h2_size: f32H2 heading size
h3_size: f32H3 heading size
h4_size: f32H4 heading size
h5_size: f32H5 heading size
h6_size: f32H6 heading size
body_size: f32Body text size
code_size: f32Code text size
text_color: ColorPrimary text color
text_secondary: ColorSecondary text color (for muted content)
link_color: ColorLink text color
code_bg: ColorCode background color
code_text: ColorCode text color
blockquote_border: ColorBlockquote border color
blockquote_bg: ColorBlockquote background color
hr_color: ColorHorizontal rule color
paragraph_spacing: f32Spacing between paragraphs
heading_spacing: f32Spacing after headings
list_indent: f32List item indent
list_item_spacing: f32List item spacing
blockquote_padding: f32Blockquote padding
code_padding: f32Code block padding
list_marker_width: f32List marker width (space reserved for bullet/number)
list_marker_gap: f32List marker gap (space between marker and content)
Implementations§
Source§impl MarkdownConfig
impl MarkdownConfig
Sourcepub fn new() -> MarkdownConfig
pub fn new() -> MarkdownConfig
Create a new config with theme defaults
Sourcepub fn light() -> MarkdownConfig
pub fn light() -> MarkdownConfig
Create a light theme config suitable for white backgrounds Uses the global ThemeState for colors
Sourcepub fn body_size(self, size: f32) -> MarkdownConfig
pub fn body_size(self, size: f32) -> MarkdownConfig
Set the body text size
Sourcepub fn link_color(self, color: Color) -> MarkdownConfig
pub fn link_color(self, color: Color) -> MarkdownConfig
Set the link color
Sourcepub fn text_color(self, color: Color) -> MarkdownConfig
pub fn text_color(self, color: Color) -> MarkdownConfig
Set the text color
Sourcepub fn paragraph_spacing(self, spacing: f32) -> MarkdownConfig
pub fn paragraph_spacing(self, spacing: f32) -> MarkdownConfig
Set paragraph spacing
Sourcepub fn blockquote_bg(self, color: Color) -> MarkdownConfig
pub fn blockquote_bg(self, color: Color) -> MarkdownConfig
Set blockquote background color
Sourcepub fn blockquote_border(self, color: Color) -> MarkdownConfig
pub fn blockquote_border(self, color: Color) -> MarkdownConfig
Set blockquote border color
Trait Implementations§
Source§impl Clone for MarkdownConfig
impl Clone for MarkdownConfig
Source§fn clone(&self) -> MarkdownConfig
fn clone(&self) -> MarkdownConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MarkdownConfig
impl Debug for MarkdownConfig
Source§impl Default for MarkdownConfig
impl Default for MarkdownConfig
Source§fn default() -> MarkdownConfig
fn default() -> MarkdownConfig
Auto Trait Implementations§
impl Freeze for MarkdownConfig
impl RefUnwindSafe for MarkdownConfig
impl Send for MarkdownConfig
impl Sync for MarkdownConfig
impl Unpin for MarkdownConfig
impl UnsafeUnpin for MarkdownConfig
impl UnwindSafe for MarkdownConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.