autumnnote 1.0.7 → 1.0.8
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/README.md +3 -3
- package/dist/autumnnote.css +40 -4
- package/dist/autumnnote.es.js +513 -107
- package/dist/autumnnote.es.js.map +1 -1
- package/dist/autumnnote.umd.js +513 -107
- package/dist/autumnnote.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/js/editing/Style.js +195 -44
- package/src/js/editing/Typing.js +2 -2
- package/src/js/module/Editor.js +14 -3
- package/src/js/module/EmojiDialog.js +11 -0
- package/src/js/module/IconDialog.js +11 -0
- package/src/js/module/ImageDialog.js +9 -5
- package/src/js/module/Placeholder.js +6 -1
- package/src/js/module/TableTooltip.js +393 -86
- package/src/styles/autumnnote.scss +50 -5
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<p align="center"><img src="image/banner.png" width="120" alt="AutumnNote Banner"/></p>
|
|
4
4
|
|
|
5
|
-
[](#)
|
|
6
6
|
[](https://github.com/cmm-cmm/Autumn-Note/actions/workflows/pages.yml)
|
|
7
7
|
[](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
|
|
8
8
|
[](https://vitejs.dev/)
|
|
@@ -51,7 +51,7 @@ Floating toolbars appear automatically when the user clicks on an editable eleme
|
|
|
51
51
|
| **Link** | Open in new tab, Edit (reopens dialog), Unlink |
|
|
52
52
|
| **Image** | Edit alt/URL (reopens dialog), Delete |
|
|
53
53
|
| **Video** | Edit (reopens dialog), Delete |
|
|
54
|
-
| **Table cell** | Row above/below, Delete row, Column left/right, Delete column, Merge cells, Column width, Row height, Border width, Delete table |
|
|
54
|
+
| **Table cell** | Row above/below, Delete row, Column left/right, Delete column, Merge cells, Unmerge cells, Cell selection mode, Column width, Row height, Border width, Delete table |
|
|
55
55
|
| **Code block** (`<pre>`) | Copy code, Delete block |
|
|
56
56
|
|
|
57
57
|
### Context menu
|
|
@@ -74,7 +74,7 @@ Right-click inside the editor opens a context menu with: **Undo**, **Redo**, **C
|
|
|
74
74
|
- **Tree-shakeable** — ES module build; all core utilities are individually exported
|
|
75
75
|
|
|
76
76
|
### Security
|
|
77
|
-
- All HTML (pasted content, `setHTML()`, or code-view output) is passed through a DOM-based sanitiser that strips `<script>`, `<
|
|
77
|
+
- All HTML (pasted content, `setHTML()`, or code-view output) is passed through a DOM-based sanitiser that strips `<script>`, `<object>`, `<embed>`, and all `on*` event handler attributes; `<iframe>` elements are permitted in `setHTML()` to support embedded content
|
|
78
78
|
- `javascript:` and `data:` URLs are rejected in links and images
|
|
79
79
|
- Clipboard paste sanitises rich content to remove XSS vectors before inserting
|
|
80
80
|
|
package/dist/autumnnote.css
CHANGED
|
@@ -30,16 +30,21 @@
|
|
|
30
30
|
.an-container.an-disabled .an-editable {
|
|
31
31
|
cursor: text;
|
|
32
32
|
user-select: text;
|
|
33
|
-
background: #fafafa;
|
|
34
33
|
}
|
|
35
34
|
.an-container.an-disabled .an-editable ul.an-checklist input[type=checkbox] {
|
|
36
35
|
pointer-events: none;
|
|
37
36
|
cursor: default;
|
|
37
|
+
opacity: 1;
|
|
38
|
+
}
|
|
39
|
+
.an-container.an-disabled .an-editable img {
|
|
40
|
+
-webkit-user-drag: none;
|
|
41
|
+
user-drag: none;
|
|
38
42
|
}
|
|
39
|
-
.an-container.an-disabled .an-editable img,
|
|
40
43
|
.an-container.an-disabled .an-editable .an-video-wrapper {
|
|
41
44
|
-webkit-user-drag: none;
|
|
42
45
|
user-drag: none;
|
|
46
|
+
}
|
|
47
|
+
.an-container.an-disabled .an-editable .an-video-wrapper .an-video-shield {
|
|
43
48
|
pointer-events: none;
|
|
44
49
|
}
|
|
45
50
|
.an-container.an-fullscreen {
|
|
@@ -366,8 +371,9 @@
|
|
|
366
371
|
line-height: 1.3;
|
|
367
372
|
}
|
|
368
373
|
.an-editable ul, .an-editable ol {
|
|
369
|
-
margin: 0 0 0.75em
|
|
370
|
-
padding:
|
|
374
|
+
margin: 0 0 0.75em 0;
|
|
375
|
+
padding-left: 1.5em;
|
|
376
|
+
list-style-position: inside;
|
|
371
377
|
}
|
|
372
378
|
.an-editable li {
|
|
373
379
|
margin-bottom: 0.25em;
|
|
@@ -555,6 +561,25 @@
|
|
|
555
561
|
letter-spacing: 0.02em;
|
|
556
562
|
}
|
|
557
563
|
|
|
564
|
+
.an-link-tooltip-btn--active {
|
|
565
|
+
background: rgba(59, 130, 246, 0.12) !important;
|
|
566
|
+
color: #3b82f6 !important;
|
|
567
|
+
}
|
|
568
|
+
.an-link-tooltip-btn--active svg {
|
|
569
|
+
stroke: #3b82f6;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.an-cell-selected {
|
|
573
|
+
background-color: rgba(59, 130, 246, 0.18) !important;
|
|
574
|
+
outline: 2px solid #3b82f6;
|
|
575
|
+
outline-offset: -2px;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.an-table-select-mode td,
|
|
579
|
+
.an-table-select-mode th {
|
|
580
|
+
cursor: cell;
|
|
581
|
+
}
|
|
582
|
+
|
|
558
583
|
.an-size-popover {
|
|
559
584
|
position: fixed;
|
|
560
585
|
background: #ffffff;
|
|
@@ -1618,6 +1643,17 @@
|
|
|
1618
1643
|
border-color: #3f3f5f;
|
|
1619
1644
|
color: #cdd6f4;
|
|
1620
1645
|
}
|
|
1646
|
+
.an-theme-dark .an-link-tooltip-btn--active {
|
|
1647
|
+
background: rgba(99, 102, 241, 0.2) !important;
|
|
1648
|
+
color: #818cf8 !important;
|
|
1649
|
+
}
|
|
1650
|
+
.an-theme-dark .an-link-tooltip-btn--active svg {
|
|
1651
|
+
stroke: #818cf8;
|
|
1652
|
+
}
|
|
1653
|
+
.an-theme-dark .an-cell-selected {
|
|
1654
|
+
background-color: rgba(99, 102, 241, 0.25) !important;
|
|
1655
|
+
outline-color: #6366f1;
|
|
1656
|
+
}
|
|
1621
1657
|
.an-theme-dark .an-table-cell {
|
|
1622
1658
|
background: #24273a;
|
|
1623
1659
|
border-color: #3f3f5f;
|