Skip to content

Commit c70d1e3

Browse files
committed
more tweaks
1 parent 1af47bb commit c70d1e3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docs/mathfield/10-svelte.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
date: Last Modified
3-
title: Using A Mathfield with Svelte
3+
title: Using a Mathfield with Svelte
44
slug: /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
```

0 commit comments

Comments
 (0)