# bin-editor-next

> 基于vue的代码编辑器插件

Latest version **1.1.0** (published 2022-02-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install bin-editor-next
pnpm add bin-editor-next
yarn add bin-editor-next
bun add bin-editor-next
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-02-09 |
| First published | 2021-09-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | wangbin |
| Maintainers | wangbin3162 |
| Keywords | bin-editor-next, vue3, components |

## Links

- npm: https://www.npmjs.com/package/bin-editor-next
- Homepage: https://wangbin3162.gitee.io/bin-editor-next/
- npm.io page: https://npm.io/package/bin-editor-next

## Dependencies (1)

- [brace](https://npm.io/package/brace.md) ^0.11.1

## 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.1.0 (latest) — 2022-02-09
- 1.0.6 — 2021-10-09
- 1.0.5 — 2021-09-26
- 1.0.3 — 2021-09-08
- 1.0.1 — 2021-09-08
- 1.0.0 — 2021-09-03

## README

## 介绍

bin-editor-next 为更好的区分vue版本依赖，现包名已更新为bin-editor-next，组件名不变。

### 最新版本

[![NPM version](https://img.shields.io/npm/v/bin-editor-next.svg)](https://www.npmjs.com/package/bin-editor-next)

## 安装

通过[unpkg.com/bin-editor-next](https://unpkg.com/bin-editor-next/) 可以看到 bin-editor-next 最新版本的资源，也可以切换版本选择需要的资源，在页面上引入 js
和 css 文件即可开始使用：

```javascript
<!-- import Vue.js -->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<!-- import bin-editor-next -->
<script src="https://unpkg.com/bin-editor-next@1.0.0/lib/index.min.js"></script>
```

### npm 安装

推荐使用npm安装，它能更好地和[webpack](https://webpack.js.org/)打包工具配合使用。而且可以更好的和
es6配合使用。并且支持按需引入

```shell
npm i bin-editor-next -S
# or 
yarn add bin-editor-next
```

## 引入

在 main.js 中写入以下内容：

```javascript
import { createApp } from 'vue'
import Editor from 'bin-editor-next';
import App from './App.vue';

import * as ace from 'brace'
import 'brace/ext/emmet'
import 'brace/ext/language_tools'
import 'brace/mode/json'
import 'brace/snippets/json'
import 'brace/theme/chrome'

const app = createApp(App)
app.component(Editor.name, Editor)
app.mount('#app', true)
```

### CDN 安装

快速构建一个编辑器需要依赖 [ace-builds](https://github.com/ajaxorg/ace-builds/) 构建，去下载对应资源放置到项目中或使用cdn

```javascript
<script src="../lib/bin-editor-next/src-min-noconflict/ace.js"></script>
<script src="../lib/bin-editor-next/src-min-noconflict/ext-beautify.js"></script>
<script src="../lib/bin-editor-next/src-min-noconflict/ext-language_tools.js"></script>
<script src="../lib/bin-editor-next/src-min-noconflict/mode-json.js"></script>
<script src="../lib/bin-editor-next/src-min-noconflict/snippets/json.js"></script>

<script src="../lib/bin-editor-next/bin-editor-next.min.js"></script>
```

上面五个是依赖，根据需要实现的语言类型引入

推荐使用npm方式来进行使用，这样可以更好的配合webpack进行构建

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