@opentiny/fluent-editor 3.25.4 → 4.0.0-alpha.1

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 (247) hide show
  1. package/es/attributors/font-style.es.js +1 -1
  2. package/es/attributors/font-style.es.js.map +1 -1
  3. package/es/attributors/line-height.es.js +1 -1
  4. package/es/attributors/line-height.es.js.map +1 -1
  5. package/es/config/editor.config.es.js +0 -7
  6. package/es/config/editor.config.es.js.map +1 -1
  7. package/es/config/editor.utils.es.js +0 -9
  8. package/es/config/editor.utils.es.js.map +1 -1
  9. package/es/config/i18n/en-us.es.js +33 -17
  10. package/es/config/i18n/en-us.es.js.map +1 -1
  11. package/es/config/i18n/zh-cn.es.js +33 -17
  12. package/es/config/i18n/zh-cn.es.js.map +1 -1
  13. package/es/config/index.es.js +7 -13
  14. package/es/config/index.es.js.map +1 -1
  15. package/es/core/fluent-editor.es.js +6 -4
  16. package/es/core/fluent-editor.es.js.map +1 -1
  17. package/es/fluent-editor.es.js +24 -12
  18. package/es/fluent-editor.es.js.map +1 -1
  19. package/es/formats/video.es.js +2 -2
  20. package/es/formats/video.es.js.map +1 -1
  21. package/es/index.es.js +8 -4
  22. package/es/index.es.js.map +1 -1
  23. package/es/modules/custom-clipboard.es.js +3 -61
  24. package/es/modules/custom-clipboard.es.js.map +1 -1
  25. package/es/modules/custom-image/BlotFormatter.es.js +1 -2
  26. package/es/modules/custom-image/BlotFormatter.es.js.map +1 -1
  27. package/es/modules/custom-image/image.es.js +4 -16
  28. package/es/modules/custom-image/image.es.js.map +1 -1
  29. package/es/modules/custom-uploader.es.js +60 -193
  30. package/es/modules/custom-uploader.es.js.map +1 -1
  31. package/es/modules/file/formats/file.es.js +12 -14
  32. package/es/modules/file/formats/file.es.js.map +1 -1
  33. package/es/modules/file/index.es.js +6 -7
  34. package/es/modules/file/index.es.js.map +1 -1
  35. package/es/modules/i18n.es.js +32 -12
  36. package/es/modules/i18n.es.js.map +1 -1
  37. package/es/modules/link/index.es.js +0 -17
  38. package/es/modules/link/index.es.js.map +1 -1
  39. package/es/modules/link/modules/tooltip.es.js +3 -2
  40. package/es/modules/link/modules/tooltip.es.js.map +1 -1
  41. package/es/modules/shortcut-key/index.es.js +229 -0
  42. package/es/modules/shortcut-key/index.es.js.map +1 -0
  43. package/es/modules/table-up/index.es.js +64 -0
  44. package/es/modules/table-up/index.es.js.map +1 -0
  45. package/es/modules/toolbar/better-picker.es.js +21 -269
  46. package/es/modules/toolbar/better-picker.es.js.map +1 -1
  47. package/es/modules/toolbar/index.es.js +0 -1
  48. package/es/modules/toolbar/index.es.js.map +1 -1
  49. package/es/modules/toolbar/toolbar-tip.es.js +44 -9
  50. package/es/modules/toolbar/toolbar-tip.es.js.map +1 -1
  51. package/es/themes/snow.es.js +198 -50
  52. package/es/themes/snow.es.js.map +1 -1
  53. package/es/ui/icons.config.es.js +6 -5
  54. package/es/ui/icons.config.es.js.map +1 -1
  55. package/es/ui/icons.es.js +3 -12
  56. package/es/ui/icons.es.js.map +1 -1
  57. package/es/utils/is.es.js +4 -0
  58. package/es/utils/is.es.js.map +1 -1
  59. package/lib/attributors/font-style.cjs.js +1 -1
  60. package/lib/attributors/font-style.cjs.js.map +1 -1
  61. package/lib/attributors/line-height.cjs.js +1 -1
  62. package/lib/attributors/line-height.cjs.js.map +1 -1
  63. package/lib/config/editor.config.cjs.js +0 -7
  64. package/lib/config/editor.config.cjs.js.map +1 -1
  65. package/lib/config/editor.utils.cjs.js +0 -9
  66. package/lib/config/editor.utils.cjs.js.map +1 -1
  67. package/lib/config/i18n/en-us.cjs.js +33 -17
  68. package/lib/config/i18n/en-us.cjs.js.map +1 -1
  69. package/lib/config/i18n/zh-cn.cjs.js +33 -17
  70. package/lib/config/i18n/zh-cn.cjs.js.map +1 -1
  71. package/lib/config/index.cjs.js +5 -11
  72. package/lib/config/index.cjs.js.map +1 -1
  73. package/lib/core/fluent-editor.cjs.js +5 -3
  74. package/lib/core/fluent-editor.cjs.js.map +1 -1
  75. package/lib/fluent-editor.cjs.js +23 -11
  76. package/lib/fluent-editor.cjs.js.map +1 -1
  77. package/lib/formats/video.cjs.js +2 -2
  78. package/lib/formats/video.cjs.js.map +1 -1
  79. package/lib/index.cjs.js +9 -2
  80. package/lib/index.cjs.js.map +1 -1
  81. package/lib/modules/custom-clipboard.cjs.js +2 -60
  82. package/lib/modules/custom-clipboard.cjs.js.map +1 -1
  83. package/lib/modules/custom-image/BlotFormatter.cjs.js +0 -1
  84. package/lib/modules/custom-image/BlotFormatter.cjs.js.map +1 -1
  85. package/lib/modules/custom-image/image.cjs.js +4 -16
  86. package/lib/modules/custom-image/image.cjs.js.map +1 -1
  87. package/lib/modules/custom-uploader.cjs.js +61 -194
  88. package/lib/modules/custom-uploader.cjs.js.map +1 -1
  89. package/lib/modules/file/formats/file.cjs.js +12 -14
  90. package/lib/modules/file/formats/file.cjs.js.map +1 -1
  91. package/lib/modules/file/index.cjs.js +6 -7
  92. package/lib/modules/file/index.cjs.js.map +1 -1
  93. package/lib/modules/i18n.cjs.js +31 -11
  94. package/lib/modules/i18n.cjs.js.map +1 -1
  95. package/lib/modules/link/index.cjs.js +0 -17
  96. package/lib/modules/link/index.cjs.js.map +1 -1
  97. package/lib/modules/link/modules/tooltip.cjs.js +2 -1
  98. package/lib/modules/link/modules/tooltip.cjs.js.map +1 -1
  99. package/lib/modules/shortcut-key/index.cjs.js +229 -0
  100. package/lib/modules/shortcut-key/index.cjs.js.map +1 -0
  101. package/lib/modules/table-up/index.cjs.js +64 -0
  102. package/lib/modules/table-up/index.cjs.js.map +1 -0
  103. package/lib/modules/toolbar/better-picker.cjs.js +21 -270
  104. package/lib/modules/toolbar/better-picker.cjs.js.map +1 -1
  105. package/lib/modules/toolbar/index.cjs.js +0 -1
  106. package/lib/modules/toolbar/index.cjs.js.map +1 -1
  107. package/lib/modules/toolbar/toolbar-tip.cjs.js +44 -9
  108. package/lib/modules/toolbar/toolbar-tip.cjs.js.map +1 -1
  109. package/lib/themes/snow.cjs.js +200 -52
  110. package/lib/themes/snow.cjs.js.map +1 -1
  111. package/lib/ui/icons.cjs.js +2 -11
  112. package/lib/ui/icons.cjs.js.map +1 -1
  113. package/lib/ui/icons.config.cjs.js +6 -5
  114. package/lib/ui/icons.config.cjs.js.map +1 -1
  115. package/lib/utils/is.cjs.js +4 -0
  116. package/lib/utils/is.cjs.js.map +1 -1
  117. package/package.json +4 -2
  118. package/style.css +316 -2149
  119. package/types/attributors/font-style.d.ts +1 -1
  120. package/types/config/editor.config.d.ts +0 -218
  121. package/types/config/editor.utils.d.ts +0 -1
  122. package/types/config/i18n/en-us.d.ts +31 -16
  123. package/types/config/i18n/zh-cn.d.ts +31 -16
  124. package/types/config/index.d.ts +1 -1
  125. package/types/config/types/editor-config.interface.d.ts +0 -19
  126. package/types/config/types/editor-modules.interface.d.ts +2 -0
  127. package/types/config/types/toolbar-item.interface.d.ts +11 -11
  128. package/types/core/fluent-editor.d.ts +4 -1
  129. package/types/index.d.ts +3 -0
  130. package/types/modules/counter.d.ts +1 -1
  131. package/types/modules/custom-clipboard.d.ts +1 -1
  132. package/types/modules/custom-image/image.d.ts +8 -11
  133. package/types/modules/file/formats/file.d.ts +12 -8
  134. package/types/modules/file/index.d.ts +5 -5
  135. package/types/modules/i18n.d.ts +4 -4
  136. package/types/modules/shortcut-key/index.d.ts +68 -0
  137. package/types/modules/table-up/index.d.ts +66 -0
  138. package/types/modules/toolbar/better-picker.d.ts +15 -0
  139. package/types/themes/snow.d.ts +10 -2
  140. package/types/ui/icons.config.d.ts +2 -2
  141. package/types/utils/is.d.ts +2 -0
  142. package/es/modules/global-link/constants.es.js +0 -9
  143. package/es/modules/global-link/constants.es.js.map +0 -1
  144. package/es/modules/global-link/formats/customer-widget-link.es.js +0 -28
  145. package/es/modules/global-link/formats/customer-widget-link.es.js.map +0 -1
  146. package/es/modules/global-link/formats/doc-link.es.js +0 -42
  147. package/es/modules/global-link/formats/doc-link.es.js.map +0 -1
  148. package/es/modules/global-link/formats/wiki-link.es.js +0 -34
  149. package/es/modules/global-link/formats/wiki-link.es.js.map +0 -1
  150. package/es/modules/global-link/formats/work-item-link.es.js +0 -36
  151. package/es/modules/global-link/formats/work-item-link.es.js.map +0 -1
  152. package/es/modules/global-link/global-link-panel.es.js +0 -2
  153. package/es/modules/global-link/global-link-panel.es.js.map +0 -1
  154. package/es/modules/global-link/index.es.js +0 -139
  155. package/es/modules/global-link/index.es.js.map +0 -1
  156. package/es/modules/global-link/utils/createTable.es.js +0 -50
  157. package/es/modules/global-link/utils/createTable.es.js.map +0 -1
  158. package/es/modules/quick-menu.es.js +0 -82
  159. package/es/modules/quick-menu.es.js.map +0 -1
  160. package/es/modules/table/better-table.es.js +0 -485
  161. package/es/modules/table/better-table.es.js.map +0 -1
  162. package/es/modules/table/formats/header.es.js +0 -94
  163. package/es/modules/table/formats/header.es.js.map +0 -1
  164. package/es/modules/table/formats/list.es.js +0 -163
  165. package/es/modules/table/formats/list.es.js.map +0 -1
  166. package/es/modules/table/formats/table.es.js +0 -969
  167. package/es/modules/table/formats/table.es.js.map +0 -1
  168. package/es/modules/table/modules/table-column-tool.es.js +0 -400
  169. package/es/modules/table/modules/table-column-tool.es.js.map +0 -1
  170. package/es/modules/table/modules/table-operation-menu.es.js +0 -475
  171. package/es/modules/table/modules/table-operation-menu.es.js.map +0 -1
  172. package/es/modules/table/modules/table-scroll-bar.es.js +0 -190
  173. package/es/modules/table/modules/table-scroll-bar.es.js.map +0 -1
  174. package/es/modules/table/modules/table-selection.es.js +0 -305
  175. package/es/modules/table/modules/table-selection.es.js.map +0 -1
  176. package/es/modules/table/modules/table-selector.es.js +0 -158
  177. package/es/modules/table/modules/table-selector.es.js.map +0 -1
  178. package/es/modules/table/table-config.es.js +0 -74
  179. package/es/modules/table/table-config.es.js.map +0 -1
  180. package/es/modules/table/utils/index.es.js +0 -54
  181. package/es/modules/table/utils/index.es.js.map +0 -1
  182. package/es/modules/table/utils/node-matchers.es.js +0 -292
  183. package/es/modules/table/utils/node-matchers.es.js.map +0 -1
  184. package/lib/modules/global-link/constants.cjs.js +0 -9
  185. package/lib/modules/global-link/constants.cjs.js.map +0 -1
  186. package/lib/modules/global-link/formats/customer-widget-link.cjs.js +0 -28
  187. package/lib/modules/global-link/formats/customer-widget-link.cjs.js.map +0 -1
  188. package/lib/modules/global-link/formats/doc-link.cjs.js +0 -42
  189. package/lib/modules/global-link/formats/doc-link.cjs.js.map +0 -1
  190. package/lib/modules/global-link/formats/wiki-link.cjs.js +0 -34
  191. package/lib/modules/global-link/formats/wiki-link.cjs.js.map +0 -1
  192. package/lib/modules/global-link/formats/work-item-link.cjs.js +0 -36
  193. package/lib/modules/global-link/formats/work-item-link.cjs.js.map +0 -1
  194. package/lib/modules/global-link/global-link-panel.cjs.js +0 -2
  195. package/lib/modules/global-link/global-link-panel.cjs.js.map +0 -1
  196. package/lib/modules/global-link/index.cjs.js +0 -139
  197. package/lib/modules/global-link/index.cjs.js.map +0 -1
  198. package/lib/modules/global-link/utils/createTable.cjs.js +0 -50
  199. package/lib/modules/global-link/utils/createTable.cjs.js.map +0 -1
  200. package/lib/modules/quick-menu.cjs.js +0 -82
  201. package/lib/modules/quick-menu.cjs.js.map +0 -1
  202. package/lib/modules/table/better-table.cjs.js +0 -485
  203. package/lib/modules/table/better-table.cjs.js.map +0 -1
  204. package/lib/modules/table/formats/header.cjs.js +0 -94
  205. package/lib/modules/table/formats/header.cjs.js.map +0 -1
  206. package/lib/modules/table/formats/list.cjs.js +0 -163
  207. package/lib/modules/table/formats/list.cjs.js.map +0 -1
  208. package/lib/modules/table/formats/table.cjs.js +0 -969
  209. package/lib/modules/table/formats/table.cjs.js.map +0 -1
  210. package/lib/modules/table/modules/table-column-tool.cjs.js +0 -400
  211. package/lib/modules/table/modules/table-column-tool.cjs.js.map +0 -1
  212. package/lib/modules/table/modules/table-operation-menu.cjs.js +0 -475
  213. package/lib/modules/table/modules/table-operation-menu.cjs.js.map +0 -1
  214. package/lib/modules/table/modules/table-scroll-bar.cjs.js +0 -190
  215. package/lib/modules/table/modules/table-scroll-bar.cjs.js.map +0 -1
  216. package/lib/modules/table/modules/table-selection.cjs.js +0 -305
  217. package/lib/modules/table/modules/table-selection.cjs.js.map +0 -1
  218. package/lib/modules/table/modules/table-selector.cjs.js +0 -158
  219. package/lib/modules/table/modules/table-selector.cjs.js.map +0 -1
  220. package/lib/modules/table/table-config.cjs.js +0 -74
  221. package/lib/modules/table/table-config.cjs.js.map +0 -1
  222. package/lib/modules/table/utils/index.cjs.js +0 -54
  223. package/lib/modules/table/utils/index.cjs.js.map +0 -1
  224. package/lib/modules/table/utils/node-matchers.cjs.js +0 -292
  225. package/lib/modules/table/utils/node-matchers.cjs.js.map +0 -1
  226. package/types/modules/custom-uploader.d.ts +0 -31
  227. package/types/modules/global-link/constants.d.ts +0 -3
  228. package/types/modules/global-link/formats/customer-widget-link.d.ts +0 -14
  229. package/types/modules/global-link/formats/doc-link.d.ts +0 -17
  230. package/types/modules/global-link/formats/wiki-link.d.ts +0 -16
  231. package/types/modules/global-link/formats/work-item-link.d.ts +0 -16
  232. package/types/modules/global-link/global-link-panel.d.ts +0 -19
  233. package/types/modules/global-link/index.d.ts +0 -18
  234. package/types/modules/global-link/utils/createTable.d.ts +0 -1
  235. package/types/modules/quick-menu.d.ts +0 -22
  236. package/types/modules/table/better-table.d.ts +0 -35
  237. package/types/modules/table/formats/header.d.ts +0 -23
  238. package/types/modules/table/formats/list.d.ts +0 -34
  239. package/types/modules/table/formats/table.d.ts +0 -147
  240. package/types/modules/table/modules/table-column-tool.d.ts +0 -23
  241. package/types/modules/table/modules/table-operation-menu.d.ts +0 -38
  242. package/types/modules/table/modules/table-scroll-bar.d.ts +0 -33
  243. package/types/modules/table/modules/table-selection.d.ts +0 -37
  244. package/types/modules/table/modules/table-selector.d.ts +0 -22
  245. package/types/modules/table/table-config.d.ts +0 -38
  246. package/types/modules/table/utils/index.d.ts +0 -17
  247. package/types/modules/table/utils/node-matchers.d.ts +0 -9
