Crates.io | dioxus-prism |
lib.rs | dioxus-prism |
version | 0.2.0 |
source | src |
created_at | 2022-03-08 15:41:29.889668 |
updated_at | 2022-03-12 07:02:00.033234 |
description | Render with prismjs in dioxus! |
homepage | |
repository | https://github.com/oovm/prism-wasm |
max_upload_size | |
id | 546408 |
size | 4,951 |
Render math with PrismJS in Dioxus!
<link rel="stylesheet" href="https://raw.githubusercontent.com/oovm/prism-wasm/dev/projects/prism-wasm/src/prism.min.css">
or use PRISM_CSS
to inline css without cdn.
use_prism_rust
hook to prepare context.render
to get code highlight node.use dioxus_prism::use_prism_rust;
let rust = use_prism_rust(&cx);
let code = rust.render(text);