#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

#860 in GUI

Download history 24/week @ 2024-07-29 20/week @ 2024-08-05 57/week @ 2024-08-12 88/week @ 2024-08-19 90/week @ 2024-08-26 38/week @ 2024-09-02 56/week @ 2024-09-09 145/week @ 2024-09-16 209/week @ 2024-09-23 175/week @ 2024-09-30 166/week @ 2024-10-07 113/week @ 2024-10-14 56/week @ 2024-10-21 70/week @ 2024-10-28 81/week @ 2024-11-04

323 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
~153K SLoC