The cursive-markup crate provides a markup view for [cursive][] that can
render HTML.
For example, this page could be rendered like this:

``` // Create the markup view let html = "Rust"; let mut view = cursivemarkup::MarkupView::html(&html); view.setmaximum_width(120);
// Set callbacks that are called if the link focus is changed and if a link is // selected with the Enter key view.onlinkfocus(|s, url| {}); view.onlinkselect(|s, url| {});
// Add the view to a Cursive instance use cursive::view::{Resizable, Scrollable}; let mut s = cursive::dummy(); s.addglobalcallback('q', |s| s.quit()); s.addfullscreenlayer(view.scrollable().full_screen()); s.run(); ```
For a complete example, see [examples/browser.rs][], a very simple browser
implementation.
html (default): render HTML using [html2text][]This crate supports Rust 1.45.0 or later.
Contributions to this project are welcome! Please submit patches to the
mailing list ~ireas/public-inbox@lists.sr.ht (archive) using the
[PATCH cursive-markup-rs] subject prefix. For more information, see the
Contributing Guide.
For bug reports, feature requests and other messages, please send a mail to
~ireas/public-inbox@lists.sr.ht (archive) using the
[cursive-markup-rs] prefix in the subject.
This project is dual-licensed under the Apache-2.0 and MIT licenses.
The documentation and examples contained in this repository are licensed under
the Creative Commons Zero license. You can find a copy of the license
texts in the LICENSES directory.
cursive-markup-rs complies with version 3.0 of the REUSE
specification.