5 releases (3 breaking)
new 0.19.0 | Dec 17, 2024 |
---|---|
0.18.0 | Sep 26, 2024 |
0.17.0 | Jul 3, 2024 |
0.16.0 | May 12, 2024 |
0.16.0-alpha.1 | May 11, 2024 |
#969 in GUI
392 downloads per month
Used in 2 crates
(via egui_commonmark)
86KB
2K
SLoC
A commonmark viewer for egui
This crate is egui_commonmark
's compile time variant. It is recommended to use
this crate through egui_commonmark
by enabling the macros
feature.
Usage
In Cargo.toml:
egui_commonmark = "0.19"
# Specify what image formats you want to use
image = { version = "0.25", default-features = false, features = ["png"] }
Example
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
Example
use egui_commonmark::{CommonMarkCache, commonmark_str};
let mut cache = CommonMarkCache::default();
commonmark_str!(ui, &mut cache, "content.md");
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Dependencies
~7–12MB
~153K SLoC