@opentiny/fluent-editor 4.1.0 → 4.1.2

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.
Files changed (128) hide show
  1. package/es/config/editor.config.es.js +1 -1
  2. package/es/config/editor.config.es.js.map +1 -1
  3. package/es/config/editor.utils.es.js +33 -0
  4. package/es/config/editor.utils.es.js.map +1 -1
  5. package/es/config/i18n/en-us.es.js +4 -1
  6. package/es/config/i18n/en-us.es.js.map +1 -1
  7. package/es/config/i18n/zh-cn.es.js +4 -1
  8. package/es/config/i18n/zh-cn.es.js.map +1 -1
  9. package/es/config/index.es.js +3 -1
  10. package/es/core/fluent-editor.es.js +29 -4
  11. package/es/core/fluent-editor.es.js.map +1 -1
  12. package/es/fluent-editor.es.js +2 -11
  13. package/es/fluent-editor.es.js.map +1 -1
  14. package/es/formats/strike.es.js +1 -1
  15. package/es/formats/strike.es.js.map +1 -1
  16. package/es/index.es.js +6 -4
  17. package/es/index.es.js.map +1 -1
  18. package/es/modules/counter.es.js +2 -3
  19. package/es/modules/counter.es.js.map +1 -1
  20. package/es/modules/custom-clipboard.es.js +14 -16
  21. package/es/modules/custom-clipboard.es.js.map +1 -1
  22. package/es/modules/custom-image/blot-formatter.es.js +2 -2
  23. package/es/modules/custom-image/blot-formatter.es.js.map +1 -1
  24. package/es/modules/custom-image/index.es.js +1 -1
  25. package/es/modules/custom-image/preview/preview-modal.es.js +17 -6
  26. package/es/modules/custom-image/preview/preview-modal.es.js.map +1 -1
  27. package/es/modules/custom-image/specs/custom-image-spec.es.js.map +1 -1
  28. package/es/modules/custom-uploader.es.js.map +1 -1
  29. package/es/modules/file/modules/file-module.es.js.map +1 -1
  30. package/es/modules/flow-chart/i18n/index.es.js +3 -5
  31. package/es/modules/flow-chart/i18n/index.es.js.map +1 -1
  32. package/es/modules/flow-chart/modules/context-menu.es.js +10 -13
  33. package/es/modules/flow-chart/modules/context-menu.es.js.map +1 -1
  34. package/es/modules/flow-chart/modules/control-panel.es.js +13 -16
  35. package/es/modules/flow-chart/modules/control-panel.es.js.map +1 -1
  36. package/es/modules/index.es.js +2 -2
  37. package/es/modules/index.es.js.map +1 -1
  38. package/es/modules/link/modules/tooltip.es.js +42 -27
  39. package/es/modules/link/modules/tooltip.es.js.map +1 -1
  40. package/es/modules/mind-map/i18n/index.es.js +3 -5
  41. package/es/modules/mind-map/i18n/index.es.js.map +1 -1
  42. package/es/modules/mind-map/modules/context-menu.es.js +11 -11
  43. package/es/modules/mind-map/modules/context-menu.es.js.map +1 -1
  44. package/es/modules/mind-map/modules/control-panel.es.js +7 -9
  45. package/es/modules/mind-map/modules/control-panel.es.js.map +1 -1
  46. package/es/modules/shortcut-key/index.es.js +6 -6
  47. package/es/modules/shortcut-key/index.es.js.map +1 -1
  48. package/es/modules/table-up/index.es.js +23 -33
  49. package/es/modules/table-up/index.es.js.map +1 -1
  50. package/es/modules/toolbar/toolbar-tip.es.js +27 -5
  51. package/es/modules/toolbar/toolbar-tip.es.js.map +1 -1
  52. package/es/themes/snow.es.js +21 -4
  53. package/es/themes/snow.es.js.map +1 -1
  54. package/lib/config/editor.config.cjs.js +1 -1
  55. package/lib/config/editor.config.cjs.js.map +1 -1
  56. package/lib/config/editor.utils.cjs.js +33 -0
  57. package/lib/config/editor.utils.cjs.js.map +1 -1
  58. package/lib/config/i18n/en-us.cjs.js +4 -1
  59. package/lib/config/i18n/en-us.cjs.js.map +1 -1
  60. package/lib/config/i18n/zh-cn.cjs.js +4 -1
  61. package/lib/config/i18n/zh-cn.cjs.js.map +1 -1
  62. package/lib/config/index.cjs.js +2 -0
  63. package/lib/config/index.cjs.js.map +1 -1
  64. package/lib/core/fluent-editor.cjs.js +29 -4
  65. package/lib/core/fluent-editor.cjs.js.map +1 -1
  66. package/lib/fluent-editor.cjs.js +2 -11
  67. package/lib/fluent-editor.cjs.js.map +1 -1
  68. package/lib/formats/strike.cjs.js +1 -1
  69. package/lib/formats/strike.cjs.js.map +1 -1
  70. package/lib/index.cjs.js +18 -5
  71. package/lib/index.cjs.js.map +1 -1
  72. package/lib/modules/counter.cjs.js +2 -3
  73. package/lib/modules/counter.cjs.js.map +1 -1
  74. package/lib/modules/custom-clipboard.cjs.js +14 -16
  75. package/lib/modules/custom-clipboard.cjs.js.map +1 -1
  76. package/lib/modules/custom-image/blot-formatter.cjs.js +2 -2
  77. package/lib/modules/custom-image/blot-formatter.cjs.js.map +1 -1
  78. package/lib/modules/custom-image/index.cjs.js +1 -1
  79. package/lib/modules/custom-image/preview/preview-modal.cjs.js +17 -6
  80. package/lib/modules/custom-image/preview/preview-modal.cjs.js.map +1 -1
  81. package/lib/modules/custom-image/specs/custom-image-spec.cjs.js.map +1 -1
  82. package/lib/modules/custom-uploader.cjs.js.map +1 -1
  83. package/lib/modules/file/modules/file-module.cjs.js.map +1 -1
  84. package/lib/modules/flow-chart/i18n/index.cjs.js +3 -5
  85. package/lib/modules/flow-chart/i18n/index.cjs.js.map +1 -1
  86. package/lib/modules/flow-chart/modules/context-menu.cjs.js +10 -13
  87. package/lib/modules/flow-chart/modules/context-menu.cjs.js.map +1 -1
  88. package/lib/modules/flow-chart/modules/control-panel.cjs.js +13 -16
  89. package/lib/modules/flow-chart/modules/control-panel.cjs.js.map +1 -1
  90. package/lib/modules/index.cjs.js +14 -2
  91. package/lib/modules/index.cjs.js.map +1 -1
  92. package/lib/modules/link/modules/tooltip.cjs.js +42 -27
  93. package/lib/modules/link/modules/tooltip.cjs.js.map +1 -1
  94. package/lib/modules/mind-map/i18n/index.cjs.js +3 -5
  95. package/lib/modules/mind-map/i18n/index.cjs.js.map +1 -1
  96. package/lib/modules/mind-map/modules/context-menu.cjs.js +11 -11
  97. package/lib/modules/mind-map/modules/context-menu.cjs.js.map +1 -1
  98. package/lib/modules/mind-map/modules/control-panel.cjs.js +7 -9
  99. package/lib/modules/mind-map/modules/control-panel.cjs.js.map +1 -1
  100. package/lib/modules/shortcut-key/index.cjs.js +4 -4
  101. package/lib/modules/shortcut-key/index.cjs.js.map +1 -1
  102. package/lib/modules/table-up/index.cjs.js +23 -33
  103. package/lib/modules/table-up/index.cjs.js.map +1 -1
  104. package/lib/modules/toolbar/toolbar-tip.cjs.js +26 -4
  105. package/lib/modules/toolbar/toolbar-tip.cjs.js.map +1 -1
  106. package/lib/themes/snow.cjs.js +20 -3
  107. package/lib/themes/snow.cjs.js.map +1 -1
  108. package/package.json +4 -2
  109. package/style.css +176 -144
  110. package/types/config/editor.config.d.ts +4 -2
  111. package/types/config/editor.utils.d.ts +8 -0
  112. package/types/config/i18n/en-us.d.ts +4 -1
  113. package/types/config/i18n/zh-cn.d.ts +4 -1
  114. package/types/config/types/editor-modules.interface.d.ts +3 -2
  115. package/types/core/fluent-editor.d.ts +1 -1
  116. package/types/modules/custom-clipboard.d.ts +2 -0
  117. package/types/modules/custom-image/index.d.ts +1 -1
  118. package/types/modules/custom-image/preview/preview-modal.d.ts +1 -0
  119. package/types/modules/flow-chart/i18n/index.d.ts +1 -1
  120. package/types/modules/index.d.ts +2 -1
  121. package/types/modules/link/modules/tooltip.d.ts +1 -0
  122. package/types/modules/mind-map/i18n/index.d.ts +1 -1
  123. package/types/modules/table-up/index.d.ts +3 -26
  124. package/es/modules/i18n.es.js +0 -62
  125. package/es/modules/i18n.es.js.map +0 -1
  126. package/lib/modules/i18n.cjs.js +0 -62
  127. package/lib/modules/i18n.cjs.js.map +0 -1
  128. package/types/modules/i18n.d.ts +0 -14
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opentiny/fluent-editor",
3
3
  "type": "module",
