File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ $ npm install --save-dev mathlive
1616
1717## Create a Svelte Wrapper Component
1818
19- ``` svelte title="/src/lib/MathLive.svelte"
19+ ``` jsx title="/src/lib/MathLive.svelte"
2020< script lang= " ts" >
2121 import " mathlive" ;
2222 import type { MathfieldElement , MathfieldElementAttributes } from " mathlive" ;
@@ -57,7 +57,7 @@ declare namespace svelteHTML {
5757
5858## Usage
5959
60- ``` svelte
60+ ``` jsx
6161< script>
6262 import MathField from " $lib/MathField.svelte" ;
6363< / script>
@@ -67,7 +67,7 @@ declare namespace svelteHTML {
6767
6868## Customization
6969
70- ``` svelte
70+ ``` jsx
7171< script>
7272 import MathField from " $lib/MathField.svelte" ;
7373 let value = $state (" 1" );
@@ -89,14 +89,7 @@ declare namespace svelteHTML {
8989
9090< p> Current LaTeX: {value}< / p>
9191
92- <button
93- onclick={() => {
94- value = "1 + 1";
95- }}
96- >reset to default</button>
92+ < button onclick= {() => {value = " 1 + 1" ;}}>
93+ reset to default
94+ < / button>
9795```
98-
99- <ReadMore path =" https://github.com/arnog/svelte-mathlive " >
100- A ready-to-run example project is available on ** GitHub** <Icon name =" chevron-right-bold " />
101- </ReadMore >
102-
You can’t perform that action at this time.
0 commit comments