Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chialab/typos

Typing utilities for WYSIWYG editors.
https://github.com/chialab/typos

Last synced: about 2 months ago
JSON representation

Typing utilities for WYSIWYG editors.

Awesome Lists containing this project

README

        


Typos • Typing utilities for WYSIWYG editors.


NPM

---

## Get the library

### NPM

Install via NPM or Yarn:

```
npm i @chialab/typos
```

```
yarn add @chialab/typos
```

### CDN

```js
import { fixQuotes } from 'https://unpkg.com/@chialab/typos?module';
```

## Usage

### TinyMCE

Use **Typos** as plugin for [TinyMCE](https://www.tiny.cloud/):

```ts
import tinymce from 'tinymce/tinymce';
import { tinymcePlugin } from '@chialab/typos';

tinymcePlugin(tinymce);

tinymce.init({
selector: 'textarea',
plugins: 'typos',
toolbar: 'fixQuotes',
});
```

---

## Development

Install the dependencies

```
yarn
```

Run the `dev` script to debug the library:

```
yarn dev
```

Run the `build` script for distribution:

```
yarn build
```

This will generate the ESM bundle in the `dist` folder and declaration files in the `types` folder.

---

## License

**Typos** is released under the [MIT](https://github.com/chialab/typos/blob/main/LICENSE) license.