Crate egui_commonmark

source ·
Expand description

A commonmark viewer for egui

§Example

let markdown =
r"# Hello world

* A list
* [ ] Checkbox
";
// Stores image handles between each frame
let mut cache = CommonMarkCache::default();
CommonMarkViewer::new("viewer").show(ui, &mut cache, markdown);

Remember to opt into the image formats you want to use!

image = { version = "0.24", default-features = false, features = ["png"] }

§Features

  • better_syntax_highlighting — Syntax highlighting for code blocks using syntect
  • load-images (enabled by default) — Enable loading of images. Make sure to also opt in to what image format you need through the image crate.
  • svg — Support loading svg images
  • fetch — Images with urls will be downloaded and displayed

Structs§