Skip to main content

Crate egui_commonmark

Crate egui_commonmark 

Source
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

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
AlertBundle
CommonMarkCache
A cache used for storing content such as images.
CommonMarkViewer

Type Aliases§

RenderHtmlFn
Takes egui::Ui and the html text to be rendered/used
RenderMathFn
Takes egui::Ui, the math text to be rendered and whether it is inline