@@ -1 +1 @@
1
- export declare const FontStyle: import('parchment').ClassAttributor;
1
+ export declare const FontStyle: import('parchment').StyleAttributor;
@@ -1,222 +1,4 @@
1
1
  export declare const BIG_DELTA_LIMIT = 2000;
2
- export declare const LANG_CONF: {
3
- 'en-US': {
4
- header: string;
5
- normal: string;
6
- h1: string;
7
- h2: string;
8
- h3: string;
9
- h4: string;
10
- h5: string;
11
- h6: string;
12
- lineheight: string;
13
- songti: string;
14
- yahei: string;
15
- kaiti: string;
16
- heiti: string;
17
- lishu: string;
18
- left: string;
19
- center: string;
20
- right: string;
21
- codeblock: string;
22
- globallink: string;
23
- 'exit-fullscreen': string;
24
- help: string;
25
- more: string;
26
- 'help-format': string;
27
- 'help-insert': string;
28
- 'help-operation': string;
29
- mention: string;
30
- 'quick-menu': string;
31
- 'toggle-help-panel': string;
32
- 'scroll-table': string;
33
- 'mouse-wheel': string;
34
- save: string;
35
- 'copy-cells': string;
36
- 'copy-table': string;
37
- 'cut-cells': string;
38
- 'empty-cells': string;
39
- 'insert-row-up': string;
40
- 'insert-row-down': string;
41
- 'insert-column-left': string;
42
- 'insert-column-right': string;
43
- 'merge-cells': string;
44
- 'unmerge-cells': string;
45
- 'delete-row': string;
46
- 'delete-column': string;
47
- 'delete-table': string;
48
- 'default-link-text': string;
49
- basicblock: string;
50
- linkplaceholder: string;
51
- 'counter-template': string;
52
- char: string;
53
- word: string;
54
- 'counter-limit-tips': string;
55
- 'ie-msg': string;
56
- loading: string;
57
- pasting: string;
58
- 'img-error': string;
59
- 'img-error-info': string;
60
- 'last-modified': string;
61
- screenshot: string;
62
- uploading: string;
63
- 'sub-title-bg-color': string;
64
- emoji: string;
65
- fullscreen: string;
66
- blockquote: string;
67
- undo: string;
68
- redo: string;
69
- clean: string;
70
- bold: string;
71
- italic: string;
72
- underline: string;
73
- strike: string;
74
- image: string;
75
- file: string;
76
- table: string;
77
- link: string;
78
- code: string;
79
- 'better-table': string;
80
- 'code-block': string;
81
- formula: string;
82
- 'format-painter': string;
83
- divider: string;
84
- video: string;
85
- color: string;
86
- background: string;
87
- font: string;
88
- size: string;
89
- 'list-ordered': string;
90
- 'list-bullet': string;
91
- 'list-check': string;
92
- 'align-left': string;
93
- 'align-center': string;
94
- 'align-right': string;
95
- 'align-justify': string;
96
- 'direction-ltr': string;
97
- 'direction-rtl': string;
98
- 'indent--1': string;
99
- 'indent-+1': string;
100
- 'script-super': string;
101
- 'script-sub': string;
102
- 'header-normal': string;
103
- 'header-1': string;
104
- 'header-2': string;
105
- 'header-3': string;
106
- 'header-4': string;
107
- 'header-5': string;
108
- 'header-6': string;
109
- 'header-list': string;
110
- };
111
- 'zh-CN': {
112
- header: string;
113
- normal: string;
114
- h1: string;
115
- h2: string;
116
- h3: string;
117
- h4: string;
118
- h5: string;
119
- h6: string;
120
- lineheight: string;
121
- songti: string;
122
- yahei: string;
123
- kaiti: string;
124
- heiti: string;
125
- lishu: string;
126
- left: string;
127
- center: string;
128
- right: string;
129
- codeblock: string;
130
- globallink: string;
131
- 'exit-fullscreen': string;
132
- help: string;
133
- more: string;
134
- 'help-format': string;
135
- 'help-insert': string;
136
- 'help-operation': string;
137
- mention: string;
138
- 'quick-menu': string;
139
- 'toggle-help-panel': string;
140
- 'scroll-table': string;
141
- 'mouse-wheel': string;
142
- save: string;
143
- 'copy-cells': string;
144
- 'copy-table': string;
145
- 'cut-cells': string;
146
- 'empty-cells': string;
147
- 'insert-row-up': string;
148
- 'insert-row-down': string;
149
- 'insert-column-left': string;
150
- 'insert-column-right': string;
151
- 'merge-cells': string;
152
- 'unmerge-cells': string;
153
- 'delete-row': string;
154
- 'delete-column': string;
155
- 'delete-table': string;
156
- 'default-link-text': string;
157
- basicblock: string;
158
- linkplaceholder: string;
159
- 'counter-template': string;
160
- char: string;
161
- word: string;
162
- 'counter-limit-tips': string;
163
- 'ie-msg': string;
164
- loading: string;
165
- pasting: string;
166
- 'img-error': string;
167
- 'img-error-info': string;
168
- 'last-modified': string;
169
- screenshot: string;
170
- uploading: string;
171
- 'sub-title-bg-color': string;
172
- emoji: string;
173
- fullscreen: string;
174
- blockquote: string;
175
- undo: string;
176
- redo: string;
177
- clean: string;
178
- bold: string;
179
- italic: string;
180
- underline: string;
181
- strike: string;
182
- image: string;
183
- file: string;
184
- table: string;
185
- link: string;
186
- divider: string;
187
- code: string;
188
- 'better-table': string;
189
- 'code-block': string;
190
- formula: string;
191
- 'format-painter': string;
192
- video: string;
193
- color: string;
194
- background: string;
195
- font: string;
196
- size: string;
197
- 'list-ordered': string;
198
- 'list-bullet': string;
199
- 'list-check': string;
200
- 'align-left': string;
201
- 'align-center': string;
202
- 'align-right': string;
203
- 'align-justify': string;
204
- 'direction-ltr': string;
205
- 'direction-rtl': string;
206
- 'indent--1': string;
207
- 'indent-+1': string;
208
- 'script-super': string;
209
- 'script-sub': string;
210
- 'header-normal': string;
211
- 'header-1': string;
212
- 'header-2': string;
213
- 'header-3': string;
214
- 'header-4': string;
215
- 'header-5': string;
216
- 'header-6': string;
217
- 'header-list': string;
218
- };
219
- };
220
2
  export declare const CHANGE_LANGUAGE_EVENT = "change-language";
