static/static.rs
1use mathquill_js::MathQuill;
2
3fn main() {
4 // getting this is usually the responsibility of
5 // a web framework, e.g. leptos
6 let element: web_sys::HtmlElement = todo!();
7 let mq = MathQuill::get_global_interface();
8
9 let field = mq.mount_static_field(&element);
10
11 // this is often set in response to application demands
12 field.set_latex(r"\text{Hey, this is cool!}");
13}