Introduce markdown::Settings
This commit is contained in:
parent
f830454ffa
commit
65b525af7f
4 changed files with 151 additions and 42 deletions
|
|
@ -161,6 +161,15 @@ where
|
|||
self
|
||||
}
|
||||
|
||||
/// Sets the message handler for link clicks on the [`Rich`] text.
|
||||
pub fn on_link_maybe(
|
||||
mut self,
|
||||
on_link: Option<impl Fn(Link) -> Message + 'a>,
|
||||
) -> Self {
|
||||
self.on_link = on_link.map(|on_link| Box::new(on_link) as _);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the default style class of the [`Rich`] text.
|
||||
#[cfg(feature = "advanced")]
|
||||
#[must_use]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue