# editor-357test

> 修改readme

Latest version **1.0.11** (published 2022-11-23) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install editor-357test
pnpm add editor-357test
yarn add editor-357test
bun add editor-357test
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2022-11-23 |
| First published | 2022-11-23 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | xianyudouliang |
| Keywords | editor, rich text, 357.com, test357 |

## Links

- npm: https://www.npmjs.com/package/editor-357test
- npm.io page: https://npm.io/package/editor-357test

## Dependencies (7)

- [clone](https://npm.io/package/clone.md) ^2.1.1
- [extend](https://npm.io/package/extend.md) ^3.0.1
- [node-sass](https://npm.io/package/node-sass.md) ^4.14.1
- [parchment](https://npm.io/package/parchment.md) ^1.1.4
- [deep-equal](https://npm.io/package/deep-equal.md) ^1.0.1
- [quill-delta](https://npm.io/package/quill-delta.md) ^3.6.2
- [eventemitter3](https://npm.io/package/eventemitter3.md) ^2.0.3

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 1.0.11 (latest) — 2022-11-23
- 1.0.10 — 2022-11-23
- 1.0.9 — 2022-11-23
- 1.0.8 — 2022-11-23
- 1.0.7 — 2022-11-23
- 1.0.6 — 2022-11-23
- 1.0.5 — 2022-11-23
- 1.0.4 — 2022-11-23
- 1.0.3 — 2022-11-23
- 1.0.2 — 2022-11-23
- 1.0.1 — 2022-11-23
- 1.0.0 — 2022-11-23

## README

**说明**： 目前的包名只是测试，后续的包名会进行修改，修改之后和包名相关的路径都需要修改。

## 安装

```js
npm i editor-357test
```

## 使用

### 导入样式

```js
import 'editor-357test/dist/quill.core.css'
import 'editor-357test/dist/quill.snow.css'
import 'editor-357test/dist/quill.bubble.css'
```

quill.core.css是必须导入的样式。quill.snow.css和quill.bubble.css是主题样式，后续可根据quill的配置切换主题

### 导入编辑器

此包默认会导出一个对象

```js
{
    Quill, // 编辑器构造函数
    install, // 暴露给vue.js
    quillEditor // 编辑器组件
}
```

#### 直接导入

```js
import Editor from 'editor-357test'
Vue.use(Editor)
```

通过Vue.use之后会在Vue全局注册quill-editor组件。直接使用该组件即可使用编辑器。

#### 自定义编辑器配置

编辑器的默认配置写在quillEditor组件下，默认配置如下：

```js
const defaultOptions = {
    theme: 'snow',
    boundary: document.body,
    modules: {
      toolbar: [
        ['bold', 'italic', 'underline', 'strike'],
        ['blockquote', 'code-block'],
        [{ 'header': 1 }, { 'header': 2 }],
        [{ 'list': 'ordered' }, { 'list': 'bullet' }],
        [{ 'script': 'sub' }, { 'script': 'super' }],
        [{ 'indent': '-1' }, { 'indent': '+1' }],
        [{ 'direction': 'rtl' }],
        [{ 'size': ['small', false, 'large', 'huge'] }],
        [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
        [{ 'color': [] }, { 'background': [] }],
        [{ 'font': [] }],
        [{ 'align': [] }],
        ['clean'],
        ['link', 'image', 'video']
      ]
    },
    placeholder: 'Insert text here ...',
    readOnly: false
  }
```

修改默认配置只需要在vue.use后面传入配置对象即可

```js
Vue.use(VueEditor, {
  theme: "snow",
  modules: {
    toolbar: [
      ["bold", "italic"],
      [{ header: 1 }, { header: 2 }],
    ],
  },
});
```

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