https://github.com/dioxuslabs/markdown
Convert markdown to dioxus vnodes
https://github.com/dioxuslabs/markdown
Last synced: about 1 year ago
JSON representation
Convert markdown to dioxus vnodes
- Host: GitHub
- URL: https://github.com/dioxuslabs/markdown
- Owner: DioxusLabs
- Created: 2021-10-17T23:41:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-15T07:39:21.000Z (almost 2 years ago)
- Last Synced: 2025-04-04T19:11:36.168Z (about 1 year ago)
- Language: Rust
- Size: 17.6 KB
- Stars: 44
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dioxus Markdown
> Easily convert markdown into Dioxus
```rust
let class = use_signal(|| String::from("content"));
rsx! {
Markdown {
class: class,
content: include_str!("../README.md"),
}
}
```
## Features
- Convert strings to vnodes on the fly with `tvnodes`
## Warning:
- Currently, this crate uses the pulldown-cmark to html converter with no actual intermediate step to Dioxus VNodes.
- Content is set with `dangerous_inner_html` with no actual translation to VNodes occurring.
- Macros are not currently implemented.
For most use cases, this approach will work fine. However, if you feel brave enough to add a true Markdown to VNode converter, we'd happily coach and assist the implementation/pull request.