dioxus-prism 0.1.1

Render math with KaTeX in Yew!
docs.rs failed to build dioxus-prism-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: dioxus-prism-0.2.0

KaTeX for Dioxus

Render math with KaTeX in Dioxus!

How to use

  • First you need to import css cdn:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css">
  • Call use_katex_display hook to prepare context.
  • Call compile to get math expression node.
use dioxus_katex::use_katex_display;

let katex = use_katex_display(&cx);
let math = katex.compile(text);