@opentiny/fluent-editor 3.25.3 → 4.0.0-alpha.0

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 (208) 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.utils.es.js +0 -9
  6. package/es/config/editor.utils.es.js.map +1 -1
  7. package/es/config/i18n/en-us.es.js +33 -4
  8. package/es/config/i18n/en-us.es.js.map +1 -1
  9. package/es/config/i18n/zh-cn.es.js +33 -4
  10. package/es/config/i18n/zh-cn.es.js.map +1 -1
  11. package/es/config/index.es.js +1 -2
  12. package/es/core/fluent-editor.es.js +3 -0
  13. package/es/core/fluent-editor.es.js.map +1 -1
  14. package/es/fluent-editor.es.js +12 -9
  15. package/es/fluent-editor.es.js.map +1 -1
  16. package/es/index.es.js +5 -2
  17. package/es/index.es.js.map +1 -1
  18. package/es/modules/custom-clipboard.es.js +1 -57
  19. package/es/modules/custom-clipboard.es.js.map +1 -1
  20. package/es/modules/custom-image/image-bar.es.js +2 -1
  21. package/es/modules/custom-image/image-bar.es.js.map +1 -1
  22. package/es/modules/i18n.es.js +4 -3
  23. package/es/modules/i18n.es.js.map +1 -1
  24. package/es/modules/link/index.es.js +0 -17
  25. package/es/modules/link/index.es.js.map +1 -1
  26. package/es/modules/mathlive/tooltip.es.js +8 -3
  27. package/es/modules/mathlive/tooltip.es.js.map +1 -1
  28. package/es/modules/shortcut-key/index.es.js +213 -0
  29. package/es/modules/shortcut-key/index.es.js.map +1 -0
  30. package/es/modules/table-up/index.es.js +61 -0
  31. package/es/modules/table-up/index.es.js.map +1 -0
  32. package/es/modules/toolbar/better-picker.es.js +21 -269
  33. package/es/modules/toolbar/better-picker.es.js.map +1 -1
  34. package/es/modules/toolbar/index.es.js +0 -1
  35. package/es/modules/toolbar/index.es.js.map +1 -1
  36. package/es/modules/toolbar/toolbar-tip.es.js +38 -8
  37. package/es/modules/toolbar/toolbar-tip.es.js.map +1 -1
  38. package/es/themes/snow.es.js +185 -46
  39. package/es/themes/snow.es.js.map +1 -1
  40. package/es/ui/icons.config.es.js +6 -5
  41. package/es/ui/icons.config.es.js.map +1 -1
  42. package/es/ui/icons.es.js +3 -12
  43. package/es/ui/icons.es.js.map +1 -1
  44. package/lib/attributors/font-style.cjs.js +1 -1
  45. package/lib/attributors/font-style.cjs.js.map +1 -1
  46. package/lib/attributors/line-height.cjs.js +1 -1
  47. package/lib/attributors/line-height.cjs.js.map +1 -1
  48. package/lib/config/editor.utils.cjs.js +0 -9
  49. package/lib/config/editor.utils.cjs.js.map +1 -1
  50. package/lib/config/i18n/en-us.cjs.js +33 -4
  51. package/lib/config/i18n/en-us.cjs.js.map +1 -1
  52. package/lib/config/i18n/zh-cn.cjs.js +33 -4
  53. package/lib/config/i18n/zh-cn.cjs.js.map +1 -1
  54. package/lib/config/index.cjs.js +0 -1
  55. package/lib/config/index.cjs.js.map +1 -1
  56. package/lib/core/fluent-editor.cjs.js +3 -0
  57. package/lib/core/fluent-editor.cjs.js.map +1 -1
  58. package/lib/fluent-editor.cjs.js +12 -9
  59. package/lib/fluent-editor.cjs.js.map +1 -1
  60. package/lib/index.cjs.js +7 -1
  61. package/lib/index.cjs.js.map +1 -1
  62. package/lib/modules/custom-clipboard.cjs.js +0 -56
  63. package/lib/modules/custom-clipboard.cjs.js.map +1 -1
  64. package/lib/modules/custom-image/image-bar.cjs.js +2 -1
  65. package/lib/modules/custom-image/image-bar.cjs.js.map +1 -1
  66. package/lib/modules/i18n.cjs.js +4 -3
  67. package/lib/modules/i18n.cjs.js.map +1 -1
  68. package/lib/modules/link/index.cjs.js +0 -17
  69. package/lib/modules/link/index.cjs.js.map +1 -1
  70. package/lib/modules/mathlive/tooltip.cjs.js +8 -3
  71. package/lib/modules/mathlive/tooltip.cjs.js.map +1 -1
  72. package/lib/modules/shortcut-key/index.cjs.js +213 -0
  73. package/lib/modules/shortcut-key/index.cjs.js.map +1 -0
  74. package/lib/modules/table-up/index.cjs.js +61 -0
  75. package/lib/modules/table-up/index.cjs.js.map +1 -0
  76. package/lib/modules/toolbar/better-picker.cjs.js +21 -270
  77. package/lib/modules/toolbar/better-picker.cjs.js.map +1 -1
  78. package/lib/modules/toolbar/index.cjs.js +0 -1
  79. package/lib/modules/toolbar/index.cjs.js.map +1 -1
  80. package/lib/modules/toolbar/toolbar-tip.cjs.js +38 -8
  81. package/lib/modules/toolbar/toolbar-tip.cjs.js.map +1 -1
  82. package/lib/themes/snow.cjs.js +187 -48
  83. package/lib/themes/snow.cjs.js.map +1 -1
  84. package/lib/ui/icons.cjs.js +2 -11
  85. package/lib/ui/icons.cjs.js.map +1 -1
  86. package/lib/ui/icons.config.cjs.js +6 -5
  87. package/lib/ui/icons.config.cjs.js.map +1 -1
  88. package/package.json +5 -3
  89. package/style.css +315 -2135
  90. package/types/attributors/font-style.d.ts +1 -1
  91. package/types/config/editor.config.d.ts +62 -6
  92. package/types/config/editor.utils.d.ts +0 -1
  93. package/types/config/i18n/en-us.d.ts +31 -3
  94. package/types/config/i18n/zh-cn.d.ts +31 -3
  95. package/types/config/types/toolbar-item.interface.d.ts +11 -11
  96. package/types/core/fluent-editor.d.ts +1 -0
  97. package/types/index.d.ts +2 -0
  98. package/types/modules/i18n.d.ts +1 -1
  99. package/types/modules/shortcut-key/index.d.ts +97 -0
  100. package/types/modules/table-up/index.d.ts +66 -0
  101. package/types/modules/toolbar/better-picker.d.ts +15 -0
  102. package/types/themes/snow.d.ts +10 -2
  103. package/types/ui/icons.config.d.ts +2 -2
  104. package/es/modules/global-link/constants.es.js +0 -9
  105. package/es/modules/global-link/constants.es.js.map +0 -1
  106. package/es/modules/global-link/formats/customer-widget-link.es.js +0 -28
  107. package/es/modules/global-link/formats/customer-widget-link.es.js.map +0 -1
  108. package/es/modules/global-link/formats/doc-link.es.js +0 -42
  109. package/es/modules/global-link/formats/doc-link.es.js.map +0 -1
  110. package/es/modules/global-link/formats/wiki-link.es.js +0 -34
  111. package/es/modules/global-link/formats/wiki-link.es.js.map +0 -1
  112. package/es/modules/global-link/formats/work-item-link.es.js +0 -36
  113. package/es/modules/global-link/formats/work-item-link.es.js.map +0 -1
  114. package/es/modules/global-link/global-link-panel.es.js +0 -2
  115. package/es/modules/global-link/global-link-panel.es.js.map +0 -1
  116. package/es/modules/global-link/index.es.js +0 -139
  117. package/es/modules/global-link/index.es.js.map +0 -1
  118. package/es/modules/global-link/utils/createTable.es.js +0 -50
  119. package/es/modules/global-link/utils/createTable.es.js.map +0 -1
  120. package/es/modules/quick-menu.es.js +0 -82
  121. package/es/modules/quick-menu.es.js.map +0 -1
  122. package/es/modules/table/better-table.es.js +0 -485
  123. package/es/modules/table/better-table.es.js.map +0 -1
  124. package/es/modules/table/formats/header.es.js +0 -94
  125. package/es/modules/table/formats/header.es.js.map +0 -1
  126. package/es/modules/table/formats/list.es.js +0 -163
  127. package/es/modules/table/formats/list.es.js.map +0 -1
  128. package/es/modules/table/formats/table.es.js +0 -969
  129. package/es/modules/table/formats/table.es.js.map +0 -1
  130. package/es/modules/table/modules/table-column-tool.es.js +0 -400
  131. package/es/modules/table/modules/table-column-tool.es.js.map +0 -1
  132. package/es/modules/table/modules/table-operation-menu.es.js +0 -475
  133. package/es/modules/table/modules/table-operation-menu.es.js.map +0 -1
  134. package/es/modules/table/modules/table-scroll-bar.es.js +0 -190
  135. package/es/modules/table/modules/table-scroll-bar.es.js.map +0 -1
  136. package/es/modules/table/modules/table-selection.es.js +0 -305
  137. package/es/modules/table/modules/table-selection.es.js.map +0 -1
  138. package/es/modules/table/modules/table-selector.es.js +0 -158
  139. package/es/modules/table/modules/table-selector.es.js.map +0 -1
  140. package/es/modules/table/table-config.es.js +0 -74
  141. package/es/modules/table/table-config.es.js.map +0 -1
  142. package/es/modules/table/utils/index.es.js +0 -54
  143. package/es/modules/table/utils/index.es.js.map +0 -1
  144. package/es/modules/table/utils/node-matchers.es.js +0 -292
  145. package/es/modules/table/utils/node-matchers.es.js.map +0 -1
  146. package/lib/modules/global-link/constants.cjs.js +0 -9
  147. package/lib/modules/global-link/constants.cjs.js.map +0 -1
  148. package/lib/modules/global-link/formats/customer-widget-link.cjs.js +0 -28
  149. package/lib/modules/global-link/formats/customer-widget-link.cjs.js.map +0 -1
  150. package/lib/modules/global-link/formats/doc-link.cjs.js +0 -42
  151. package/lib/modules/global-link/formats/doc-link.cjs.js.map +0 -1
  152. package/lib/modules/global-link/formats/wiki-link.cjs.js +0 -34
  153. package/lib/modules/global-link/formats/wiki-link.cjs.js.map +0 -1
  154. package/lib/modules/global-link/formats/work-item-link.cjs.js +0 -36
  155. package/lib/modules/global-link/formats/work-item-link.cjs.js.map +0 -1
  156. package/lib/modules/global-link/global-link-panel.cjs.js +0 -2
  157. package/lib/modules/global-link/global-link-panel.cjs.js.map +0 -1
  158. package/lib/modules/global-link/index.cjs.js +0 -139
  159. package/lib/modules/global-link/index.cjs.js.map +0 -1
  160. package/lib/modules/global-link/utils/createTable.cjs.js +0 -50
  161. package/lib/modules/global-link/utils/createTable.cjs.js.map +0 -1
  162. package/lib/modules/quick-menu.cjs.js +0 -82
  163. package/lib/modules/quick-menu.cjs.js.map +0 -1
  164. package/lib/modules/table/better-table.cjs.js +0 -485
  165. package/lib/modules/table/better-table.cjs.js.map +0 -1
  166. package/lib/modules/table/formats/header.cjs.js +0 -94
  167. package/lib/modules/table/formats/header.cjs.js.map +0 -1
  168. package/lib/modules/table/formats/list.cjs.js +0 -163
  169. package/lib/modules/table/formats/list.cjs.js.map +0 -1
  170. package/lib/modules/table/formats/table.cjs.js +0 -969
  171. package/lib/modules/table/formats/table.cjs.js.map +0 -1
  172. package/lib/modules/table/modules/table-column-tool.cjs.js +0 -400
  173. package/lib/modules/table/modules/table-column-tool.cjs.js.map +0 -1
  174. package/lib/modules/table/modules/table-operation-menu.cjs.js +0 -475
  175. package/lib/modules/table/modules/table-operation-menu.cjs.js.map +0 -1
  176. package/lib/modules/table/modules/table-scroll-bar.cjs.js +0 -190
  177. package/lib/modules/table/modules/table-scroll-bar.cjs.js.map +0 -1
  178. package/lib/modules/table/modules/table-selection.cjs.js +0 -305
  179. package/lib/modules/table/modules/table-selection.cjs.js.map +0 -1
  180. package/lib/modules/table/modules/table-selector.cjs.js +0 -158
  181. package/lib/modules/table/modules/table-selector.cjs.js.map +0 -1
  182. package/lib/modules/table/table-config.cjs.js +0 -74
  183. package/lib/modules/table/table-config.cjs.js.map +0 -1
  184. package/lib/modules/table/utils/index.cjs.js +0 -54
  185. package/lib/modules/table/utils/index.cjs.js.map +0 -1
  186. package/lib/modules/table/utils/node-matchers.cjs.js +0 -292
  187. package/lib/modules/table/utils/node-matchers.cjs.js.map +0 -1
  188. package/types/modules/global-link/constants.d.ts +0 -3
  189. package/types/modules/global-link/formats/customer-widget-link.d.ts +0 -14
  190. package/types/modules/global-link/formats/doc-link.d.ts +0 -17
  191. package/types/modules/global-link/formats/wiki-link.d.ts +0 -16
  192. package/types/modules/global-link/formats/work-item-link.d.ts +0 -16
  193. package/types/modules/global-link/global-link-panel.d.ts +0 -19
  194. package/types/modules/global-link/index.d.ts +0 -18
  195. package/types/modules/global-link/utils/createTable.d.ts +0 -1
  196. package/types/modules/quick-menu.d.ts +0 -22
  197. package/types/modules/table/better-table.d.ts +0 -35
  198. package/types/modules/table/formats/header.d.ts +0 -23
  199. package/types/modules/table/formats/list.d.ts +0 -34
  200. package/types/modules/table/formats/table.d.ts +0 -147
  201. package/types/modules/table/modules/table-column-tool.d.ts +0 -23
  202. package/types/modules/table/modules/table-operation-menu.d.ts +0 -38
  203. package/types/modules/table/modules/table-scroll-bar.d.ts +0 -33
  204. package/types/modules/table/modules/table-selection.d.ts +0 -37
  205. package/types/modules/table/modules/table-selector.d.ts +0 -22
  206. package/types/modules/table/table-config.d.ts +0 -38
  207. package/types/modules/table/utils/index.d.ts +0 -17
  208. 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;
