| Crates.io | egui_commonmark_macros |
| lib.rs | egui_commonmark_macros |
| version | 0.21.1 |
| created_at | 2024-05-11 09:06:29.233449+00 |
| updated_at | 2025-07-13 09:00:16.457+00 |
| description | Embed markdown directly into the binary as egui widgets |
| homepage | |
| repository | https://github.com/lampsitter/egui_commonmark |
| max_upload_size | |
| id | 1236748 |
| size | 72,388 |
This crate is egui_commonmark's compile time variant. It is recommended to use
this crate through egui_commonmark by enabling the macros feature.
In Cargo.toml:
egui_commonmark = "0.21"
# Specify what image formats you want to use
image = { version = "0.25", default-features = false, features = ["png"] }
use egui_commonmark::{CommonMarkCache, commonmark};
let mut cache = CommonMarkCache::default();
let _response = commonmark!(ui, &mut cache, "# ATX Heading Level 1");
Alternatively you can embed a file
use egui_commonmark::{CommonMarkCache, commonmark_str};
let mut cache = CommonMarkCache::default();
commonmark_str!(ui, &mut cache, "content.md");
Licensed under either of
at your option.