221
3
  export declare const defaultLanguage = "en-US";
222
4
  export declare const IMAGE_UPLOADER_MIME_TYPES: string[];
@@ -9,7 +9,6 @@ export declare function imageFileToUrl(imageFile: any): Promise<unknown>;
9
9
  * @param imageUrl 图片的URL
10
10
  */
11
11
  export declare function imageUrlToFile(imageUrl: any, isErrorImage?: boolean): Promise<unknown>;
12
- export declare function insideTable(range?: any, quill?: any): boolean;
13
12
  export declare function isNullOrUndefined(param: any): boolean;
14
13
  /**
15
14
  * omit
@@ -7,7 +7,7 @@ export declare const EN_US: {
7
7
  h4: string;
8
8
  h5: string;
9
9
  h6: string;
10
- lineheight: string;
10
+ 'line-height': string;
11
11
  songti: string;
12
12
  yahei: string;
13
13
  kaiti: string;
@@ -30,19 +30,6 @@ export declare const EN_US: {
30
30
  'scroll-table': string;
31
31
  'mouse-wheel': string;
32
32
  save: string;
33
- 'copy-cells': string;
34
- 'copy-table': string;
35
- 'cut-cells': string;
36
- 'empty-cells': string;
37
- 'insert-row-up': string;
38
- 'insert-row-down': string;
39
- 'insert-column-left': string;
40
- 'insert-column-right': string;
41
- 'merge-cells': string;
42
- 'unmerge-cells': string;
43
- 'delete-row': string;
44
- 'delete-column': string;
45
- 'delete-table': string;
46
33
  'default-link-text': string;
47
34
  basicblock: string;
48
35
  linkplaceholder: string;
@@ -71,10 +58,10 @@ export declare const EN_US: {
71
58
  strike: string;
72
59
  image: string;
73
60
  file: string;
74
- table: string;
75
61
  link: string;
76
62
  code: string;
77
- 'better-table': string;
63
+ table: string;
64
+ 'table-up': string;
78
65
  'code-block': string;
79
66
  formula: string;
80
67
  'format-painter': string;
@@ -84,6 +71,7 @@ export declare const EN_US: {
84
71
  background: string;
85
72
  font: string;
86
73
  size: string;
74
+ list: string;
87
75
  'list-ordered': string;
88
76
  'list-bullet': string;
89
77
  'list-check': string;
@@ -105,4 +93,31 @@ export declare const EN_US: {
105
93
  'header-5': string;
106
94
  'header-6': string;
107
95
  'header-list': string;
96
+ 'input-recall-menu-placeholder': string;
97
+ 'clear-color': string;
98
+ 'custom-color': string;
99
+ fullCheckboxText: string;
100
+ customBtnText: string;
101
+ confirmText: string;
102
+ cancelText: string;
103
+ rowText: string;
104
+ colText: string;
105
+ notPositiveNumberError: string;
106
+ custom: string;
107
+ clear: string;
108
+ transparent: string;
109
+ perWidthInsufficient: string;
110
+ CopyCell: string;
111
+ CutCell: string;
112
+ InsertTop: string;
113
+ InsertRight: string;
114
+ InsertBottom: string;
115
+ InsertLeft: string;
116
+ MergeCell: string;
117
+ SplitCell: string;
118
+ DeleteRow: string;
119
+ DeleteColumn: string;
120
+ DeleteTable: string;
121
+ BackgroundColor: string;
122
+ BorderColor: string;
108
123
  };
@@ -7,7 +7,7 @@ export declare const ZH_CN: {
7
7
  h4: string;
8
8
  h5: string;
9
9
  h6: string;
10
- lineheight: string;
10
+ 'line-height': string;
11
11
  songti: string;
12
12
  yahei: string;
13
13
  kaiti: string;
@@ -30,19 +30,6 @@ export declare const ZH_CN: {
30
30
  'scroll-table': string;
31
31
  'mouse-wheel': string;
32
32
  save: string;
33
- 'copy-cells': string;
34
- 'copy-table': string;
35
- 'cut-cells': string;
36
- 'empty-cells': string;
37
- 'insert-row-up': string;
38
- 'insert-row-down': string;
39
- 'insert-column-left': string;
40
- 'insert-column-right': string;
41
- 'merge-cells': string;
42
- 'unmerge-cells': string;
43
- 'delete-row': string;
44
- 'delete-column': string;
45
- 'delete-table': string;
46
33
  'default-link-text': string;
47
34
  basicblock: string;
48
35
  linkplaceholder: string;
@@ -71,11 +58,11 @@ export declare const ZH_CN: {
71
58
  strike: string;
72
59
  image: string;
73
60
  file: string;
74
- table: string;
75
61
  link: string;
76
62
  divider: string;
77
63
  code: string;
78
- 'better-table': string;
64
+ table: string;
65
+ 'table-up': string;
79
66
  'code-block': string;
80
67
  formula: string;
81
68
  'format-painter': string;
@@ -84,6 +71,7 @@ export declare const ZH_CN: {
84
71
  background: string;
85
72
  font: string;
86
73
  size: string;
74
+ list: string;
87
75
  'list-ordered': string;
88
76
  'list-bullet': string;
89
77
  'list-check': string;
@@ -105,4 +93,31 @@ export declare const ZH_CN: {
105
93
  'header-5': string;
106
94
  'header-6': string;
107
95
  'header-list': string;
96
+ 'input-recall-menu-placeholder': string;
97
+ 'clear-color': string;
98
+ 'custom-color': string;
99
+ fullCheckboxText: string;
100
+ customBtnText: string;
101
+ confirmText: string;
102
+ cancelText: string;
103
+ rowText: string;
104
+ colText: string;
105
+ notPositiveNumberError: string;
106
+ custom: string;
107
+ clear: string;
108
+ transparent: string;
109
+ perWidthInsufficient: string;
110
+ CopyCell: string;
111
+ CutCell: string;
112
+ InsertTop: string;
113
+ InsertRight: string;
114
+ InsertBottom: string;
115
+ InsertLeft: string;
116
+ MergeCell: string;
117
+ SplitCell: string;
118
+ DeleteRow: string;
119
+ DeleteColumn: string;
120
+ DeleteTable: string;
121
+ BackgroundColor: string;
122
+ BorderColor: string;
108
123
  };
@@ -1,6 +1,6 @@
1
1
  export * from './editor.config';
2
2
  export * from './editor.utils';
3
- export declare function inputFile(type: any, accept: any): void;
3
+ export declare function inputFile(type: 'image' | 'video' | 'file', accept: string[]): void;
4
4
  export declare function getListValue(value: any, preListValue: any): any;
5
5
  /** css namespace */
