File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 11---
22date : Last Modified
3- title : Using A Mathfield with Svelte
3+ title : Using a Mathfield with Svelte
44slug : /mathfield/guides/svelte/
55---
66
@@ -75,6 +75,8 @@ declare namespace svelteHTML {
7575 const config = {
7676 " smart-mode" : true
7777 // ...
78+ // see here for the full list of API's
79+ // https://cortexjs.io/mathfield/api/
7880 }
7981 </script >
8082
@@ -85,11 +87,12 @@ declare namespace svelteHTML {
8587<MathField {...config} ></MathField >
8688
8789<!-- 2-way binding -->
88- <MathField bind:value = {value} ></MathField >
90+ <MathField bind:value ></MathField >
8991
90- <p >Current LaTeX : {value}</p >
92+ <p >Current value : {value}</p >
9193
92- <button onclick ={() => {value = "1 + 1";}}>
94+ <button
95+ onclick ={() => {value = String.raw`x=\frac{-b\pm \sqrt{b^2-4ac}}{2a}`}}>
9396 reset to default
9497</button >
9598```
You can’t perform that action at this time.
0 commit comments