Hufe921 / canvas-editor

rich text editor by canvas/svg
https://hufe.club/canvas-editor-docs
MIT License
3.63k stars 544 forks source link
browser canvas canvas-editor control date-picker editor emr latex pdf pdf-generation rich-text svg typescript vite word wysiwyg

canvas-editor

Version Cypress Passing GitHub Contributors License PRs

a rich text editor by canvas/svg

View Demo · View Docs · Report Bug · Request Feature · FAQ

Love the project? Please consider donating to help it improve!

Tips

  1. Official plugin: canvas-editor-plugin
  2. The render layer by svg is under development, see feature/svg
  3. The export pdf feature is available now, see feature/pdf

Basic usage

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

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

Features

Roadmap

  1. Table paging
  2. Control rules
  3. Improve performance
  4. CRDT

Snapshot

image

Install

yarn

Dev

npm run dev

Build

app

npm run build

lib

npm run lib