Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpapercut committed May 3, 2024
1 parent 524c553 commit 409cd71
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ You can load this library either by using a script tag, or installing it with np

### Script tag (simple usage)
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected].5/dist/wypst.min.css" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected].5/dist/wypst.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected].6/dist/wypst.min.css" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected].6/dist/wypst.min.js" crossorigin="anonymous"></script>

<script>
wypst.initialize();
wypst.renderToString(); // Test it out!
wypst.initialize().then(() => {
wypst.renderToString("x + y"); // Test it out!
})
</script>
```

Expand All @@ -24,12 +25,12 @@ npm install wypst
```

You may then load the wasm binary
```
```javascript
import wypst from 'wypst';
import wasm from 'wypst/dist/wypst.wasm';

wypst.initialize(wasm);
wypst.renderToString("x + y") // Test it out!
await wypst.initialize(wasm);
wypst.renderToString("x + y"); // Test it out!
```

### Rendering Typst Math
Expand Down

0 comments on commit 409cd71

Please sign in to comment.