gorbie-commonmark-macros 0.22.1

Embed markdown directly into the binary as egui widgets
Documentation

A commonmark viewer for egui

Crate Documentation

This crate is gorbie_commonmark's compile time variant. It is recommended to use this crate through gorbie_commonmark by enabling the macros feature.

Usage

In Cargo.toml:

gorbie-commonmark = "0.22.1"
# Specify what image formats you want to use
image = { version = "0.25", default-features = false, features = ["png"] }

Example

use gorbie_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 gorbie_commonmark::{CommonMarkCache, commonmark_str};
let mut cache = CommonMarkCache::default();
commonmark_str!(ui, &mut cache, "content.md");

License

Licensed under either of

at your option.