@hufe921/canvas-editor 0.9.94 → 0.9.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +53 -18
- package/dist/canvas-editor.es.js +314 -69
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +37 -37
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/command/Command.d.ts +2 -0
- package/dist/src/editor/core/command/CommandAdapt.d.ts +4 -1
- package/dist/src/editor/core/cursor/Cursor.d.ts +1 -0
- package/dist/src/editor/core/draw/control/Control.d.ts +3 -1
- package/dist/src/editor/core/draw/particle/table/TableOperate.d.ts +2 -1
- package/dist/src/editor/core/draw/particle/table/TableParticle.d.ts +1 -0
- package/dist/src/editor/core/draw/particle/table/TableTool.d.ts +2 -0
- package/dist/src/editor/core/range/RangeManager.d.ts +1 -0
- package/dist/src/editor/dataset/constant/ContextMenu.d.ts +2 -0
- package/dist/src/editor/dataset/enum/table/Table.d.ts +3 -1
- package/dist/src/editor/index.d.ts +5 -5
- package/dist/src/editor/interface/Control.d.ts +10 -0
- package/dist/src/editor/interface/Element.d.ts +6 -1
- package/dist/src/editor/interface/Search.d.ts +7 -0
- package/dist/src/editor/utils/element.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,60 @@
|
|
|
1
|
+
## [0.9.96](https://github.com/Hufe921/canvas-editor/compare/v0.9.95...v0.9.96) (2024-11-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* adjust column width after adding new columns #855 ([2439c24](https://github.com/Hufe921/canvas-editor/commit/2439c24e120bdfb0553d5f32ef9af25517bb6baa)), closes [#855](https://github.com/Hufe921/canvas-editor/issues/855)
|
|
7
|
+
* focus editor when selection exists #871 ([85cc2b7](https://github.com/Hufe921/canvas-editor/commit/85cc2b7f68726fbecb1484f420a6d20bda004dfe)), closes [#871](https://github.com/Hufe921/canvas-editor/issues/871)
|
|
8
|
+
* margin height in continuous page mode ([c0403b8](https://github.com/Hufe921/canvas-editor/commit/c0403b8f8d069d0c4b3fcb8bb23159cb1fb00fe5))
|
|
9
|
+
* table rendering error after pagination when scaled #867 ([a1472c2](https://github.com/Hufe921/canvas-editor/commit/a1472c23aacef239f00cab9ab365d261599d1bee)), closes [#867](https://github.com/Hufe921/canvas-editor/issues/867)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* export EDITOR_CLIPBOARD constant #860 ([7e56297](https://github.com/Hufe921/canvas-editor/commit/7e562970031a4227d3d8ac66f2447cf2c52f25d1)), closes [#860](https://github.com/Hufe921/canvas-editor/issues/860)
|
|
15
|
+
* update README.md ([3a81d56](https://github.com/Hufe921/canvas-editor/commit/3a81d56974e1e30bb01985f9a79de7f31785a8fc))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* add control paste disabled rule #853 ([2bb84ab](https://github.com/Hufe921/canvas-editor/commit/2bb84abb5f3fb6670ca9ae88e96f5790de4b6a9d)), closes [#853](https://github.com/Hufe921/canvas-editor/issues/853)
|
|
21
|
+
* add getElementById api ([8eabd07](https://github.com/Hufe921/canvas-editor/commit/8eabd0719981b16f4ba87005d5759c6710848bde))
|
|
22
|
+
* add table dashed border #858 ([dffac63](https://github.com/Hufe921/canvas-editor/commit/dffac639739d82e50cb122b3c95af12805351bb9)), closes [#858](https://github.com/Hufe921/canvas-editor/issues/858)
|
|
23
|
+
* add table internal border #869 ([5cc4f13](https://github.com/Hufe921/canvas-editor/commit/5cc4f1349cacc974918068619dc9b258f6c9cad5)), closes [#869](https://github.com/Hufe921/canvas-editor/issues/869)
|
|
24
|
+
* optimize previewer interactive in readonly mode #875 ([09b8bac](https://github.com/Hufe921/canvas-editor/commit/09b8baca888453685eba03e205f91187a101427c)), closes [#875](https://github.com/Hufe921/canvas-editor/issues/875)
|
|
25
|
+
* quick select table row and col tool ([c6a1703](https://github.com/Hufe921/canvas-editor/commit/c6a170367fbcb9822bce3040ebd63bed8ea27355))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## [0.9.95](https://github.com/Hufe921/canvas-editor/compare/v0.9.94...v0.9.95) (2024-10-19)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* date element update data boundary error #835 ([7f69fd9](https://github.com/Hufe921/canvas-editor/commit/7f69fd9ca2ea474167b10b0e122b745cffed2ab8)), closes [#835](https://github.com/Hufe921/canvas-editor/issues/835)
|
|
35
|
+
* previewer wheel event stop propagation ([ddf0806](https://github.com/Hufe921/canvas-editor/commit/ddf0806e3751c12c56523b987dc1031a85b17b69))
|
|
36
|
+
* set table context error when using directional keys ([b210ce3](https://github.com/Hufe921/canvas-editor/commit/b210ce39b1a440d8fecf7d222c5398b2025d3d68))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Chores
|
|
40
|
+
|
|
41
|
+
* update watermark option ([d14e720](https://github.com/Hufe921/canvas-editor/commit/d14e72001784202db5eeb7d9bb5ca76cce3cea3c))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Documentation
|
|
45
|
+
|
|
46
|
+
* update api markdown ([8c0f660](https://github.com/Hufe921/canvas-editor/commit/8c0f660bce8b2a579041af073e04de89913aa1a2))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Features
|
|
50
|
+
|
|
51
|
+
* add getKeywordContext api #846 ([abbb62d](https://github.com/Hufe921/canvas-editor/commit/abbb62df3bf45e64c67a7da3f7bbe666f4eb1328)), closes [#846](https://github.com/Hufe921/canvas-editor/issues/846)
|
|
52
|
+
* control element support set row flex #839 ([3f265c8](https://github.com/Hufe921/canvas-editor/commit/3f265c835b8f63bcc07b41596ab4dce886e99629)), closes [#839](https://github.com/Hufe921/canvas-editor/issues/839)
|
|
53
|
+
* export getElementListByHTML and getTextFromElementList api ([590c97d](https://github.com/Hufe921/canvas-editor/commit/590c97db225931d6bb4e117736a71be83cbb117e))
|
|
54
|
+
* remove row spacing from continuous tables #842 ([a4d8633](https://github.com/Hufe921/canvas-editor/commit/a4d863320bc8f9b2efa0390c09d58566faa62be9)), closes [#842](https://github.com/Hufe921/canvas-editor/issues/842)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
1
58
|
## [0.9.94](https://github.com/Hufe921/canvas-editor/compare/v0.9.93...v0.9.94) (2024-10-07)
|
|
2
59
|
|
|
3
60
|
|
package/README.md
CHANGED
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
<h1 align="center">canvas-editor</h1>
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<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>
|
|
5
|
-
<a href="https://
|
|
6
|
-
<
|
|
4
|
+
<a href="https://www.npmjs.com/package/@hufe921/canvas-editor" target="_blank"><img src="https://img.shields.io/npm/v/@hufe921/canvas-editor.svg?sanitize=true" alt="Version"></a>
|
|
5
|
+
<a href="https://github.com/hufe921/canvas-editor/actions" target="_blank">
|
|
6
|
+
<img alt="Cypress Passing" src="https://github.com/hufe921/canvas-editor/workflows/cypress/badge.svg" />
|
|
7
|
+
</a>
|
|
8
|
+
<a href="https://github.com/hufe921/canvas-editor/graphs/contributors" target="_blank">
|
|
9
|
+
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/hufe921/canvas-editor" />
|
|
10
|
+
</a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/@hufe921/canvas-editor" target="_blank"><img src="https://img.shields.io/npm/l/@hufe921/canvas-editor.svg?sanitize=true" alt="License"></a>
|
|
12
|
+
<a href="https://github.com/Hufe921/canvas-editor/issues/new/choose" target="_blank"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs"></a>
|
|
7
13
|
</p>
|
|
8
14
|
|
|
9
15
|
<p align="center"> a rich text editor by canvas/svg</p>
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://hufe.club/canvas-editor" target="_blank">View Demo</a>
|
|
19
|
+
·
|
|
20
|
+
<a href="https://hufe.club/canvas-editor-docs" target="_blank">View Docs</a>
|
|
21
|
+
·
|
|
22
|
+
<a href="https://github.com/Hufe921/canvas-editor/issues/new?assignees=&labels=&projects=&template=bug_report.yml" target="_blank">Report Bug</a>
|
|
23
|
+
·
|
|
24
|
+
<a href="https://github.com/Hufe921/canvas-editor/issues/new?assignees=&labels=%3Asparkles%3A+feature+request&projects=&template=feature_request.yml" target="_blank">Request Feature</a>
|
|
25
|
+
·
|
|
26
|
+
<a href="https://github.com/Hufe921/canvas-editor/discussions" target="_blank">FAQ</a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<p align="center">Love the project? Please consider <a href="https://hufe.club/donate.jpg" target="_blank">donating</a> to help it improve!</p>
|
|
12
30
|
|
|
13
|
-
|
|
14
|
-
2. [canvas-editor-plugin](https://github.com/Hufe921/canvas-editor-plugin)
|
|
15
|
-
3. The render layer by svg is under development, see [feature/svg](https://github.com/Hufe921/canvas-editor/tree/feature/svg)
|
|
16
|
-
4. The export pdf feature is available now, see [feature/pdf](https://github.com/Hufe921/canvas-editor/tree/feature/pdf)
|
|
31
|
+
## Tips
|
|
17
32
|
|
|
18
|
-
|
|
33
|
+
1. Official plugin: [canvas-editor-plugin](https://github.com/Hufe921/canvas-editor-plugin)
|
|
34
|
+
2. The render layer by svg is under development, see [feature/svg](https://github.com/Hufe921/canvas-editor/tree/feature/svg)
|
|
35
|
+
3. The export pdf feature is available now, see [feature/pdf](https://github.com/Hufe921/canvas-editor/tree/feature/pdf)
|
|
36
|
+
|
|
37
|
+
## Basic usage
|
|
19
38
|
|
|
20
39
|
```bash
|
|
21
40
|
npm i @hufe921/canvas-editor --save
|
|
@@ -37,26 +56,42 @@ new Editor(document.querySelector('.canvas-editor'), {
|
|
|
37
56
|
})
|
|
38
57
|
```
|
|
39
58
|
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
59
|
+
## Features
|
|
60
|
+
|
|
61
|
+
- Rich text operations (Undo, Redo, Font, Size, Bold, Italic, Underline, Strikeout, Superscript, Alignment, Title, List, ...)
|
|
62
|
+
- Insert elements (Table, Image, Link, Code Block, Page Break, Math Formula, Date Picker, Block, ...)
|
|
63
|
+
- Print (Based on canvas to picture, pdf drawing)
|
|
64
|
+
- Controls (Select, Text, Date, Radio, Checkbox)
|
|
65
|
+
- Contextmenu (Internal, Custom)
|
|
66
|
+
- Shortcut keys (Internal, Custom)
|
|
67
|
+
- Drag and Drop(Text, Element, Control)
|
|
68
|
+
- Header, Footer, Page Number
|
|
69
|
+
- Page Margin
|
|
70
|
+
- Watermark
|
|
71
|
+
- Pagination
|
|
72
|
+
- Comment
|
|
73
|
+
- Catalog
|
|
74
|
+
|
|
75
|
+
## Roadmap
|
|
76
|
+
|
|
77
|
+
1. Table paging
|
|
78
|
+
2. Control rules
|
|
79
|
+
3. Improve performance
|
|
45
80
|
4. [CRDT](https://github.com/Hufe921/canvas-editor/tree/feature/CRDT)
|
|
46
81
|
|
|
47
|
-
##
|
|
82
|
+
## Snapshot
|
|
48
83
|
|
|
49
84
|

|
|
50
85
|
|
|
51
|
-
##
|
|
86
|
+
## Install
|
|
52
87
|
|
|
53
88
|
`yarn`
|
|
54
89
|
|
|
55
|
-
##
|
|
90
|
+
## Dev
|
|
56
91
|
|
|
57
92
|
`npm run dev`
|
|
58
93
|
|
|
59
|
-
##
|
|
94
|
+
## Build
|
|
60
95
|
|
|
61
96
|
#### app
|
|
62
97
|
|