{"id":13546931,"url":"https://github.com/lampsitter/egui_commonmark","last_synced_at":"2025-04-02T19:32:06.581Z","repository":{"id":53817564,"uuid":"457315126","full_name":"lampsitter/egui_commonmark","owner":"lampsitter","description":"Markdown viewer for egui","archived":false,"fork":false,"pushed_at":"2025-03-12T16:53:44.000Z","size":746,"stargazers_count":110,"open_issues_count":4,"forks_count":20,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T17:39:23.165Z","etag":null,"topics":["commonmark","egui","markdown","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lampsitter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-09T10:40:59.000Z","updated_at":"2025-03-12T16:53:48.000Z","dependencies_parsed_at":"2023-11-07T18:45:01.214Z","dependency_job_id":"9c288b3c-4ba4-4dc3-91ae-da47ce653569","html_url":"https://github.com/lampsitter/egui_commonmark","commit_stats":{"total_commits":96,"total_committers":3,"mean_commits":32.0,"dds":0.0625,"last_synced_commit":"ac971072a12c0fee83c487aed1e464045d290461"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lampsitter%2Fegui_commonmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lampsitter%2Fegui_commonmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lampsitter%2Fegui_commonmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lampsitter%2Fegui_commonmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lampsitter","download_url":"https://codeload.github.com/lampsitter/egui_commonmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246880122,"owners_count":20848816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commonmark","egui","markdown","rust"],"created_at":"2024-08-01T12:00:48.218Z","updated_at":"2025-04-02T19:32:06.574Z","avatar_url":"https://github.com/lampsitter.png","language":"Rust","funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"# A commonmark viewer for [egui](https://github.com/emilk/egui)\n\n[![Crate](https://img.shields.io/crates/v/egui_commonmark.svg)](https://crates.io/crates/egui_commonmark)\n[![Documentation](https://docs.rs/egui_commonmark/badge.svg)](https://docs.rs/egui_commonmark)\n\n\u003cimg src=\"https://raw.githubusercontent.com/lampsitter/egui_commonmark/master/assets/example-v4.png\" alt=\"showcase\" width=280/\u003e\n\nWhile this crate's main focus is commonmark, it also supports a subset of\nGithub's markdown syntax: tables, strikethrough, tasklists and footnotes.\n\n## Usage\n\nIn Cargo.toml:\n\n```toml\negui_commonmark = \"0.20\"\n# Specify what image formats you want to use\nimage = { version = \"0.25\", default-features = false, features = [\"png\"] }\n```\n\n```rust\nuse egui_commonmark::*;\nlet markdown =\nr\"# Hello world\n\n* A list\n* [ ] Checkbox\n\";\n\nlet mut cache = CommonMarkCache::default();\nCommonMarkViewer::new().show(ui, \u0026mut cache, markdown);\n```\n\n\n## Compile time evaluation of markdown\n\nIf you want to embed markdown directly the binary then you can enable the `macros` feature.\nThis will do the parsing of the markdown at compile time and output egui widgets.\n\n### Example\n\n```rust\nuse egui_commonmark::{CommonMarkCache, commonmark};\nlet mut cache = CommonMarkCache::default();\nlet _response = commonmark!(ui, \u0026mut cache, \"# ATX Heading Level 1\");\n```\n\nAlternatively you can embed a file\n\n### Example\n\n```rust\nuse egui_commonmark::{CommonMarkCache, commonmark_str};\nlet mut cache = CommonMarkCache::default();\ncommonmark_str!(ui, \u0026mut cache, \"content.md\");\n```\n\n\n## Features\n\n* `macros`: macros for compile time parsing of markdown\n* `better_syntax_highlighting`: Syntax highlighting inside code blocks with\n  [`syntect`](https://crates.io/crates/syntect)\n* `svg`: Support for viewing svg images\n* `fetch`: Images with urls will be downloaded and displayed\n\n\n## Examples\n\nFor an easy intro check out the `hello_world` example. To see all the different\nfeatures egui_commonmark has to offer check out the `book` example.\n\n## FAQ\n\n### URL is not displayed when hovering over a link\n\nBy default egui does not show urls when you hover hyperlinks. To enable it,\nyou can do the following before calling any ui related functions:\n\n```rust\nui.style_mut().url_in_tooltip = true;\n```\n\n## MSRV Policy\n\nThis crate uses the same MSRV as the latest released egui version.\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flampsitter%2Fegui_commonmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flampsitter%2Fegui_commonmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flampsitter%2Fegui_commonmark/lists"}