# ata-wysiwyg-editor

> callback fo errors

Latest version **0.1.2** (published 2021-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install ata-wysiwyg-editor
pnpm add ata-wysiwyg-editor
yarn add ata-wysiwyg-editor
bun add ata-wysiwyg-editor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2021-03-22 |
| First published | 2021-03-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 47 |
| Unpacked size | 839.8 KB |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Pavel Khavilov |
| Maintainers | uhaubuhau |

## Links

- npm: https://www.npmjs.com/package/ata-wysiwyg-editor
- npm.io page: https://npm.io/package/ata-wysiwyg-editor

## Dependencies (47)

- [clsx](https://npm.io/package/clsx.md) ^1.1.1
- [sass](https://npm.io/package/sass.md) ^1.32.8
- [react](https://npm.io/package/react.md) ^17.0.1
- [lodash](https://npm.io/package/lodash.md) 4.17.15
- [draft-js](https://npm.io/package/draft-js.md) ^0.11.7
- [typograf](https://npm.io/package/typograf.md) ^6.11.3
- [immutable](https://npm.io/package/immutable.md) ^4.0.0-rc.12
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.1
- [validator](https://npm.io/package/validator.md) ^13.5.2
- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.2.3
- [web-vitals](https://npm.io/package/web-vitals.md) ^1.0.1
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.3.3
- [@babel/node](https://npm.io/package/@babel/node.md) ^7.2.2
- [material-ui](https://npm.io/package/material-ui.md) ^0.20.2
- [babel-eslint](https://npm.io/package/babel-eslint.md) ^10.0.1
- [postcss-axis](https://npm.io/package/postcss-axis.md) ^0.1.2
- [draft-convert](https://npm.io/package/draft-convert.md) ^2.1.10
- [postcss-short](https://npm.io/package/postcss-short.md) ^5.0.0
- [react-scripts](https://npm.io/package/react-scripts.md) latest
- [smart-plurals](https://npm.io/package/smart-plurals.md) ^1.1.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.3.1
- [react-dropzone](https://npm.io/package/react-dropzone.md) ^11.3.1
- [html-to-draftjs](https://npm.io/package/html-to-draftjs.md) ^1.4.0
- [@material-ui/lab](https://npm.io/package/@material-ui/lab.md) ^4.0.0-alpha.56
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.3.1
- [@material-ui/core](https://npm.io/package/@material-ui/core.md) ^4.11.0
- [postcss-normalize](https://npm.io/package/postcss-normalize.md) ^9.0.0
- [react-css-modules](https://npm.io/package/react-css-modules.md) ^4.7.11
- [@material-ui/icons](https://npm.io/package/@material-ui/icons.md) ^4.2.1
- [babel-preset-react](https://npm.io/package/babel-preset-react.md) ^6.24.1
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.12.13
- [@material-ui/styles](https://npm.io/package/@material-ui/styles.md) ^4.10.0
- [react-beautiful-dnd](https://npm.io/package/react-beautiful-dnd.md) ^13.0.0
- [@material-ui/pickers](https://npm.io/package/@material-ui/pickers.md) ^3.2.9
- [postcss-position-alt](https://npm.io/package/postcss-position-alt.md) ^0.7.0
- [postcss-single-charset](https://npm.io/package/postcss-single-charset.md) ^2.0.0
- [react-copy-to-clipboard](https://npm.io/package/react-copy-to-clipboard.md) ^5.0.3
- [react-responsive-carousel](https://npm.io/package/react-responsive-carousel.md) ^3.2.13
- [postcss-momentum-scrolling](https://npm.io/package/postcss-momentum-scrolling.md) ^2.5.16
- [postcss-font-family-system-ui](https://npm.io/package/postcss-font-family-system-ui.md) ^4.2.0
- [babel-plugin-transform-imports](https://npm.io/package/babel-plugin-transform-imports.md) ^2.0.0
- [@babel/plugin-transform-runtime](https://npm.io/package/@babel/plugin-transform-runtime.md) ^7.2.0
- [@babel/plugin-transform-react-jsx](https://npm.io/package/@babel/plugin-transform-react-jsx.md) ^7.12.17
- [@babel/plugin-proposal-class-properties](https://npm.io/package/@babel/plugin-proposal-class-properties.md) ^7.13.0
- [@babel/plugin-transform-arrow-functions](https://npm.io/package/@babel/plugin-transform-arrow-functions.md) ^7.13.0
- [@babel/plugin-proposal-object-rest-spread](https://npm.io/package/@babel/plugin-proposal-object-rest-spread.md) ^7.3.2
- [@babel/plugin-transform-async-to-generator](https://npm.io/package/@babel/plugin-transform-async-to-generator.md) ^7.2.0

## Recent versions

- 0.1.2 (latest) — 2021-03-22
- 0.1.13 — 2021-03-22
- 0.1.12 — 2021-03-22
- 0.1.11 — 2021-03-22
- 0.1.1 — 2021-03-19
- 0.1.0 — 2021-03-12

## README

### onError - required

callback fo errors

`onError: ({message}:{message: string}) => void`

onError({message: "Short text!})

### readOnly - optional

make editor only for read, **default false**

`readOnly?: boolean`

### isDisabled - optional

makes the editor not responsive to any action, **default false**

`isDisabled?: boolean`

###  spellCheck - optional

show spell errors in text, **default true**

`spellCheck?: boolean`

### placeholder - optional

initial placeholder in editor, **default "Введите текст..."**

`placeholder?: string`


### disableToolbar - optional

this property disables the toolbar for editing font style, **default false**

`disableToolbar?: boolean`

### calculateWords - optional

this property is used to calculate the count of words in the text, **default false**

`calculateWords?: boolean`

### calculateCharts - optional

this property is used to calculate the count of charts in the text, **default false**

`calculateCharts?: boolean`

### disableLinkEdit - optional

this property is used to disable link editing, ** by default false **

`disableLinkEdit?: boolean`


## MEDIA 

**if you want to work with media files, you need to add all the properties listed below to avoid crashing the application**

### onLoaderOn - optional
init loader finction

`onLoaderOn: () => void`

### onLoaderOff - optional
rest loader finction

`onLoaderOff: () => void`

### onMediasRequest - required
get all medias request function 

`onMediasRequest: () => void`


### postMedia - required
all media files, wich you want to use in editor

```
type Media: {
   id: number
    created_at: Date
    size: number // bytes
    disk: "images" | "videos" | "main_image"
    type: "images" | "videos" | "main_image"
    url: string
} 

postMedia: Media[]
```

### addedMedia - required
all files that were added during the work in the media modal

`postMedia: string[] // url[]`


### onMediaAdd - required
add media function

`onMediaAdd: (file: File | string, onLoaderOff) => void`


### clearAddedMedia - required
clear all files that were added during the work in the media modal

`clearAddedMedia: () => void`

### removeAddedMedia - required
clear chosen file that were added during the work in the media modal

`removeAddedMedia: (url: string) => void`


## Marks (layer)
**properties to add the ability to view marks**

### editorOnly - optional
property indicating whether to show something other than the editor **default true**

`editorOnly?: boolean` // for show need editorOnly={false}

### isChanged - required
has the editor text changed

`isChanged: boolean`

### isShowHints - required
whether it is necessary to show hints in the text

`isShowHints: boolean`

### hints - required

list of hints

```
type Hint: 'double_words' | 'ataCheck' | 'long_words' | 'stopwords'
```

 ```
 type Value: {
     key?: string
     title?: string
     modifier?: string
 }
```

`hins: {[key in Hint]: Value }`

---
_Source: https://npm.io/package/ata-wysiwyg-editor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
