🧊 Frostmark
An HTML + Markdown viewer for iced
Render rich text in your iced app at lightning-fast speeds using plain HTML or Markdown!

Usage
- Create a [
MarkState] and store it in your application state.
use MarkState;
let text = "Hello from **markdown** and <b>HTML</b>!";
let state = with_html_and_markdown;
// or if you just want HTML
let state = with_html;
// put this in your App struct
- In your
viewfunction use a [MarkWidget].
iced::widget::container( // just an example
MarkWidget::new(&self.mark_state)
)
.padding(10)
You can find runnable examples here
use ;
use ;
const YOUR_TEXT: &str = "Hello from **markdown** and <b>HTML</b>!";
Note: Markdown support is optional and you can disable the markdown
feature to have more lightweight, HTML-only support.
How does this work
Markdown (if present) is converted to HTML using comrak.
HTML is parsed using html5ever,
from the Servo project.
The resulting DOM is rendered directly to iced widgets using a custom renderer.
Crate Features
All enabled by default
markdown: Adds markdown support alongside HTML. Disable this if you want HTML-only support, or a lighter program.- Built-in iced features (can be disabled if you wish)
iced-wgpu: wgpu rendering backendiced-tiny-skia: tiny-skia rendering backendiced-tokio: tokio async runtimeiced-windowing: x11 and wayland backends
Roadmap
- Support for more elements (eg: superscript, table)
| Version | iced | MSRV |
|---|---|---|
| 0.3 | 0.14 | 1.88 |
| 0.2 | 0.13 | 1.82 |
| 0.1 | 0.13 | 1.82 |
Contributing
This library is experimental. Bug reports and pull requests are welcome; contributions are appreciated!
- License: Dual licensed under MIT and Apache 2.0.