6
6
  export declare const namespace = "fe";
@@ -11,25 +11,6 @@ export interface IEditorConfig extends QuillOptions {
11
11
  trackChanges?: 'user' | 'all';
12
12
  autoProtocol?: boolean | string;
13
13
  editorPaste?: any;
14
- uploadOption?: {
15
- imageUpload?: ({ file, callback, editor }: {
16
- file: any;
17
- callback: any;
18
- editor: any;
19
- }) => void;
20
- imageAccept?: Array<string>[] | string;
21
- fileAccept?: Array<string>[] | string;
22
- fileUpload: ({ file, callback, editor }: {
23
- file: any;
24
- callback: any;
25
- editor: any;
26
- }) => void;
27
- isVideoPlay?: boolean;
28
- maxSize?: number;
29
- success?: (file: File) => void;
30
- fail?: (file: File) => void;
31
- multiple?: boolean;
32
- };
33
14
  screenshot?: Partial<ScreenShotOptions>;
34
15
  i18n?: {
35
16
  lang?: string;
@@ -1,3 +1,4 @@
1
+ import { FileUploaderOptions } from '../../modules/custom-uploader';
1
2
  import { ToolbarOption } from './type';
2
3
 
3
4
  export interface IEditorModules {
@@ -28,4 +29,5 @@ export interface IEditorModules {
28
29
  [key: string]: any;
29
30
  };
30
31
  } | boolean;
32
+ uploader?: boolean | Partial<FileUploaderOptions>;
31
33
  }
@@ -1,13 +1,13 @@
1
1
  export interface IToolbarItem {
2
- indent?: string;
3
- list?: string;
4
- direction?: string;
5
- header?: number | (boolean | number)[];
6
- color?: string[];
7
- background?: string[];
8
- align?: string[];
9
- script?: string;
10
- font?: string[];
11
- size?: boolean[] | string[];
12
- lineheight?: number[];
2
+ 'indent'?: string;
3
+ 'list'?: string;
4
+ 'direction'?: string;
5
+ 'header'?: number | (boolean | number)[];
6
+ 'color'?: string[];
7
+ 'background'?: string[];
8
+ 'align'?: string[];
9
+ 'script'?: string;
10
+ 'font'?: string[];
11
+ 'size'?: boolean[] | string[];
12
+ 'line-height'?: number[];
13
13
  }
@@ -1,12 +1,15 @@
1
1
  import { ExpandedQuillOptions, default as Quill } from 'quill';
2
2
  import { IEditorConfig } from '../config/types';
3
+ import { FileUploader } from '../modules/custom-uploader';
3
4
 
4
5
  declare class FluentEditor extends Quill {
5
6
  isFullscreen: boolean;
6
7
  options: IEditorConfig & ExpandedQuillOptions;
8
+ uploader: FileUploader;
9
+ static register(...args: any[]): void;
7
10
  get lang(): string;
8
11
  constructor(container: HTMLElement | string, options?: IEditorConfig);
9
- getLangText(name: string): any;
12
+ getLangText(name: string): string;
10
13
  }
11
14
  export type { Module, Parchment as TypeParchment, } from 'quill';
12
15
  export default FluentEditor;
package/types/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import { default as FluentEditor } from './fluent-editor';
2
2
 
3
3
  export * from './config';
4
+ export { I18N } from './modules/i18n';
5
+ export * from './modules/table-up';
4
6
  export * from './modules/toolbar/toolbar-tip';
5
7
  export default FluentEditor;
8
+ export { generateTableUpShortKeyMenu } from 'quill-shortcut-key';
@@ -9,7 +9,7 @@ export default class Counter {
9
9
  resolveOptions(options: ICounterOption): {
10
10
  format: string;
11
11
  unit: string;
12
- template: any;
12
+ template: string;
13
13
  count: number;
14
14
  } & ICounterOption;
15
15
  renderCount: () => void;
@@ -16,7 +16,7 @@ declare class CustomClipboard extends Clipboard {
16
16
  files: any;
17
17
  rtf: any;
18
18
  }): void;
19
- files2urls(files: any, placeholders: any, originalUrls: any, pastedDelta: any, imageIndexs: any): Promise<any[]>;
19
+ files2urls(files: File[], placeholders: any, originalUrls: any, pastedDelta: any, imageIndexs: any): Promise<unknown[]>;
20
20
  flipFilesArray(filesArr: any): any[][];
21
21
  convertHexToBase64(hexString: any): string;
22
22
  extractImageDataFromRtf(rtfData: any): any[];
@@ -1,5 +1,9 @@
1
- declare const Embed: unknown;
2
- declare const Inline: unknown;
1
+ import { default as TypeEmbed } from 'quill/blots/embed';
2
+
3
+ declare const Embed: typeof TypeEmbed;
4
+ export type ImageValue = string | {
5
+ src: string;
6
+ };
3
7
  declare class CustomImage extends Embed {
4
8
  static ID_SEED: number;
5
9
  static blotName: string;
@@ -8,7 +12,7 @@ declare class CustomImage extends Embed {
8
12
  parent: any;
9
13
  scroll: any;
10
14
  next: any;
11
- static create(value: any): any;
15
+ static create(value: ImageValue): HTMLElement;
12
16
  static formats(domNode: any): {};
13
17
  static match(url: any): boolean;
14
18
  static register(): void;
@@ -18,11 +22,4 @@ declare class CustomImage extends Embed {
18
22
  unWrap(): void;
19
23
  wrap(name: any, value: any): any;
20
24
  }
21
- declare class CustomImageContainer extends Inline {
22
- static tagName: string;
23
- static className: string;
24
- static blotName: string;
25
- static allowedChildren: typeof CustomImage[];
26
- constructor(scroll: any, domNode: any);
27
- }
28
- export { CustomImage as default, CustomImageContainer as ImageContainerBlot };
25
+ export { CustomImage as default };
@@ -1,15 +1,19 @@
1
- declare const Embed: unknown;
1
+ import { default as TypeEmbed } from 'quill/blots/embed';
2
+
3
+ declare const Embed: typeof TypeEmbed;
4
+ export interface FileValue {
5
+ size: number;
6
+ src: string;
7
+ title: string;
8
+ }
2
9
  declare class File extends Embed {
3
10
  static blotName: string;
4
11
  static tagName: string;
5
12
  static className: string;
6
13
  static PROTOCOL_WHITELIST: string[];
7
- statics: any;
8
- domNode: any;
9
- static create(value: any): any;
10
- static value(domNode: any): any;
11
- static formats(domNode: any): any;
12
- static getFormats(domNode: any): any;
13
- static sanitize(url: any): any;
14
+ static create(value: FileValue): HTMLAnchorElement;
15
+ static value(domNode: HTMLAnchorElement): Record<string, string>;
16
+ static getFormats(domNode: HTMLAnchorElement): Record<string, string>;
17
+ static sanitize(url: string): string;
14
18
  }
15
19
  export default File;
@@ -1,11 +1,11 @@
1
+ import { default as FluentEditor } from '../../core/fluent-editor';
1
2
  import { default as FileBar } from './modules/file-bar';
2
3
 
3
- declare const Module: unknown;
4
- declare class FileModule extends Module {
5
- quill: any;
4
+ declare class FileModule {
5
+ quill: FluentEditor;
6
6
  fileBar: FileBar;
7
7
  static register(): void;
8
- constructor(quill: any, options: any);
9
- clickEvent(event: any): void;
8
+ constructor(quill: FluentEditor);
9
+ clickEvent(event: MouseEvent): void;
10
10
  }
11
11
  export default FileModule;
@@ -2,15 +2,15 @@ import { default as FluentEditor } from '../fluent-editor';
2
2
 
3
3
  interface I18NOptions {
4
4
  lang: string;
5
- langText: Record<string, string>;
6
5
  }
7
- declare class I18N {
6
+ export declare class I18N {
8
7
  quill: FluentEditor;
9
- isFullscreen: boolean;
8
+ static register(inputLangs: Record<string, Record<string, string>>, isCover?: boolean): void;
9
+ static parserText(text: string, lang: string): string;
10
10
  options: I18NOptions;
11
11
  constructor(quill: FluentEditor, options: Partial<I18NOptions>);
12
12
  resolveLanguageOption(options: Partial<I18NOptions>): I18NOptions;
13
- changeLanguage(options: Partial<I18NOptions>): void;
13
+ changeLanguage(options: Partial<I18NOptions>, force?: boolean): void;
14
14
  }
15
15
  export { I18NOptions };
16
16
  export default I18N;
@@ -0,0 +1,68 @@
1
+ import { Range, default as Quill } from 'quill';
2
+ import { QuillShortcutKeyInputOptions, QuillShortcutKeyOptions, default as QuillShortcutKey } from 'quill-shortcut-key';
3
+ import { Context } from 'quill/modules/keyboard';
4
+ import { default as FluentEditor } from '../../fluent-editor';
5
+
6
+ interface ShortCutKeyCustomOptions {
7
+ isMenuItemsAdd: boolean;
8
+ }
9
+ type ShortCutKeyInputOptions = QuillShortcutKeyInputOptions & ShortCutKeyCustomOptions;
10
+ type ShortCutKeyOptions = QuillShortcutKeyOptions & ShortCutKeyCustomOptions;
11
+ export declare class ShortCutKey extends QuillShortcutKey {
12
+ quill: FluentEditor;
13
+ options: ShortCutKeyOptions;
14
+ constructor(quill: FluentEditor, options: Partial<ShortCutKeyInputOptions>);
15
+ resolveOptions(options: Partial<ShortCutKeyInputOptions>): ShortCutKeyOptions;
16
+ defaultMenuList(): ({
17
+ type: "item";
18
+ name: string;
19
+ alias: string[];
20
+ icon: any;
21
+ title: string;
22
+ onClick(this: Quill, range: Range | null, _: any): void;
23
+ hideSearch?: undefined;
24
+ children?: undefined;
25
+ } | {
26
+ type: "group";
27
+ name: string;
28
+ alias: any[];
29
+ hideSearch: boolean;
30
+ icon: any;
31
+ title: string;
32
+ children: {
33
+ type: "item";
34
+ name: string;
35
+ alias: string[];
36
+ icon: any;
37
+ title: string;
38
+ onClick: (this: Quill, range: Range | null) => void;
39
+ }[];
40
+ })[];
41
+ }
42
+ export declare const shortKey: {
43
+ link: {
44
+ key: string;
45
+ shortKey: boolean;
46
+ handler(_: any, context: Context): void;
47
+ };
48
+ color: {
49
+ key: string;
50
+ altKey: boolean;
51
+ shortKey: boolean;
52
+ handler(): void;
53
+ };
54
+ background: {
55
+ key: string;
56
+ altKey: boolean;
57
+ shortKey: boolean;
58
+ handler(): void;
59
+ };
60
+ clean: {
61
+ key: string;
62
+ shortKey: boolean;
63
+ handler(this: {
64
+ quill: Quill;
65
+ }, range: Range): void;
66
+ };
67
+ };
68
+ export {};