github上的canvas-editor按#765pr合并得到
Go to file
Hufe921 1dfdd9a057 feat:adjust selection by direction key 2023-01-20 22:25:24 +08:00
.github/workflows feat:add docs workflow 2022-12-31 22:43:13 +08:00
.vscode fix:compatible with browsers that do not support ClipboardItem #108 2023-01-04 22:33:18 +08:00
cypress feat:add style namespace 2022-12-16 16:05:56 +08:00
docs docs:adjust selection by shortcut 2023-01-12 17:58:22 +08:00
src feat:adjust selection by direction key 2023-01-20 22:25:24 +08:00
.editorconfig feat:add eslint and fix 2022-03-22 14:48:10 +08:00
.eslintrc feat:add eslint and fix 2022-03-22 14:48:10 +08:00
.gitignore feat:add docs 2022-12-31 22:27:43 +08:00
LICENSE feat:add license 2022-04-06 23:05:12 +08:00
README.md docs:add docs url to README.md 2022-12-31 23:00:21 +08:00
cypress.json fix:update cypress viewport width 2022-04-14 21:06:45 +08:00
favicon.png feat:rich text editor by canvas 2021-11-12 22:22:05 +08:00
index.html feat:add font selection and font wysiwyg 2022-12-29 15:54:12 +08:00
package.json feat:add docs 2022-12-31 22:27:43 +08:00
tsconfig.json feat:publish npm package config 2022-12-08 17:46:38 +08:00
vite.config.ts feat:update server host 2023-01-05 19:29:49 +08:00
yarn.lock feat:add docs 2022-12-31 22:27:43 +08:00

README.md

canvas-editor

a rich text editor by canvas/svg

tips

  1. docs
  2. The render layer by svg is under development, see feature/svg
  3. The export pdf feature is available now, see feature/pdf

usage

npm i @hufe921/canvas-editor --save
<div class="canvas-editor"></div>
import Editor from "@hufe921/canvas-editor"

new Editor(document.querySelector(".canvas-editor"), [
    {
      value: "Hello World"
    }
  ])

snapshot

image

next features

  1. drag text (optimization)
  2. page header and footer
  3. control rules
  4. table paging
  5. docs

install

yarn

dev

yarn run dev

build

app

yarn run build

lib

yarn run lib