mathquill-leptos 0.2.0

A mathquill integration layer for Leptos
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use leptos::{leptos_dom::logging::console_log, prelude::*};
use mathquill_leptos::components::MathQuillStatic;

// please note, you will still need to load the library,
// this example won't work as-is (in your own code)
fn main() {
  leptos::mount::mount_to_body(move || {
    let current = RwSignal::new(String::from("1 + 1 = 2"));

    view! {
      <label for="latex-input">"Type latex here:"</label>
      <input id="latex-input" type="text" bind:value=current />

      <p>"And your latex will appear rendered here:"</p>
      <MathQuillStatic latex=current />
    }
  });
}