Skip to content

Commit

Permalink
docs: drop cdn injection, bump v
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoDog896 committed Mar 23, 2024
1 parent 12acd15 commit 4c14b60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
# [svelte-mathquill](https://leodog896.github.io/svelte-mathquill)

[![npm](https://img.shields.io/npm/dw/svelte-mathquill)](https://npmjs.com/package/svelte-mathquill)

[![npm](https://img.shields.io/npm/v/svelte-mathquill)](https://npmjs.com/package/svelte-mathquill)

A wrapper around MathQuill, a very intuitive math typing editor

`npm i -D svelte-mathquill`

## Usage

MathQuill uses legacy bundling, so using it can be tricky -- by wrapping around the CDN scripts, we can make it easier to use. The source code for the setup injection is [here](https://github.com/LeoDog896/svelte-mathquill/blob/main/src/lib/MathQuillSetup.svelte), in case you want to modify the imported scripts yourself or get the URLs for a service worker implementation.

In general, it depends on jQuery.js, and both mathquill.js and mathquill.css

Add this to your `+layout.svelte` or any wrapper file where you use MathQuill:

```html
Expand All @@ -23,7 +18,8 @@ Add this to your `+layout.svelte` or any wrapper file where you use MathQuill:
<MathQuillSetup />
```

This imports the necessary files globally.
This injects jQuery and MathQuill (+ styles) into the head of the document,
to begin using MathQuill in your components.

Simple example:

Expand All @@ -39,7 +35,7 @@ Simple example:
<input bind:value="{latex}" />
```

## Documetation
## Documentation

### Properties

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "svelte-mathquill",
"description": "A svelte wrapper for MathQuill",
"version": "0.6.0",
"version": "0.8.0",
"author": {
"name": "Tristan F.",
"email": "[email protected]"
Expand Down

0 comments on commit 4c14b60

Please sign in to comment.