@@ -9,7 +9,7 @@ export declare const LANG_CONF: {
9
9
  h4: string;
10
10
  h5: string;
11
11
  h6: string;
12
- lineheight: string;
12
+ 'line-height': string;
13
13
  songti: string;
14
14
  yahei: string;
15
15
  kaiti: string;
@@ -73,10 +73,10 @@ export declare const LANG_CONF: {
73
73
  strike: string;
74
74
  image: string;
75
75
  file: string;
76
- table: string;
77
76
  link: string;
78
77
  code: string;
79
- 'better-table': string;
78
+ table: string;
79
+ 'table-up': string;
80
80
  'code-block': string;
81
81
  formula: string;
82
82
  'format-painter': string;
@@ -86,6 +86,7 @@ export declare const LANG_CONF: {
86
86
  background: string;
87
87
  font: string;
88
88
  size: string;
89
+ list: string;
89
90
  'list-ordered': string;
90
91
  'list-bullet': string;
91
92
  'list-check': string;
@@ -107,6 +108,33 @@ export declare const LANG_CONF: {
107
108
  'header-5': string;
108
109
  'header-6': string;
109
110
  'header-list': string;
111
+ 'input-recall-menu-placeholder': string;
112
+ 'clear-color': string;
113
+ 'custom-color': string;
114
+ fullCheckboxText: string;
115
+ customBtnText: string;
116
+ confirmText: string;
117
+ cancelText: string;
118
+ rowText: string;
119
+ colText: string;
120
+ notPositiveNumberError: string;
121
+ custom: string;
122
+ clear: string;
123
+ transparent: string;
124
+ perWidthInsufficient: string;
125
+ CopyCell: string;
126
+ CutCell: string;
127
+ InsertTop: string;
128
+ InsertRight: string;
129
+ InsertBottom: string;
130
+ InsertLeft: string;
131
+ MergeCell: string;
132
+ SplitCell: string;
133
+ DeleteRow: string;
134
+ DeleteColumn: string;
135
+ DeleteTable: string;
136
+ BackgroundColor: string;
137
+ BorderColor: string;
110
138
  };
111
139
  'zh-CN': {
112
140
  header: string;
@@ -117,7 +145,7 @@ export declare const LANG_CONF: {
117
145
  h4: string;
118
146
  h5: string;
119
147
  h6: string;
120
- lineheight: string;
148
+ 'line-height': string;
121
149
  songti: string;
122
150
  yahei: string;
123
151
  kaiti: string;
@@ -181,11 +209,11 @@ export declare const LANG_CONF: {
181
209
  strike: string;
182
210
  image: string;
183
211
  file: string;
184
- table: string;
185
212
  link: string;
186
213
  divider: string;
187
214
  code: string;
188
- 'better-table': string;
215
+ table: string;
216
+ 'table-up': string;
189
217
  'code-block': string;
190
218
  formula: string;
191
219
  'format-painter': string;
@@ -194,6 +222,7 @@ export declare const LANG_CONF: {
194
222
  background: string;
195
223
  font: string;
196
224
  size: string;
225
+ list: string;
197
226
  'list-ordered': string;
198
227
  'list-bullet': string;
199
228
  'list-check': string;
@@ -215,6 +244,33 @@ export declare const LANG_CONF: {
215
244
  'header-5': string;
216
245
  'header-6': string;
217
246
  'header-list': string;
247
+ 'input-recall-menu-placeholder': string;
248
+ 'clear-color': string;
249
+ 'custom-color': string;
250
+ fullCheckboxText: string;
251
+ customBtnText: string;
252
+ confirmText: string;
253
+ cancelText: string;
254
+ rowText: string;
255
+ colText: string;
256
+ notPositiveNumberError: string;
257
+ custom: string;
258
+ clear: string;
259
+ transparent: string;
260
+ perWidthInsufficient: string;
261
+ CopyCell: string;
262
+ CutCell: string;
263
+ InsertTop: string;
264
+ InsertRight: string;
265
+ InsertBottom: string;
266
+ InsertLeft: string;
267
+ MergeCell: string;
268
+ SplitCell: string;
269
+ DeleteRow: string;
270
+ DeleteColumn: string;
271
+ DeleteTable: string;
272
+ BackgroundColor: string;
273
+ BorderColor: string;
218
274
  };
219
275
  };
220
276
  export declare const CHANGE_LANGUAGE_EVENT = "change-language";
@@ -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;
@@ -71,10 +71,10 @@ export declare const EN_US: {
71
71
  strike: string;
72
72
  image: string;
73
73
  file: string;
74
- table: string;
75
74
  link: string;
76
75
  code: string;
77
- 'better-table': string;
76
+ table: string;
77
+ 'table-up': string;
78
78
  'code-block': string;
79
79
  formula: string;
80
80
  'format-painter': string;
@@ -84,6 +84,7 @@ export declare const EN_US: {
84
84
  background: string;
85
85
  font: string;
86
86
  size: string;
87
+ list: string;
87
88
  'list-ordered': string;
88
89
  'list-bullet': string;
89
90
  'list-check': string;
@@ -105,4 +106,31 @@ export declare const EN_US: {
105
106
  'header-5': string;
106
107
  'header-6': string;
107
108
  'header-list': string;
109
+ 'input-recall-menu-placeholder': string;
110
+ 'clear-color': string;
111
+ 'custom-color': string;
112
+ fullCheckboxText: string;
113
+ customBtnText: string;
114
+ confirmText: string;
115
+ cancelText: string;
116
+ rowText: string;
117
+ colText: string;
118
+ notPositiveNumberError: string;
119
+ custom: string;
120
+ clear: string;
121
+ transparent: string;
122
+ perWidthInsufficient: string;
123
+ CopyCell: string;
124
+ CutCell: string;
125
+ InsertTop: string;
126
+ InsertRight: string;
127
+ InsertBottom: string;
128
+ InsertLeft: string;
129
+ MergeCell: string;
130
+ SplitCell: string;
131
+ DeleteRow: string;
132
+ DeleteColumn: string;
133
+ DeleteTable: string;
134
+ BackgroundColor: string;
135
+ BorderColor: string;
108
136
  };
@@ -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;
@@ -71,11 +71,11 @@ export declare const ZH_CN: {
71
71
  strike: string;
72
72
  image: string;
73
73
  file: string;
74
- table: string;
75
74
  link: string;
76
75
  divider: string;
77
76
  code: string;
78
- 'better-table': string;
77
+ table: string;
78
+ 'table-up': string;
79
79
  'code-block': string;
80
80
  formula: string;
81
81
  'format-painter': string;
@@ -84,6 +84,7 @@ export declare const ZH_CN: {
84
84
  background: string;
85
85
  font: string;
86
86
  size: string;
87
+ list: string;
87
88
  'list-ordered': string;
88
89
  'list-bullet': string;
89
90
  'list-check': string;
@@ -105,4 +106,31 @@ export declare const ZH_CN: {
105
106
  'header-5': string;
106
107
  'header-6': string;
107
108
  'header-list': string;
109
+ 'input-recall-menu-placeholder': string;
110
+ 'clear-color': string;
111
+ 'custom-color': string;
112
+ fullCheckboxText: string;
113
+ customBtnText: string;
114
+ confirmText: string;
115
+ cancelText: string;
116
+ rowText: string;
117
+ colText: string;
118
+ notPositiveNumberError: string;
119
+ custom: string;
120
+ clear: string;
121
+ transparent: string;
122
+ perWidthInsufficient: string;
123
+ CopyCell: string;
124
+ CutCell: string;
125
+ InsertTop: string;
126
+ InsertRight: string;
127
+ InsertBottom: string;
128
+ InsertLeft: string;
129
+ MergeCell: string;
130
+ SplitCell: string;
131
+ DeleteRow: string;
132
+ DeleteColumn: string;
133
+ DeleteTable: string;
134
+ BackgroundColor: string;
135
+ BorderColor: string;
108
136
  };
@@ -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
  }
@@ -4,6 +4,7 @@ import { IEditorConfig } from '../config/types';
4
4
  declare class FluentEditor extends Quill {
5
5
  isFullscreen: boolean;
6
6
  options: IEditorConfig & ExpandedQuillOptions;
7
+ static register(...args: any[]): void;
7
8
  get lang(): string;
8
9
  constructor(container: HTMLElement | string, options?: IEditorConfig);
9
10
  getLangText(name: string): any;
package/types/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { default as FluentEditor } from './fluent-editor';
2
2
 
3
3
  export * from './config';
4
+ export * from './modules/table-up';
4
5
  export * from './modules/toolbar/toolbar-tip';
6
+ export { generateTableUpShortKeyMenu } from 'quill-shortcut-key';
5
7
  export default FluentEditor;
@@ -10,7 +10,7 @@ declare class I18N {
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,97 @@
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>): {
16
+ placeholder: any;
17
+ menuItems: ({
18
+ type: "item";
19
+ name: string;
20
+ alias: string[];
21
+ icon: any;
22
+ title: any;
23
+ onClick(this: Quill, range: Range, _: any): void;
24
+ hideSearch?: undefined;
25
+ children?: undefined;
26
+ } | {
27
+ type: "group";
28
+ name: string;
29
+ alias: any[];
30
+ hideSearch: boolean;
31
+ icon: any;
32
+ title: any;
33
+ children: {
34
+ type: "item";
35
+ name: string;
36
+ alias: string[];
37
+ icon: any;
38
+ title: any;
39
+ onClick: (this: Quill, range: Range) => void;
40
+ }[];
41
+ })[];
42
+ isMenuItemsAdd: boolean;
43
+ menuKeyboardControls: () => false;
44
+ } & Partial<ShortCutKeyInputOptions>;
45
+ defaultMenuList(): ({
46
+ type: "item";
47
+ name: string;
48
+ alias: string[];
49
+ icon: any;
50
+ title: any;
51
+ onClick(this: Quill, range: Range | null, _: any): void;
52
+ hideSearch?: undefined;
53
+ children?: undefined;
54
+ } | {
55
+ type: "group";
56
+ name: string;
57
+ alias: any[];
58
+ hideSearch: boolean;
59
+ icon: any;
60
+ title: any;
61
+ children: {
62
+ type: "item";
63
+ name: string;
64
+ alias: string[];
65
+ icon: any;
66
+ title: any;
67
+ onClick: (this: Quill, range: Range | null) => void;
68
+ }[];
69
+ })[];
70
+ }
71
+ export declare const shortKey: {
72
+ link: {
73
+ key: string;
74
+ shortKey: boolean;
75
+ handler(_: any, context: Context): void;
76
+ };
77
+ color: {
78
+ key: string;
79
+ altKey: boolean;
80
+ shortKey: boolean;
81
+ handler(): void;
82
+ };
83
+ background: {
84
+ key: string;
85
+ altKey: boolean;
86
+ shortKey: boolean;
87
+ handler(): void;
88
+ };
89
+ clean: {
90
+ key: string;
91
+ shortKey: boolean;
92
+ handler(this: {
93
+ quill: Quill;
94
+ }, range: Range): void;
95
+ };
96
+ };
97
+ export {};
@@ -0,0 +1,66 @@
1
+ import { Parchment } from 'quill';
2
+ import { Constructor } from '../../config/types';
3
+ import { default as FluentEditor } from '../../core/fluent-editor';
4
+
5
+ interface InternalModule {
6
+ show: () => void;
7
+ hide: () => void;
8
+ update: () => void;
9
+ destroy: () => void;
10
+ }
11
+ interface InternalTableSelectionModule extends InternalModule {
12
+ dragging: boolean;
13
+ boundary: {
14
+ x: number;
15
+ y: number;
16
+ x1: number;
17
+ y1: number;
18
+ width: number;
19
+ height: number;
20
+ } | null;
21
+ selectedTds: Parchment.Blot[];
22
+ cellSelect: HTMLElement;
23
+ tableMenu?: InternalModule;
24
+ computeSelectedTds: (startPoint: {
25
+ x: number;
26
+ y: number;
27
+ }, endPoint: {
28
+ x: number;
29
+ y: number;
30
+ }) => Parchment.Blot[];
31
+ updateWithSelectedTds: () => void;
32
+ }
33
+ export declare function generateTableUp(QuillTableUp: Constructor): {
34
+ new (quill: FluentEditor, options: Partial<any>): {
35
+ [x: string]: any;
36
+ tableSelection?: InternalTableSelectionModule;
37
+ quill: FluentEditor;
38
+ resolveTexts(options: Partial<Record<string, string>>): {
39
+ fullCheckboxText: any;
40
+ customBtnText: any;
41
+ confirmText: any;
42
+ cancelText: any;
43
+ rowText: any;
44
+ colText: any;
45
+ notPositiveNumberError: any;
46
+ custom: any;
47
+ clear: any;
48
+ transparent: any;
49
+ perWidthInsufficient: any;
50
+ CopyCell: any;
51
+ CutCell: any;
52
+ InsertTop: any;
53
+ InsertRight: any;
54
+ InsertBottom: any;
55
+ InsertLeft: any;
56
+ MergeCell: any;
57
+ SplitCell: any;
58
+ DeleteRow: any;
59
+ DeleteColumn: any;
60
+ DeleteTable: any;
61
+ BackgroundColor: any;
62
+ BorderColor: any;
63
+ } & Partial<Record<string, string>>;
64
+ };
65
+ };
66
+ export {};
@@ -1 +1,16 @@
1
+ import { default as TypePicker } from 'quill/ui/picker';
2
+ import { EasyColorPicker } from 'quill-easy-color';
3
+
4
+ declare const OriginPicker: typeof TypePicker;
5
+ export declare class Picker extends OriginPicker {
6
+ buildLabel(): HTMLSpanElement;
7
+ buildItem(option: HTMLOptionElement): HTMLSpanElement;
8
+ selectItem(item: HTMLElement | null, trigger?: boolean): void;
9
+ }
10
+ export declare class ColorPicker extends EasyColorPicker {
11
+ static clearText: string;
12
+ static customText: string;
13
+ constructor(select: HTMLSelectElement, label: string, options: any);
14
+ buildItem(option: HTMLOptionElement): any;
15
+ }
1
16
  export {};
@@ -1,4 +1,12 @@
1
- import { Module } from '../core/fluent-editor';
1
+ import { ThemeOptions } from 'quill/core/theme';
2
+ import { default as FluentEditor } from '../core/fluent-editor';
2
3
 
3
- declare const SnowTheme: typeof Module;
4
+ declare const OriginSnowTheme: any;
5
+ declare class SnowTheme extends OriginSnowTheme {
6
+ quill: FluentEditor;
7
+ constructor(quill: FluentEditor, options: ThemeOptions);
8
+ i18nTextToolbar(): void;
9
+ buildPickers(selects: NodeListOf<HTMLSelectElement>, icons: Record<string, string | Record<string, string>>): void;
10
+ extendToolbar(toolbar: any): void;
11
+ }
4
12
  export default SnowTheme;
@@ -5,8 +5,8 @@ export declare const BOLD_ICON = "<svg width=\"12px\" height=\"16px\" viewBox=\"
5
5
  export declare const ITALIC_ICON = "<svg width=\"9px\" height=\"16px\" viewBox=\"0 0 9 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g transform=\"translate(-4.000000, 0.000000)\" fill=\"#293040\">\n <path d=\"M10.2565501,1.5 L8.41332415,14.5 L12,14.5 L12,16 L4,16 L4,14.5 L6.90083611,14.5 L8.74406208,1.5 L5,1.5\n L5,0 L13,0 L13,1.5 L10.2565501,1.5 Z\"></path>\n </g>\n</g>\n</svg>";
6
6
  export declare const UNDERLINE_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <polygon fill=\"#293040\" points=\"2 14 14 14 14 16 2 16\"></polygon>\n <path d=\"M4.5,3 L4.5,7 C4.5,8.93299662 6.06700338,10.5 8,10.5 C9.93299662,10.5 11.5,8.93299662 11.5,7 L11.5,1.5\n L11.4998322,0 L13,0 L13,7 C13,9.76142375 10.7614237,12 8,12 C5.23857625,12 3,9.76142375 3,7 L3,0 L4.49893188,0\n L4.49893188,3 L4.5,3 Z\" fill=\"#293040\" fill-rule=\"nonzero\"></path>\n</g>\n</svg>";
7
7
  export declare const STRIKE_ICON = "<svg width=\"14px\" height=\"16px\" viewBox=\"0 0 14 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g transform=\"translate(-1.000000, 0.000000)\" fill=\"#293040\">\n <path d=\"M9.93321102,9 L1,9 L1,7 L3.84197169,7 C3.31015092,6.28495098 3,5.42507332 3,4.5 C3,2.01471863\n 5.23857625,0 8,0 C10.5736409,0 12.6931261,1.75002477 12.969484,4 L11.4507289,4 C11.1737591,2.60626201 9.76011738,1.5 8,1.5\n C6.03382604,1.5 4.5,2.88044344 4.5,4.5 C4.5,5.52604325 5.11562351,6.45611494 6.06678898,7 L15,7 L15,9 L12.1580283,9\n C12.6898491,9.71504902 13,10.5749267 13,11.5 C13,13.9852814 10.7614237,16 8,16 C5.42635908,16 3.30687393,14.2499752\n 3.03051599,12 L4.54927112,12 C4.82624092,13.393738 6.23988262,14.5 8,14.5 C9.96617396,14.5 11.5,13.1195566 11.5,11.5\n C11.5,10.4739568 10.8843765,9.54388506 9.93321102,9 Z\"></path>\n </g>\n</g>\n</svg>";
8
- export declare const COLOR_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <polygon fill=\"#293040\" points=\"2 14 14 14 14 16 2 16\"></polygon>\n <path d=\"M10.9166667,8.5 L5.08333333,8.5 L4.26618123,10.461165 L3.62338765,12 L2,12 L7,0 L9,0 L14,12 L12.3824972,12\n L11.5753038,10.0807292 L10.9166667,8.5 Z M10.2916667,7 L8,1.5 L5.70833333,7 L10.2916667,7 Z\"\n fill=\"#293040\" fill-rule=\"nonzero\"></path>\n</g>\n</svg>";
9
- export declare const BACKGROUND_COLOR_ICON = " <svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M4.64447006,9.66583547 L3.17597929,8.33216965 L6.15933183,5.11039074 L5.42508645,4.44355783\n L9.39179153,1.0658141e-13 L16,6.00149616 L12.0332949,10.445054 L11.2990495,9.77822108 L8.31569698,13 L6.84720621,11.6663342\n L5.69344476,12.9587937 L2.36400649,12.9587937 L2,12.6282074 L4.64447006,9.66583547 Z M4.57134219,8.25840959\n L8.24256911,11.5925741 L10.5648041,9.11138818 L6.89357722,5.77722364 L4.57134219,8.25840959 Z M14.6046371,6.07525623\n L9.4649194,1.40742588 L6.82044935,4.36979777 L11.960167,9.03762811 L14.6046371,6.07525623 Z M2,14 L14,14 L14,16 L2,16 L2,14 Z\"\n fill=\"#293040\"></path>\n</g>\n</svg>";
8
+ export declare const COLOR_ICON = "<svg viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <polygon class=\"ql-color-label\" points=\"2 14 14 14 14 16 2 16\"></polygon>\n <path d=\"M10.9166667,8.5 L5.08333333,8.5 L4.26618123,10.461165 L3.62338765,12 L2,12 L7,0 L9,0 L14,12 L12.3824972,12\n L11.5753038,10.0807292 L10.9166667,8.5 Z M10.2916667,7 L8,1.5 L5.70833333,7 L10.2916667,7 Z\"\n fill=\"#293040\" fill-rule=\"nonzero\"></path>\n</g>\n</svg>";
9
+ export declare const BACKGROUND_COLOR_ICON = "<svg viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <polygon class=\"ql-color-label\" points=\"2 14 14 14 14 16 2 16\"></polygon>\n <path class=\"ql-color-label\" d=\"M4.64447006,9.66583547 L3.17597929,8.33216965 L6.15933183,5.11039074 L5.42508645,4.44355783\n L9.39179153,1.0658141e-13 L16,6.00149616 L12.0332949,10.445054 L11.2990495,9.77822108 L8.31569698,13 L6.84720621,11.6663342\n L5.69344476,12.9587937 L2.36400649,12.9587937 L2,12.6282074 L4.64447006,9.66583547 Z M4.57134219,8.25840959\n L8.24256911,11.5925741 L10.5648041,9.11138818 L6.89357722,5.77722364 L4.57134219,8.25840959 Z M14.6046371,6.07525623\n L9.4649194,1.40742588 L6.82044935,4.36979777 L11.960167,9.03762811 L14.6046371,6.07525623 Z\"\n fill=\"#293040\"></path>\n</g>\n</svg>";
10
10
  export declare const ALIGN_LEFT_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M0,0 L1.5,0 L1.5,16 L0,16 L0,0 Z M4,3 L13,3 L13,7 L4,7 L4,3 Z M5,4 L5,6 L12,6 L12,4 L5,4 Z M4,9 L16,9\n L16,13 L4,13 L4,9 Z M5,10 L5,12 L15,12 L15,10 L5,10 Z\" fill=\"#293040\"></path>\n</g>\n</svg>";
11
11
  export declare const ALIGN_CENTER_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M8.75,7 L8.75,9 L16,9 L16,13 L8.75,13 L8.75,16 L7.25,16 L7.25,13 L0,13 L0,9 L7.25,9 L7.25,7 L2,7\n L2,3 L7.25,3 L7.25,0 L8.75,0 L8.75,3 L14,3 L14,7 L8.75,7 Z M1,10 L1,12 L15,12 L15,10 L1,10 Z M3,4 L3,6 L13,6\n L13,4 L3,4 Z\" fill=\"#293040\"></path>\n</g>\n</svg>";
12
12
  export declare const ALIGN_JUSTIFY_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 15 15\"><path fill=\"none\" stroke=\"currentColor\" d=\"M0 3.5h15m-15 8h15m-15-4h15\"/></svg>";
@@ -1,9 +0,0 @@
1
- const ON_WIKI_LINK_REMOVE = "wiki-link/remove";
2
- const ON_DOC_LINK_REMOVE = "doc-link/remove";
3
- const ON_WORK_ITEM_LINK_REMOVE = "work-item-link/remove";
4
- export {
5
- ON_DOC_LINK_REMOVE,
6
- ON_WIKI_LINK_REMOVE,
7
- ON_WORK_ITEM_LINK_REMOVE
8
- };
9
- //# sourceMappingURL=constants.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.es.js","sources":["../../../../src/modules/global-link/constants.ts"],"sourcesContent":["export const ON_WIKI_LINK_REMOVE = 'wiki-link/remove'\r\nexport const ON_DOC_LINK_REMOVE = 'doc-link/remove'\r\nexport const ON_WORK_ITEM_LINK_REMOVE = 'work-item-link/remove'\r\n"],"names":[],"mappings":"AAAO,MAAM,sBAAsB;AAC5B,MAAM,qBAAqB;AAC3B,MAAM,2BAA2B;"}
@@ -1,28 +0,0 @@
1
- import Quill from "quill";
2
- const BlockEmbed = Quill.imports["blots/block/embed"];
3
- class CustomerWidgetLink extends BlockEmbed {
4
- static create(value) {
5
- const node = super.create(value);
6
- node.setAttribute("data-widget-type", value.type);
7
- node.setAttribute("data-widget-id", value.id);
8
- node.setAttribute("src", value.value);
9
- return node;
10
- }
11
- static value(domNode) {
12
- return {
13
- type: domNode.getAttribute("data-widget-type"),
14
- id: domNode.getAttribute("data-widget-id"),
15
- value: domNode.getAttribute("src")
16
- };
17
- }
18
- constructor(scroll, domNode, data) {
19
- super(scroll, domNode, data);
20
- }
21
- }
22
- CustomerWidgetLink.blotName = "customer-widget-link";
23
- CustomerWidgetLink.tagName = "img";
24
- CustomerWidgetLink.className = "ql-customer-widget-link";
25
- export {
26
- CustomerWidgetLink as default
27
- };
28
- //# sourceMappingURL=customer-widget-link.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"customer-widget-link.es.js","sources":["../../../../../src/modules/global-link/formats/customer-widget-link.ts"],"sourcesContent":["import Quill from 'quill'\r\n\r\nconst BlockEmbed = Quill.imports['blots/block/embed']\r\n\r\n// @dynamic\r\nclass CustomerWidgetLink extends BlockEmbed {\r\n static blotName: string\r\n static tagName: string\r\n static className: string\r\n\r\n static create(value) {\r\n const node = super.create(value)\r\n node.setAttribute('data-widget-type', value.type)\r\n node.setAttribute('data-widget-id', value.id)\r\n node.setAttribute('src', value.value)\r\n return node\r\n }\r\n\r\n static value(domNode) {\r\n return {\r\n type: domNode.getAttribute('data-widget-type'),\r\n id: domNode.getAttribute('data-widget-id'),\r\n value: domNode.getAttribute('src'),\r\n }\r\n }\r\n\r\n constructor(scroll, domNode, data) {\r\n super(scroll, domNode, data)\r\n }\r\n}\r\n\r\nCustomerWidgetLink.blotName = 'customer-widget-link'\r\nCustomerWidgetLink.tagName = 'img'\r\nCustomerWidgetLink.className = 'ql-customer-widget-link'\r\n\r\nexport default CustomerWidgetLink\r\n"],"names":[],"mappings":";AAEA,MAAM,aAAa,MAAM,QAAQ,mBAAmB;AAGpD,MAAM,2BAA2B,WAAW;AAAA,EAK1C,OAAO,OAAO,OAAO;AACb,UAAA,OAAO,MAAM,OAAO,KAAK;AAC1B,SAAA,aAAa,oBAAoB,MAAM,IAAI;AAC3C,SAAA,aAAa,kBAAkB,MAAM,EAAE;AACvC,SAAA,aAAa,OAAO,MAAM,KAAK;AAC7B,WAAA;AAAA,EAAA;AAAA,EAGT,OAAO,MAAM,SAAS;AACb,WAAA;AAAA,MACL,MAAM,QAAQ,aAAa,kBAAkB;AAAA,MAC7C,IAAI,QAAQ,aAAa,gBAAgB;AAAA,MACzC,OAAO,QAAQ,aAAa,KAAK;AAAA,IACnC;AAAA,EAAA;AAAA,EAGF,YAAY,QAAQ,SAAS,MAAM;AAC3B,UAAA,QAAQ,SAAS,IAAI;AAAA,EAAA;AAE/B;AAEA,mBAAmB,WAAW;AAC9B,mBAAmB,UAAU;AAC7B,mBAAmB,YAAY;"}
@@ -1,42 +0,0 @@
1
- import Quill from "quill";
2
- import { ON_DOC_LINK_REMOVE } from "../constants.es.js";
3
- const Embed = Quill.imports["blots/embed"];
4
- class DocumentLink extends Embed {
5
- static create(value) {
6
- const node = super.create(value);
7
- node.setAttribute("href", value.link);
8
- node.setAttribute("title", value.text);
9
- node.setAttribute("target", "_blank");
10
- node.setAttribute("icon-link", value.icon);
11
- const icon = document.createElement("span");
12
- icon.classList.add("ql-doc-link-icon");
13
- icon.style.background = `url(${value.icon}) no-repeat center`;
14
- icon.style.backgroundSize = "contain";
15
- node.insertAdjacentElement("afterbegin", icon);
16
- const text = document.createTextNode(value.text);
17
- node.appendChild(text);
18
- return node;
19
- }
20
- static value(domNode) {
21
- return {
22
- link: domNode.getAttribute("href"),
23
- icon: domNode.getAttribute("icon-link"),
24
- text: domNode.textContent
25
- };
26
- }
27
- constructor(scroll, domNode, data) {
28
- super(scroll, domNode, data);
29
- this.docData = data;
30
- }
31
- remove() {
32
- this.scroll.emitter.emit(ON_DOC_LINK_REMOVE, this.docData);
33
- return super.remove();
34
- }
35
- }
36
- DocumentLink.blotName = "doc-link";
37
- DocumentLink.tagName = "A";
38
- DocumentLink.className = "ql-doc-link";
39
- export {
40
- DocumentLink as default
41
- };
42
- //# sourceMappingURL=doc-link.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"doc-link.es.js","sources":["../../../../../src/modules/global-link/formats/doc-link.ts"],"sourcesContent":["import Quill from 'quill'\r\nimport { ON_DOC_LINK_REMOVE } from '../constants'\r\n\r\nconst Embed = Quill.imports['blots/embed']\r\n\r\n// @dynamic\r\nclass DocumentLink extends Embed {\r\n static blotName: string\r\n static tagName: string\r\n static className: string\r\n docData: any\r\n scroll: any\r\n\r\n static create(value) {\r\n const node = super.create(value)\r\n node.setAttribute('href', value.link)\r\n node.setAttribute('title', value.text)\r\n node.setAttribute('target', '_blank')\r\n node.setAttribute('icon-link', value.icon)\r\n\r\n const icon = document.createElement('span')\r\n icon.classList.add('ql-doc-link-icon')\r\n icon.style.background = `url(${value.icon}) no-repeat center`\r\n icon.style.backgroundSize = 'contain'\r\n\r\n node.insertAdjacentElement('afterbegin', icon)\r\n const text = document.createTextNode(value.text)\r\n node.appendChild(text)\r\n return node\r\n }\r\n\r\n static value(domNode) {\r\n return {\r\n link: domNode.getAttribute('href'),\r\n icon: domNode.getAttribute('icon-link'),\r\n text: domNode.textContent,\r\n }\r\n }\r\n\r\n constructor(scroll, domNode, data) {\r\n super(scroll, domNode, data)\r\n this.docData = data\r\n }\r\n\r\n remove() {\r\n this.scroll.emitter.emit(ON_DOC_LINK_REMOVE, this.docData)\r\n return super.remove()\r\n }\r\n}\r\n\r\nDocumentLink.blotName = 'doc-link'\r\nDocumentLink.tagName = 'A'\r\nDocumentLink.className = 'ql-doc-link'\r\n\r\nexport default DocumentLink\r\n"],"names":[],"mappings":";;AAGA,MAAM,QAAQ,MAAM,QAAQ,aAAa;AAGzC,MAAM,qBAAqB,MAAM;AAAA,EAO/B,OAAO,OAAO,OAAO;AACb,UAAA,OAAO,MAAM,OAAO,KAAK;AAC1B,SAAA,aAAa,QAAQ,MAAM,IAAI;AAC/B,SAAA,aAAa,SAAS,MAAM,IAAI;AAChC,SAAA,aAAa,UAAU,QAAQ;AAC/B,SAAA,aAAa,aAAa,MAAM,IAAI;AAEnC,UAAA,OAAO,SAAS,cAAc,MAAM;AACrC,SAAA,UAAU,IAAI,kBAAkB;AACrC,SAAK,MAAM,aAAa,OAAO,MAAM,IAAI;AACzC,SAAK,MAAM,iBAAiB;AAEvB,SAAA,sBAAsB,cAAc,IAAI;AAC7C,UAAM,OAAO,SAAS,eAAe,MAAM,IAAI;AAC/C,SAAK,YAAY,IAAI;AACd,WAAA;AAAA,EAAA;AAAA,EAGT,OAAO,MAAM,SAAS;AACb,WAAA;AAAA,MACL,MAAM,QAAQ,aAAa,MAAM;AAAA,MACjC,MAAM,QAAQ,aAAa,WAAW;AAAA,MACtC,MAAM,QAAQ;AAAA,IAChB;AAAA,EAAA;AAAA,EAGF,YAAY,QAAQ,SAAS,MAAM;AAC3B,UAAA,QAAQ,SAAS,IAAI;AAC3B,SAAK,UAAU;AAAA,EAAA;AAAA,EAGjB,SAAS;AACP,SAAK,OAAO,QAAQ,KAAK,oBAAoB,KAAK,OAAO;AACzD,WAAO,MAAM,OAAO;AAAA,EAAA;AAExB;AAEA,aAAa,WAAW;AACxB,aAAa,UAAU;AACvB,aAAa,YAAY;"}
@@ -1,34 +0,0 @@
1
- import Quill from "quill";
2
- import { ON_WIKI_LINK_REMOVE } from "../constants.es.js";
3
- const Embed = Quill.imports["blots/embed"];
4
- class WikiLink extends Embed {
5
- static create(value) {
6
- const node = super.create(value);
7
- node.setAttribute("href", value.link);
8
- node.setAttribute("target", "_blank");
9
- node.setAttribute("title", value.text);
10
- node.textContent = value.text;
11
- return node;
12
- }
13
- static value(domNode) {
14
- return {
15
- link: domNode.getAttribute("href"),
16
- text: domNode.textContent
17
- };
18
- }
19
- constructor(scroll, domNode, data) {
20
- super(scroll, domNode, data);
21
- this.wikiData = data;
22
- }
23
- remove() {
24
- this.scroll.emitter.emit(ON_WIKI_LINK_REMOVE, this.wikiData);
25
- return super.remove();
26
- }
27
- }
28
- WikiLink.blotName = "wiki-link";
29
- WikiLink.tagName = "A";
30
- WikiLink.className = "ql-wiki-link";
31
- export {
32
- WikiLink as default
33
- };
34
- //# sourceMappingURL=wiki-link.es.js.map