4
- "version": "4.1.0",
4
+ "version": "4.1.2",
5
5
  "description": "A rich text editor based on Quill 2.0, which extends rich modules and formats on the basis of Quill. It's powerful and out-of-the-box.",
6
6
  "author": "OpenTiny Team",
7
7
  "license": "MIT",
@@ -29,7 +29,9 @@
29
29
  "dependencies": {
30
30
  "quill": "^2.0.0",
31
31
  "quill-easy-color": "^0.0.10",
32
- "quill-shortcut-key": "^0.0.5"
32
+ "quill-i18n": "^0.2.0",
33
+ "quill-shortcut-key": "^0.2.1",
34
+ "quill-table-up": "^3.5.0"
33
35
  },
34
36
  "exports": {
35
37
  ".": {
package/style.css CHANGED
@@ -81,7 +81,7 @@ html.dark .toolbar-tip__tooltip {
81
81
  .ql-editor s {
82
82
  text-decoration: line-through;
83
83
  }
84
- .ql-editor u.ql-custom-strike {
84
+ .ql-editor s.ql-custom-strike {
85
85
  text-decoration: line-through;
86
86
  }
87
87
  .ql-editor u {
@@ -101,9 +101,6 @@ html.dark .toolbar-tip__tooltip {
101
101
  position: absolute;
102
102
  color: #000;
103
103
  }
104
- .ql-editor li > .ql-ui {
105
- bottom: 0;
106
- }
107
104
  .ql-editor li::before {
108
105
  display: inline-block;
109
106
  margin-left: -1.5em;
@@ -128,6 +125,9 @@ html.dark .toolbar-tip__tooltip {
128
125
  .ql-editor li.ordered.ql-indent-1::before {
129
126
  content: counter(list-1, lower-alpha) ". ";
130
127
  }
128
+ .ql-editor li.ql-indent-1 .ql-ui:before {
129
+ content: counter(list-1, decimal) ". " !important;
130
+ }
131
131
  .ql-editor li.ordered.ql-indent-1 {
132
132
  counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
133
133
  }
@@ -137,6 +137,9 @@ html.dark .toolbar-tip__tooltip {
137
137
  .ql-editor li.ordered.ql-indent-2::before {
138
138
  content: counter(list-2, lower-roman) ". ";
139
139
  }
140
+ .ql-editor li.ql-indent-2 .ql-ui:before {
141
+ content: counter(list-2, decimal) ". " !important;
142
+ }
140
143
  .ql-editor li.ordered.ql-indent-2 {
141
144
  counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
142
145
  }
@@ -146,6 +149,9 @@ html.dark .toolbar-tip__tooltip {
146
149
  .ql-editor li.ordered.ql-indent-3::before {
147
150
  content: counter(list-3, decimal) ". ";
148
151
  }
152
+ .ql-editor li.ql-indent-3 .ql-ui:before {
153
+ content: counter(list-3, decimal) ". " !important;
154
+ }
149
155
  .ql-editor li.ordered.ql-indent-3 {
150
156
  counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
151
157
  }
@@ -155,6 +161,9 @@ html.dark .toolbar-tip__tooltip {
155
161
  .ql-editor li.ordered.ql-indent-4::before {
156
162
  content: counter(list-4, lower-alpha) ". ";
157
163
  }
164
+ .ql-editor li.ql-indent-4 .ql-ui:before {
165
+ content: counter(list-4, decimal) ". " !important;
166
+ }
158
167
  .ql-editor li.ordered.ql-indent-4 {
159
168
  counter-reset: list-5 list-6 list-7 list-8 list-9;
160
169
  }
@@ -164,6 +173,9 @@ html.dark .toolbar-tip__tooltip {
164
173
  .ql-editor li.ordered.ql-indent-5::before {
165
174
  content: counter(list-5, lower-roman) ". ";
166
175
  }
176
+ .ql-editor li.ql-indent-5 .ql-ui:before {
177
+ content: counter(list-5, decimal) ". " !important;
178
+ }
167
179
  .ql-editor li.ordered.ql-indent-5 {
168
180
  counter-reset: list-6 list-7 list-8 list-9;
169
181
  }
@@ -173,6 +185,9 @@ html.dark .toolbar-tip__tooltip {
173
185
  .ql-editor li.ordered.ql-indent-6::before {
174
186
  content: counter(list-6, decimal) ". ";
175
187
  }
188
+ .ql-editor li.ql-indent-6 .ql-ui:before {
189
+ content: counter(list-6, decimal) ". " !important;
190
+ }
176
191
  .ql-editor li.ordered.ql-indent-6 {
177
192
  counter-reset: list-7 list-8 list-9;
178
193
  }
@@ -182,6 +197,9 @@ html.dark .toolbar-tip__tooltip {
182
197
  .ql-editor li.ordered.ql-indent-7::before {
183
198
  content: counter(list-7, lower-alpha) ". ";
184
199
  }
200
+ .ql-editor li.ql-indent-7 .ql-ui:before {
201
+ content: counter(list-7, decimal) ". " !important;
202
+ }
185
203
  .ql-editor li.ordered.ql-indent-7 {
186
204
  counter-reset: list-8 list-9;
187
205
  }
@@ -191,6 +209,9 @@ html.dark .toolbar-tip__tooltip {
191
209
  .ql-editor li.ordered.ql-indent-8::before {
192
210
  content: counter(list-8, lower-roman) ". ";
193
211
  }
212
+ .ql-editor li.ql-indent-8 .ql-ui:before {
213
+ content: counter(list-8, decimal) ". " !important;
214
+ }
194
215
  .ql-editor li.ordered.ql-indent-8 {
195
216
  counter-reset: list-9;
196
217
  }
@@ -200,6 +221,9 @@ html.dark .toolbar-tip__tooltip {
200
221
  .ql-editor li.ordered.ql-indent-9::before {
201
222
  content: counter(list-9, decimal) ". ";
202
223
  }
224
+ .ql-editor li.ql-indent-9 .ql-ui:before {
225
+ content: counter(list-9, decimal) ". " !important;
226
+ }
203
227
  .ql-editor li.ql-direction-rtl::before, .ql-editor li.ql-direction-rtl.checked > .ql-ui, .ql-editor li.ql-direction-rtl.unchecked > .ql-ui {
204
228
  margin-left: 0.3em;
205
229
  margin-right: -1.5em;
@@ -671,107 +695,6 @@ li.unchecked > .ql-ui {
671
695
  }
672
696
 
673
697
  /* 图片预览 */
674
- .ql-snow .ql-tooltip {
675
- position: absolute;
676
- transform: translateY(10px);
677
- background-color: #fff;
678
- border: 1px solid #adb0b8;
679
- box-shadow: 0 2px 8px 0 rgba(37, 43, 58, 0.2);
680
- color: #252b3a;
681
- padding: 5px 3px;
682
- white-space: nowrap;
683
- z-index: 1;
684
- }
685
- .ql-snow .ql-tooltip[data-mode=link]::before {
686
- content: none;
687
- }
688
- .ql-snow .ql-tooltip.ql-flip {
689
- transform: translateY(-10px);
690
- }
691
- .ql-snow .ql-tooltip.ql-editing input[type=text] {
692
- display: inline-block;
693
- }
694
- .ql-snow .ql-tooltip.ql-editing a.ql-remove,
695
- .ql-snow .ql-tooltip.ql-editing a.ql-preview {
696
- display: inline-block !important;
697
- }
698
- .ql-snow .ql-tooltip.ql-editing a.ql-remove::before,
699
- .ql-snow .ql-tooltip.ql-editing a.ql-preview::before {
700
- content: none;
701
- }
702
- .ql-snow .ql-tooltip input[type=text] {
703
- display: none;
704
- border: 0;
705
- outline: none;
706
- font-size: 13px;
707
- height: 28px;
708
- margin: 0;
709
- padding: 0 6px;
710
- width: 200px;
711
- background-color: #fff;
712
- }
713
- .ql-snow .ql-tooltip .ql-split {
714
- width: 1px;
715
- height: 16px;
716
- line-height: 16px;
717
- margin: 6px 4px 6px 12px;
718
- border-left: 1px solid #adb0b8;
719
- display: inline-block;
720
- vertical-align: bottom;
721
- }
722
- .ql-snow .ql-tooltip .ql-preview .icon-share {
723
- display: block;
724
- font-size: 16px;
725
- color: #252b3a;
726
- line-height: 28px;
727
- font-family: "iconfont" !important;
728
- font-size: 16px;
729
- font-style: normal;
730
- -webkit-font-smoothing: antialiased;
731
- -moz-osx-font-smoothing: grayscale;
732
- }
733
- .ql-snow .ql-tooltip .ql-preview .icon-share::before {
734
- content: "\e683";
735
- }
736
- .ql-snow .ql-tooltip .ql-remove .icon-delete {
737
- display: block;
738
- font-size: 16px;
739
- color: #252b3a;
740
- line-height: 28px;
741
- font-family: "iconfont" !important;
742
- font-size: 16px;
743
- font-style: normal;
744
- -webkit-font-smoothing: antialiased;
745
- -moz-osx-font-smoothing: grayscale;
746
- }
747
- .ql-snow .ql-tooltip .ql-remove .icon-delete::before {
748
- content: "\ec45";
749
- }
750
- .ql-snow .ql-tooltip a {
751
- line-height: 28px;
752
- margin: 0 3px;
753
- padding: 0 3px;
754
- min-width: 28px;
755
- display: inline-block;
756
- text-align: center;
757
- color: #babbc0;
758
- border-radius: 2px 2px;
759
- text-decoration: none;
760
- -webkit-transition: background-color 0.3s ease-in-out;
761
- transition: background-color 0.3s ease-in-out;
762
- cursor: pointer;
763
- vertical-align: bottom;
764
- }
765
- .ql-snow .ql-tooltip a i {
766
- display: block;
767
- font-size: 16px;
768
- color: #babbc0;
769
- line-height: 28px;
770
- }
771
- .ql-snow .ql-tooltip a:hover {
772
- background-color: #949597;
773
- }
774
-
775
698
  :-webkit-full-screen {
776
699
  background-color: white !important;
777
700
  }
@@ -2459,14 +2382,14 @@ li.unchecked > .ql-ui {
2459
2382
  --qsf-menu-break-color-active:#f4f4f5;
2460
2383
  --qsf-menu-text-color-active:#18181b;
2461
2384
  --qsf-menu-hint-color:#8a8f8d;
2462
- width: 240px;
2463
- max-height: 370px;
2464
- padding: 4px;
2465
- border: 1px solid var(--qsf-menu-border-color);
2466
- border-radius: 6px;
2385
+ width: 15rem;
2386
+ max-height: 23.125rem;
2387
+ padding: 0.25rem;
2388
+ border: 0.0625rem solid var(--qsf-menu-border-color);
2389
+ border-radius: 0.375rem;
2467
2390
  background-color: var(--qsf-menu-bg-color);
2468
2391
  color: var(--qsf-menu-text-color);
2469
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
2392
+ box-shadow: 0 0.25rem 0.375rem -0.0625rem rgba(0, 0, 0, 0.1), 0 0.125rem 0.25rem -0.125rem rgba(0, 0, 0, 0.1);
2470
2393
  opacity: 1;
2471
2394
  transition-property: opacity, transform;
2472
2395
  transition-duration: 0.15s;
@@ -2478,10 +2401,10 @@ li.unchecked > .ql-ui {
2478
2401
  box-sizing: content-box;
2479
2402
  display: block;
2480
2403
  content: "暂无匹配的内容";
2481
- height: 22px;
2482
- line-height: 22px;
2483
- padding: 10px 0;
2484
- font-size: 14px;
2404
+ height: 1.375rem;
2405
+ line-height: 1.375rem;
2406
+ padding: 0.625rem 0;
2407
+ font-size: 0.875rem;
2485
2408
  color: var(--qsf-menu-hint-color);
2486
2409
  text-align: center;
2487
2410
  }
@@ -2493,12 +2416,12 @@ li.unchecked > .ql-ui {
2493
2416
  .qsf-menu__item {
2494
2417
  display: flex;
2495
2418
  align-items: center;
2496
- gap: 10px;
2497
- margin-bottom: 6px;
2498
- padding: 6px 8px;
2499
- border-radius: 6px;
2500
- font-size: 14px;
2501
- line-height: 20px;
2419
+ gap: 0.625rem;
2420
+ margin-bottom: 0.375rem;
2421
+ padding: 0.375rem 0.5rem;
2422
+ border-radius: 0.375rem;
2423
+ font-size: 0.875rem;
2424
+ line-height: 1.25rem;
2502
2425
  transition-property: background-color, color;
2503
2426
  transition-duration: 0.15s;
2504
2427
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@@ -2524,8 +2447,8 @@ li.unchecked > .ql-ui {
2524
2447
  }
2525
2448
 
2526
2449
  .qsf-menu__item.is-break {
2527
- height: 1px;
2528
- margin: 4px -4px;
2450
+ height: 0.0625rem;
2451
+ margin: 0.25rem -0.25rem;
2529
2452
  padding: 0;
2530
2453
  background-color: var(--qsf-menu-break-bg-color-active);
2531
2454
  }
@@ -2545,15 +2468,15 @@ li.unchecked > .ql-ui {
2545
2468
  display: flex;
2546
2469
  justify-content: center;
2547
2470
  align-items: center;
2548
- width: 36px;
2549
- height: 36px;
2550
- margin-right: 8px;
2551
- border-radius: 8px;
2552
- border: 1px solid #ccc;
2471
+ width: 2.25rem;
2472
+ height: 2.25rem;
2473
+ margin-right: 0.5rem;
2474
+ border-radius: 0.5rem;
2475
+ border: 0.0625rem solid #ccc;
2553
2476
  }
2554
2477
 
2555
2478
  .qsf-menu__item-icon .qsf-menu__icon {
2556
- font-size: 26px;
2479
+ font-size: 1.625rem;
2557
2480
  stroke: #444;
2558
2481
  }
2559
2482
 
@@ -2567,20 +2490,20 @@ li.unchecked > .ql-ui {
2567
2490
 
2568
2491
  .qsf-menu__item-title {
2569
2492
  width: 100%;
2570
- font-size: 14px;
2571
- line-height: 18px;
2493
+ font-size: 0.875rem;
2494
+ line-height: 1.125rem;
2572
2495
  }
2573
2496
 
2574
2497
  .qsf-menu__item-hint {
2575
2498
  float: right;
2576
- font-size: 12px;
2577
- line-height: 18px;
2499
+ font-size: 0.75rem;
2500
+ line-height: 1.125rem;
2578
2501
  color: var(--qsf-menu-hint-color);
2579
2502
  }
2580
2503
 
2581
2504
  .qsf-menu__item-descriptions {
2582
- font-size: 12px;
2583
- line-height: 18px;
2505
+ font-size: 0.75rem;
2506
+ line-height: 1.125rem;
2584
2507
  color: var(--qsf-menu-hint-color);
2585
2508
  }
2586
2509
 
@@ -2591,7 +2514,7 @@ li.unchecked > .ql-ui {
2591
2514
  justify-content: center;
2592
2515
  width: 1em;
2593
2516
  height: 1em;
2594
- font-size: 20px;
2517
+ font-size: 1.25rem;
2595
2518
  }
2596
2519
 
2597
2520
  .qsf-menu__icon.is-arrow {
@@ -2607,12 +2530,7 @@ li.unchecked > .ql-ui {
2607
2530
 
2608
2531
  .qsf-placeholder {
2609
2532
  position: absolute;
2610
- font-size: 14px;
2611
- line-height: 1.42;
2612
- -webkit-user-select: none;
2613
- -moz-user-select: none;
2614
- user-select: none;
2615
- pointer-events: none;
2533
+ font-size: 0.875rem;
2616
2534
  }
2617
2535
 
2618
2536
  .qsf-placeholder.is-hidden {
@@ -2621,9 +2539,9 @@ li.unchecked > .ql-ui {
2621
2539
 
2622
2540
  .qsf-placeholder::before {
2623
2541
  content: attr(data-placeholder);
2624
- padding: 0 4px;
2542
+ padding: 0 0.25rem;
2625
2543
  white-space: nowrap;
2626
- font-size: 14px;
2544
+ font-size: 0.875rem;
2627
2545
  color: #d8dad9;
2628
2546
  }
2629
2547
 
@@ -2631,6 +2549,19 @@ li.unchecked > .ql-ui {
2631
2549
  transform: translateX(-100%);
2632
2550
  }
2633
2551
 
2552
+ .qsf-placeholder__wrapper {
2553
+ position: absolute;
2554
+ top: 0;
2555
+ left: 0;
2556
+ width: 100%;
2557
+ height: 100%;
2558
+ -webkit-user-select: none;
2559
+ -moz-user-select: none;
2560
+ user-select: none;
2561
+ pointer-events: none;
2562
+ overflow: hidden;
2563
+ }
2564
+
2634
2565
  .ql-editor.ql-blank::before {
2635
2566
  content: none;
2636
2567
  }
@@ -3469,4 +3400,105 @@ li.unchecked > .ql-ui {
3469
3400
  }
3470
3401
  .image-preview__overlay .icon-maxmize:before {
3471
3402
  content: url('data:image/svg+xml;utf8,<svg t="1642681601748" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2834" width="20" height="20"><path d="M460.8 940.8h-320l262.4-262.4c12.8-12.8 12.8-38.4 0-51.2-12.8-19.2-38.4-19.2-57.6 0l-262.4 262.4v-345.6c0-19.2-19.2-38.4-38.4-38.4s-38.4 19.2-38.4 38.4v364.8c0 51.2 38.4 115.2 96 115.2h358.4c19.2 0 38.4-19.2 38.4-38.4 0-25.6-19.2-44.8-38.4-44.8zM940.8 6.4h-377.6c-19.2 0-38.4 19.2-38.4 38.4s19.2 38.4 38.4 38.4h320l-268.8 262.4c-12.8 12.8-12.8 38.4 0 57.6 19.2 12.8 44.8 12.8 57.6 0l262.4-262.4v320c0 19.2 19.2 38.4 38.4 38.4s38.4-19.2 38.4-38.4v-352c6.4-64-25.6-102.4-70.4-102.4z" p-id="2835"></path></svg>');
3403
+ }
3404
+
3405
+ .ql-snow .ql-tooltip {
3406
+ position: absolute;
3407
+ transform: translateY(10px);
3408
+ background-color: #fff;
3409
+ border: 1px solid #adb0b8;
3410
+ box-shadow: 0 2px 8px 0 rgba(37, 43, 58, 0.2);
3411
+ color: #252b3a;
3412
+ padding: 5px 3px;
3413
+ white-space: nowrap;
3414
+ z-index: 1;
3415
+ }
3416
+ .ql-snow .ql-tooltip[data-mode=link]::before {
3417
+ content: attr(data-before-title);
3418
+ }
3419
+ .ql-snow .ql-tooltip.ql-flip {
3420
+ transform: translateY(-10px);
3421
+ }
3422
+ .ql-snow .ql-tooltip.ql-editing input[type=text] {
3423
+ display: inline-block;
3424
+ }
3425
+ .ql-snow .ql-tooltip.ql-editing a.ql-remove,
3426
+ .ql-snow .ql-tooltip.ql-editing a.ql-preview {
3427
+ display: inline-block !important;
3428
+ }
3429
+ .ql-snow .ql-tooltip.ql-editing a.ql-remove::before,
3430
+ .ql-snow .ql-tooltip.ql-editing a.ql-preview::before {
3431
+ content: none;
3432
+ }
3433
+ .ql-snow .ql-tooltip input[type=text] {
3434
+ display: none;
3435
+ border: 0;
3436
+ outline: none;
3437
+ font-size: 13px;
3438
+ height: 28px;
3439
+ margin: 0;
3440
+ padding: 0 6px;
3441
+ width: 200px;
3442
+ background-color: #fff;
3443
+ }
3444
+ .ql-snow .ql-tooltip .ql-split {
3445
+ width: 1px;
3446
+ height: 16px;
3447
+ line-height: 16px;
3448
+ margin: 6px 4px 6px 12px;
3449
+ border-left: 1px solid #adb0b8;
3450
+ display: inline-block;
3451
+ vertical-align: bottom;
3452
+ }
3453
+ .ql-snow .ql-tooltip .ql-preview .icon-share {
3454
+ display: block;
3455
+ font-size: 16px;
3456
+ color: #252b3a;
3457
+ line-height: 28px;
3458
+ font-family: "iconfont" !important;
3459
+ font-size: 16px;
3460
+ font-style: normal;
3461
+ -webkit-font-smoothing: antialiased;
3462
+ -moz-osx-font-smoothing: grayscale;
3463
+ }
3464
+ .ql-snow .ql-tooltip .ql-preview .icon-share::before {
3465
+ content: "\e683";
3466
+ }
3467
+ .ql-snow .ql-tooltip .ql-remove .icon-delete {
3468
+ display: block;
3469
+ font-size: 16px;
3470
+ color: #252b3a;
3471
+ line-height: 28px;
3472
+ font-family: "iconfont" !important;
3473
+ font-size: 16px;
3474
+ font-style: normal;
3475
+ -webkit-font-smoothing: antialiased;
3476
+ -moz-osx-font-smoothing: grayscale;
3477
+ }
3478
+ .ql-snow .ql-tooltip .ql-remove .icon-delete::before {
3479
+ content: "\ec45";
3480
+ }
3481
+ .ql-snow .ql-tooltip a {
3482
+ line-height: 28px;
3483
+ margin: 0 3px;
3484
+ padding: 0 3px;
3485
+ min-width: 28px;
3486
+ display: inline-block;
3487
+ text-align: center;
3488
+ color: #babbc0;
3489
+ border-radius: 2px 2px;
3490
+ text-decoration: none;
3491
+ -webkit-transition: background-color 0.3s ease-in-out;
3492
+ transition: background-color 0.3s ease-in-out;
3493
+ cursor: pointer;
3494
+ vertical-align: bottom;
3495
+ }
3496
+ .ql-snow .ql-tooltip a i {
3497
+ display: block;
3498
+ font-size: 16px;
3499
+ color: #babbc0;
3500
+ line-height: 28px;
3501
+ }
3502
+ .ql-snow .ql-tooltip a:hover {
3503
+ background-color: #949597;
3472
3504
  }
@@ -40,9 +40,11 @@ export declare const FULL_TOOLBAR: (({
40
40
  } | {
41
41
  background: any[];
42
42
  color?: undefined;
43
- })[] | {
43
+ })[] | ({
44
+ align: string[];
45
+ } | {
44
46
  align: string;
45
- }[] | {
47
+ })[] | {
46
48
  list: string;
47
49
  }[] | {
48
50
  script: string;
@@ -25,6 +25,14 @@ export declare function omit(obj: any, uselessKeys: any): {};
25
25
  * @return 替换之后的delta
26
26
  */
27
27
  export declare function replaceDeltaImage(delta: any, imageUrls: any, imagePlaceholder: any): any;
28
+ /**
29
+ * 将连续空格转为不间断空格,以便 innerHTML 输出 &nbsp; 并在预览中保留间距。
30
+ * - 行首空白:全部转为 \u00A0
31
+ * - 正文内连续空白:保留第一个普通空格,其余转为 \u00A0
32
+ */
33
+ export declare function replaceStrWhiteSpace(str: string): string;
34
+ /** 空格键是否应插入不间断空格(与 replaceStrWhiteSpace 规则一致) */
35
+ export declare function shouldInsertNbspOnSpace(prefix: string): boolean;
28
36
  export declare function splitWithBreak(insertContent: string): any[];
29
37
  /**
30
38
  * getEventComposedPath
@@ -60,7 +60,10 @@ export declare const EN_US: {
60
60
  file: string;
61
61
  'mind-map': string;
62
62
  'flow-chart': string;
63
- link: string;
63
+ link: {
64
+ '': string;
65
+ 'enter-link': string;
66
+ };
64
67
  code: string;
65
68
  table: string;
66
69
  'table-up': string;
@@ -60,7 +60,10 @@ export declare const ZH_CN: {
60
60
  file: string;
61
61
  'mind-map': string;
62
62
  'flow-chart': string;
63
- link: string;
63
+ link: {
64
+ '': string;
65
+ 'enter-link': string;
66
+ };
64
67
  divider: string;
65
68
  code: string;
66
69
  table: string;
@@ -1,5 +1,6 @@
1
+ import { I18nOptions } from 'quill-i18n';
1
2
  import { ToolbarProps } from 'quill/modules/toolbar';
2
- import { I18NOptions, ICounterOption, MentionOption, ShortCutKeyInputOptions } from '../../modules';
3
+ import { ICounterOption, MentionOption, ShortCutKeyInputOptions } from '../../modules';
3
4
  import { BlotFormatterOptionsInput } from '../../modules/custom-image/options';
4
5
  import { FileUploaderOptions } from '../../modules/custom-uploader';
5
6
  import { EmojiModuleOptions } from '../../modules/emoji';
@@ -34,7 +35,7 @@ export interface IEditorModules {
34
35
  'uploader'?: boolean | Partial<FileUploaderOptions>;
35
36
  'shortcut-key'?: boolean | Partial<ShortCutKeyInputOptions>;
36
37
  'mention'?: boolean | MentionOption;
37
- 'i18n'?: boolean | Partial<I18NOptions>;
38
+ 'i18n'?: boolean | Partial<I18nOptions>;
38
39
  'counter'?: boolean | ICounterOption;
39
40
  'emoji'?: boolean | EmojiModuleOptions;
40
41
  'file'?: boolean;
@@ -8,6 +8,6 @@ declare class FluentEditor extends Quill {
8
8
  static register(...args: any[]): void;
9
9
  get lang(): string;
10
10
  constructor(container: HTMLElement | string, options?: IEditorConfig);
11
- getLangText(name: string): string;
11
+ getLangText(name: string, params?: Record<string, any>, defaultValue?: string): string;
12
12
  }
13
13
  export default FluentEditor;
@@ -3,6 +3,8 @@ import { default as FluentEditor } from '../fluent-editor';
3
3
  declare const Clipboard: typeof TypeClipboard;
4
4
  export declare class CustomClipboard extends Clipboard {
5
5
  quill: FluentEditor;
6
+ quill: FluentEditor;
7
+ constructor(quill: FluentEditor);
6
8
  prepareMatching(container: HTMLElement, nodeMatches: any): any[][];
7
9
  onCaptureCopy(e: any, isCut?: boolean): void;
8
10
  onCapturePaste(e: ClipboardEvent): void;
@@ -1,5 +1,5 @@
1
1
  export * from './actions';
2
2
  export * from './blot-formatter';
3
3
  export * from './image';
4
- export * from './specs';
5
4
  export * from './preview';
5
+ export * from './specs';
@@ -7,6 +7,7 @@ export declare class ImagePreviewModal {
7
7
  private overlay;
8
8
  private previewImage;
9
9
  private scaleTooltip;
10
+ private closeBtn;
10
11
  private currentScale;
11
12
  private minScale;
12
13
  private maxScale;
@@ -1 +1 @@
1
- export declare function registerFlowChartI18N(I18N: any): void;
1
+ export declare function registerFlowChartI18N(i18nModule: any): void;
@@ -7,7 +7,6 @@ export * from './divider';
7
7
  export * from './emoji';
8
8
  export * from './file';
9
9
  export * from './flow-chart';
10
- export * from './i18n';
11
10
  export * from './link';
12
11
  export * from './mathlive';
13
12
  export * from './mention';
@@ -16,3 +15,5 @@ export * from './shortcut-key';
16
15
  export * from './syntax';
17
16
  export * from './table-up';
18
17
  export * from './toolbar';
18
+ export * from 'quill-i18n';
19
+ export * from 'quill-shortcut-key';
@@ -19,6 +19,7 @@ export declare class LinkTooltip extends BaseTooltip {
19
19
  handleMouseLeave(): void;
20
20
  handleMouseEnter(event: MouseEvent): void;
21
21
  listen(): void;
22
+ bindRootEvents(): void;
22
23
  save(): void;
23
24
  position(reference: any): number;
24
25
  edit(mode: string, preview: any, range: any): void;
@@ -1 +1 @@
1
- export declare function registerMindMapI18N(I18N: any): void;
1
+ export declare function registerMindMapI18N(i18nModule: any): void;
@@ -4,31 +4,8 @@ export declare function generateTableUp(QuillTableUp: Constructor): {
4
4
  new (quill: FluentEditor, options: Partial<any>): {
5
5
  [x: string]: any;
6
6
  quill: FluentEditor;
7
- resolveTexts(options?: Record<string, string>): {
8
- fullCheckboxText: string;
9
- customBtnText: string;
10
- confirmText: string;
11
- cancelText: string;
12
- rowText: string;
13
- colText: string;
14
- notPositiveNumberError: string;
15
- custom: string;
16
- clear: string;
17
- transparent: string;
18
- perWidthInsufficient: string;
19
- CopyCell: string;
20
- CutCell: string;
21
- InsertTop: string;
22
- InsertRight: string;
23
- InsertBottom: string;
24
- InsertLeft: string;
25
- MergeCell: string;
26
- SplitCell: string;
27
- DeleteRow: string;
28
- DeleteColumn: string;
29
- DeleteTable: string;
30
- BackgroundColor: string;
31
- BorderColor: string;
32
- } & Record<string, string>;
7
+ resolveOptions(options?: Partial<any>): any;
8
+ resolveTexts(options?: Record<string, string> | ((key: string) => string)): any;
9
+ createTextResolver(options?: Record<string, string> | ((key: string) => string)): (key: string) => any;
33
10
  };
34
11
  };