# editorview

> js 编辑器，可以对代码进行提示、babel 编译

Latest version **0.1.8** (published 2022-01-17) · 0 weekly downloads

## Install

```sh
npm install editorview
pnpm add editorview
yarn add editorview
bun add editorview
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2022-01-17 |
| First published | 2022-01-15 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 18.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | hammersjs |

## Links

- npm: https://www.npmjs.com/package/editorview
- Repository: https://github.com/LimMem/editorview
- Issues: https://github.com/LimMem/editorview/issues
- npm.io page: https://npm.io/package/editorview

## Dependencies (3)

- [@babel/core](https://npm.io/package/@babel/core.md) ^7.16.7
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.16.8
- [@monaco-editor/react](https://npm.io/package/@monaco-editor/react.md) ^4.3.1

## Recent versions

- 0.1.8 (latest) — 2022-01-17
- 0.1.6 — 2022-01-17
- 0.1.4 — 2022-01-17
- 0.1.3 — 2022-01-17
- 0.1.2 — 2022-01-17
- 0.1.1 — 2022-01-15
- 0.1.0 — 2022-01-15

## README

# editorview

js 编辑器，可以对代码进行提示、babel 编译

## Getting Started

> npm i editorview

```javascript
import EditorView, { EditorImperativeHandleHandle } from 'editorview/es/EditorView';

  const editRef = useRef<EditorImperativeHandleHandle>();

  // 获取值 默认获取es6 -> es5代码
  editRef.current?.getValue();

  return (
    <EditorView
      forwardRef={editRef}
      onError={(err) => {
        console.log(err); // 代码转化失败时回调
      }}
      defaultValue={defaultEditorText}
      className={styles.editor}
    />
  );

```

## [在线效果图](https://editorview-git-gh-pages-limmem.vercel.app/editor-view)

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