cttic-canvas-editor
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

canvas-editor

Version Cypress Passing GitHub Contributors License PRs

a rich text editor by canvas/svg

基于@hufe921/canvas-editor改造。

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
  4. The AI-powered text processing demo, see feature/ai

Basic usage

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

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

Features

  • Rich text operations (Undo, Redo, Font, Size, Bold, Italic, Underline, Strikeout, Superscript, Alignment, Title, List, ...)
  • Insert elements (Table, Image, Link, Code Block, Page Break, Math Formula, Date Picker, Block, ...)
  • Print (Based on canvas to picture, pdf drawing)
  • Controls (Select, Text, Date, Radio, Checkbox)
  • Contextmenu (Internal, Custom)
  • Shortcut keys (Internal, Custom)
  • Drag and Drop(Text, Element, Control)
  • Header, Footer, Page Number
  • Page Margin
  • Watermark
  • Pagination
  • Comment
  • Catalog

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

Package Sidebar

Install

npm i cttic-canvas-editor

Weekly Downloads

44

Version

0.1.3

License

MIT

Unpacked Size

2.43 MB

Total Files

216

Last publish

Collaborators

  • amon1118