add markdown widget

This commit is contained in:
Piotr 2024-06-15 13:36:25 +02:00
parent 80b7049584
commit 433d64a254
9 changed files with 840 additions and 0 deletions

View file

@ -90,3 +90,11 @@ pub fn monotext<'a>(text: impl Into<Cow<'a, str>> + 'a) -> Text<'a, crate::Theme
.line_height(LineHeight::Absolute(20.0.into()))
.font(crate::font::FONT_MONO_REGULAR)
}
#[cfg(feature = "markdown")]
/// [`Markdown`] widget with md text parser
pub fn markdown(content: String) -> crate::widget::markdown::Markdown {
use crate::widget::markdown;
markdown::Markdown::new(content)
}