Expand description
A commonmark viewer for egui
§Example
let markdown =
r"# Hello world
* A list
* [ ] Checkbox
";
let mut cache = CommonMarkCache::default();
CommonMarkViewer::new().show(ui, &mut cache, markdown);
Remember to opt into the image formats you want to use!
image = { version = "0.25", default-features = false, features = ["png"] }§FAQ
§URL is not displayed when hovering over a link
By default egui does not show urls when you hover hyperlinks. To enable it, you can do the following before calling any ui related functions:
ui.style_mut().url_in_tooltip = true;This maintained fork supports runtime Markdown parsing. Upstream compile-time Markdown macros are not included.
§Features
No documented features in Cargo.toml
Re-exports§
pub use egui_commonmark_backend::syntect;
Structs§
- Alert
- Alert
Bundle - Common
Mark Cache - A cache used for storing content such as images.
- Common
Mark Viewer
Type Aliases§
- Render
Html Fn - Takes
egui::Uiand the html text to be rendered/used - Render
Math Fn - Takes
egui::Ui, the math text to be rendered and whether it is inline