chore: update README.md

pr675
Hufe921 3 years ago
parent 33ebc59c72
commit 5ad1414d82

@ -1,5 +1,11 @@
<h1 align="center">canvas-editor</h1> <h1 align="center">canvas-editor</h1>
<p align="center">
<a href="https://www.npmjs.com/package/@hufe921/canvas-editor"><img src="https://img.shields.io/npm/v/@hufe921/canvas-editor.svg?sanitize=true" alt="Version"></a>
<a href="https://www.npmjs.com/package/@hufe921/canvas-editor"><img src="https://img.shields.io/npm/l/@hufe921/canvas-editor.svg?sanitize=true" alt="License"></a>
<a href="https://github.com/Hufe921/canvas-editor/issues/new/choose"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs"></a>
</p>
<p align="center"> a rich text editor by canvas/svg</p> <p align="center"> a rich text editor by canvas/svg</p>
## tips ## tips
@ -14,24 +20,28 @@
```bash ```bash
npm i @hufe921/canvas-editor --save npm i @hufe921/canvas-editor --save
``` ```
```html ```html
<div class="canvas-editor"></div> <div class="canvas-editor"></div>
``` ```
```javascript ```javascript
import Editor from "@hufe921/canvas-editor" import Editor from '@hufe921/canvas-editor'
new Editor(document.querySelector(".canvas-editor"), [ new Editor(document.querySelector('.canvas-editor'), {
main: [
{ {
value: "Hello World" value: 'Hello World'
} }
]) ]
})
``` ```
## next features ## next features
1. improve performance 1. table paging
2. control rules 2. improve performance
3. table paging 3. control rules
4. [CRDT](https://github.com/Hufe921/canvas-editor/tree/feature/CRDT) 4. [CRDT](https://github.com/Hufe921/canvas-editor/tree/feature/CRDT)
## snapshot ## snapshot
@ -49,7 +59,9 @@ new Editor(document.querySelector(".canvas-editor"), [
## build ## build
#### app #### app
`npm run build` `npm run build`
#### lib #### lib
`npm run lib`
`npm run lib`

Loading…
Cancel
Save