#common-mark

macro egui_commonmark_macros

Embed markdown directly into the binary as egui widgets

4 releases (2 breaking)

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

#805 in GUI

Download history 152/week @ 2024-06-28 84/week @ 2024-07-05 36/week @ 2024-07-12 16/week @ 2024-07-19 18/week @ 2024-07-26 22/week @ 2024-08-02 53/week @ 2024-08-09 78/week @ 2024-08-16 84/week @ 2024-08-23 52/week @ 2024-08-30 53/week @ 2024-09-06 117/week @ 2024-09-13 192/week @ 2024-09-20 207/week @ 2024-09-27 157/week @ 2024-10-04 108/week @ 2024-10-11

674 downloads per month
Used in 2 crates (via egui_commonmark)

MIT/Apache

82KB
1.5K SLoC

A commonmark viewer for egui

Crate Documentation

showcase

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.18"
# 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

at your option.

Dependencies

~7–12MB
~154K SLoC