@opentiny/fluent-editor 3.23.2 → 3.24.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 (267) hide show
  1. package/README.md +103 -102
  2. package/es/attributors/line-height.es.js.map +1 -1
  3. package/es/config/base64-image.es.js.map +1 -1
  4. package/es/config/editor.config.es.js.map +1 -1
  5. package/es/config/editor.utils.es.js.map +1 -1
  6. package/es/config/i18n/en-us.es.js.map +1 -1
  7. package/es/config/i18n/zh-cn.es.js.map +1 -1
  8. package/es/config/icons.config.es.js.map +1 -1
  9. package/es/config/index.es.js +15 -1
  10. package/es/config/index.es.js.map +1 -1
  11. package/es/counter/index.es.js.map +1 -1
  12. package/es/custom-clipboard.es.js.map +1 -1
  13. package/es/custom-image/BlotFormatter.es.js.map +1 -1
  14. package/es/custom-image/Options.es.js.map +1 -1
  15. package/es/custom-image/actions/Action.es.js.map +1 -1
  16. package/es/custom-image/actions/CustomResizeAction.es.js.map +1 -1
  17. package/es/custom-image/actions/DeleteAction.es.js.map +1 -1
  18. package/es/custom-image/image.es.js.map +1 -1
  19. package/es/custom-image/specs/BlotSpec.es.js.map +1 -1
  20. package/es/custom-image/specs/CustomImageSpec.es.js.map +1 -1
  21. package/es/custom-image/specs/ImageSpec.es.js.map +1 -1
  22. package/es/custom-uploader.es.js +13 -2
  23. package/es/custom-uploader.es.js.map +1 -1
  24. package/es/emoji/emoji-list/people.es.js.map +1 -1
  25. package/es/emoji/emoji-list.es.js.map +1 -1
  26. package/es/emoji/emoji-map.es.js.map +1 -1
  27. package/es/emoji/formats/emoji-blot.es.js.map +1 -1
  28. package/es/emoji/index.es.js.map +1 -1
  29. package/es/emoji/modules/emoji.es.js.map +1 -1
  30. package/es/emoji/modules/toolbar-emoji.es.js.map +1 -1
  31. package/es/emoji/utils.es.js.map +1 -1
  32. package/es/file/formats/file.es.js.map +1 -1
  33. package/es/file/index.es.js.map +1 -1
  34. package/es/file/modules/file-bar.es.js.map +1 -1
  35. package/es/fluent-editor.es.js +4 -1
  36. package/es/fluent-editor.es.js.map +1 -1
  37. package/es/global-link/constants.es.js.map +1 -1
  38. package/es/global-link/formats/customer-widget-link.es.js.map +1 -1
  39. package/es/global-link/formats/doc-link.es.js.map +1 -1
  40. package/es/global-link/formats/wiki-link.es.js.map +1 -1
  41. package/es/global-link/formats/work-item-link.es.js.map +1 -1
  42. package/es/global-link/index.es.js.map +1 -1
  43. package/es/global-link/utils/createTable.es.js.map +1 -1
  44. package/es/index.es.js +15 -1
  45. package/es/index.es.js.map +1 -1
  46. package/es/link/formats/link.es.js.map +1 -1
  47. package/es/link/index.es.js.map +1 -1
  48. package/es/link/modules/tooltip.es.js.map +1 -1
  49. package/es/mathlive/formats.es.js.map +1 -1
  50. package/es/mathlive/index.es.js.map +1 -1
  51. package/es/mathlive/tooltip.es.js.map +1 -1
  52. package/es/mention/Mention.es.js.map +1 -1
  53. package/es/mention/MentionLink.es.js.map +1 -1
  54. package/es/mention/constants.es.js.map +1 -1
  55. package/es/quick-menu/index.es.js.map +1 -1
  56. package/es/screenshot/index.es.js.map +1 -1
  57. package/es/soft-break/index.es.js.map +1 -1
  58. package/es/strike/index.es.js.map +1 -1
  59. package/es/syntax/index.es.js.map +1 -1
  60. package/es/table/better-table.es.js +53 -1
  61. package/es/table/better-table.es.js.map +1 -1
  62. package/es/table/formats/header.es.js.map +1 -1
  63. package/es/table/formats/list.es.js.map +1 -1
  64. package/es/table/formats/table.es.js.map +1 -1
  65. package/es/table/modules/table-column-tool.es.js.map +1 -1
  66. package/es/table/modules/table-operation-menu.es.js +9 -3
  67. package/es/table/modules/table-operation-menu.es.js.map +1 -1
  68. package/es/table/modules/table-scroll-bar.es.js.map +1 -1
  69. package/es/table/modules/table-selection.es.js.map +1 -1
  70. package/es/table/modules/table-selector.es.js +158 -0
  71. package/es/table/modules/table-selector.es.js.map +1 -0
  72. package/es/table/table-config.es.js.map +1 -1
  73. package/es/table/utils/index.es.js.map +1 -1
  74. package/es/table/utils/node-matchers.es.js.map +1 -1
  75. package/es/toolbar/better-picker.es.js.map +1 -1
  76. package/es/toolbar/index.es.js.map +1 -1
  77. package/es/utils/debounce.es.js.map +1 -1
  78. package/es/utils/method.es.js.map +1 -1
  79. package/es/video/index.es.js.map +1 -1
  80. package/lib/attributors/line-height.cjs.js.map +1 -1
  81. package/lib/config/base64-image.cjs.js.map +1 -1
  82. package/lib/config/editor.config.cjs.js.map +1 -1
  83. package/lib/config/editor.utils.cjs.js.map +1 -1
  84. package/lib/config/i18n/en-us.cjs.js.map +1 -1
  85. package/lib/config/i18n/zh-cn.cjs.js.map +1 -1
  86. package/lib/config/icons.config.cjs.js.map +1 -1
  87. package/lib/config/index.cjs.js +13 -0
  88. package/lib/config/index.cjs.js.map +1 -1
  89. package/lib/counter/index.cjs.js.map +1 -1
  90. package/lib/custom-clipboard.cjs.js.map +1 -1
  91. package/lib/custom-image/BlotFormatter.cjs.js.map +1 -1
  92. package/lib/custom-image/Options.cjs.js.map +1 -1
  93. package/lib/custom-image/actions/Action.cjs.js.map +1 -1
  94. package/lib/custom-image/actions/CustomResizeAction.cjs.js.map +1 -1
  95. package/lib/custom-image/actions/DeleteAction.cjs.js.map +1 -1
  96. package/lib/custom-image/image.cjs.js.map +1 -1
  97. package/lib/custom-image/specs/BlotSpec.cjs.js.map +1 -1
  98. package/lib/custom-image/specs/CustomImageSpec.cjs.js.map +1 -1
  99. package/lib/custom-image/specs/ImageSpec.cjs.js.map +1 -1
  100. package/lib/custom-uploader.cjs.js +13 -2
  101. package/lib/custom-uploader.cjs.js.map +1 -1
  102. package/lib/emoji/emoji-list/people.cjs.js.map +1 -1
  103. package/lib/emoji/emoji-list.cjs.js.map +1 -1
  104. package/lib/emoji/emoji-map.cjs.js.map +1 -1
  105. package/lib/emoji/formats/emoji-blot.cjs.js.map +1 -1
  106. package/lib/emoji/index.cjs.js.map +1 -1
  107. package/lib/emoji/modules/emoji.cjs.js.map +1 -1
  108. package/lib/emoji/modules/toolbar-emoji.cjs.js.map +1 -1
  109. package/lib/emoji/utils.cjs.js.map +1 -1
  110. package/lib/file/formats/file.cjs.js.map +1 -1
  111. package/lib/file/index.cjs.js.map +1 -1
  112. package/lib/file/modules/file-bar.cjs.js.map +1 -1
  113. package/lib/fluent-editor.cjs.js +4 -1
  114. package/lib/fluent-editor.cjs.js.map +1 -1
  115. package/lib/global-link/constants.cjs.js.map +1 -1
  116. package/lib/global-link/formats/customer-widget-link.cjs.js.map +1 -1
  117. package/lib/global-link/formats/doc-link.cjs.js.map +1 -1
  118. package/lib/global-link/formats/wiki-link.cjs.js.map +1 -1
  119. package/lib/global-link/formats/work-item-link.cjs.js.map +1 -1
  120. package/lib/global-link/index.cjs.js.map +1 -1
  121. package/lib/global-link/utils/createTable.cjs.js.map +1 -1
  122. package/lib/index.cjs.js +14 -0
  123. package/lib/index.cjs.js.map +1 -1
  124. package/lib/link/formats/link.cjs.js.map +1 -1
  125. package/lib/link/index.cjs.js.map +1 -1
  126. package/lib/link/modules/tooltip.cjs.js.map +1 -1
  127. package/lib/mathlive/formats.cjs.js.map +1 -1
  128. package/lib/mathlive/index.cjs.js.map +1 -1
  129. package/lib/mathlive/tooltip.cjs.js.map +1 -1
  130. package/lib/mention/Mention.cjs.js.map +1 -1
  131. package/lib/mention/MentionLink.cjs.js.map +1 -1
  132. package/lib/mention/constants.cjs.js.map +1 -1
  133. package/lib/quick-menu/index.cjs.js.map +1 -1
  134. package/lib/screenshot/index.cjs.js.map +1 -1
  135. package/lib/soft-break/index.cjs.js.map +1 -1
  136. package/lib/strike/index.cjs.js.map +1 -1
  137. package/lib/syntax/index.cjs.js.map +1 -1
  138. package/lib/table/better-table.cjs.js +55 -3
  139. package/lib/table/better-table.cjs.js.map +1 -1
  140. package/lib/table/formats/header.cjs.js.map +1 -1
  141. package/lib/table/formats/list.cjs.js.map +1 -1
  142. package/lib/table/formats/table.cjs.js.map +1 -1
  143. package/lib/table/modules/table-column-tool.cjs.js.map +1 -1
  144. package/lib/table/modules/table-operation-menu.cjs.js +9 -3
  145. package/lib/table/modules/table-operation-menu.cjs.js.map +1 -1
  146. package/lib/table/modules/table-scroll-bar.cjs.js.map +1 -1
  147. package/lib/table/modules/table-selection.cjs.js.map +1 -1
  148. package/lib/table/modules/table-selector.cjs.js +158 -0
  149. package/lib/table/modules/table-selector.cjs.js.map +1 -0
  150. package/lib/table/table-config.cjs.js.map +1 -1
  151. package/lib/table/utils/index.cjs.js.map +1 -1
  152. package/lib/table/utils/node-matchers.cjs.js.map +1 -1
  153. package/lib/toolbar/better-picker.cjs.js.map +1 -1
  154. package/lib/toolbar/index.cjs.js.map +1 -1
  155. package/lib/utils/debounce.cjs.js.map +1 -1
  156. package/lib/utils/method.cjs.js.map +1 -1
  157. package/lib/video/index.cjs.js.map +1 -1
  158. package/package.json +57 -57
  159. package/style.css +3 -3
  160. package/types/attributors/font-size.d.ts +1 -1
  161. package/types/attributors/font-style.d.ts +1 -1
  162. package/types/attributors/index.d.ts +4 -4
  163. package/types/attributors/line-height.d.ts +1 -1
  164. package/types/attributors/text-indent.d.ts +1 -1
  165. package/types/config/base64-image.d.ts +3 -3
  166. package/types/config/editor.config.d.ts +225 -225
  167. package/types/config/editor.utils.d.ts +42 -42
  168. package/types/config/i18n/en-us.d.ts +106 -106
  169. package/types/config/i18n/zh-cn.d.ts +106 -106
  170. package/types/config/icons.config.d.ts +34 -34
  171. package/types/config/index.d.ts +9 -8
  172. package/types/config/types/additional-toolbar-item.interface.d.ts +7 -6
  173. package/types/config/types/content-change.interface.d.ts +13 -13
  174. package/types/config/types/content-save.interface.d.ts +6 -6
  175. package/types/config/types/counter-option.interface.d.ts +8 -7
  176. package/types/config/types/editor-config.interface.d.ts +26 -18
  177. package/types/config/types/editor-modules.interface.d.ts +30 -29
  178. package/types/config/types/editor-toolbar.interface.d.ts +4 -3
  179. package/types/config/types/file-operation.interface.d.ts +11 -10
  180. package/types/config/types/focus-change.interface.d.ts +4 -4
  181. package/types/config/types/fullscreen-module.interface.d.ts +4 -4
  182. package/types/config/types/help-panel-item.interface.d.ts +5 -5
  183. package/types/config/types/help-panel-option.interface.d.ts +6 -5
  184. package/types/config/types/image-module.interface.d.ts +3 -3
  185. package/types/config/types/image-upload.interface.d.ts +6 -5
  186. package/types/config/types/index.d.ts +23 -23
  187. package/types/config/types/load-on-demand-module.interface.d.ts +5 -5
  188. package/types/config/types/mention-module.interface.d.ts +8 -8
  189. package/types/config/types/paste-change.interface.d.ts +5 -4
  190. package/types/config/types/quick-menu-module.interface.d.ts +3 -3
  191. package/types/config/types/range.interface.d.ts +4 -4
  192. package/types/config/types/registry-options.interface.d.ts +5 -5
  193. package/types/config/types/selection-change.interface.d.ts +7 -6
  194. package/types/config/types/toolbar-item.interface.d.ts +13 -13
  195. package/types/config/types/type.d.ts +4 -3
  196. package/types/config/types/validate-error.interface.d.ts +13 -13
  197. package/types/counter/index.d.ts +15 -14
  198. package/types/custom-clipboard.d.ts +27 -26
  199. package/types/custom-image/BlotFormatter.d.ts +21 -20
  200. package/types/custom-image/Options.d.ts +36 -36
  201. package/types/custom-image/actions/Action.d.ts +7 -7
  202. package/types/custom-image/actions/CustomResizeAction.d.ts +23 -22
  203. package/types/custom-image/actions/DeleteAction.d.ts +6 -5
  204. package/types/custom-image/image.d.ts +28 -28
  205. package/types/custom-image/specs/BlotSpec.d.ts +11 -10
  206. package/types/custom-image/specs/CustomImageSpec.d.ts +18 -17
  207. package/types/custom-image/specs/ImageSpec.d.ts +9 -8
  208. package/types/custom-uploader.d.ts +30 -28
  209. package/types/emoji/emoji-list/index.d.ts +1 -1
  210. package/types/emoji/emoji-list/people.d.ts +1 -1
  211. package/types/emoji/emoji-list.d.ts +2 -2
  212. package/types/emoji/emoji-map.d.ts +2 -2
  213. package/types/emoji/formats/emoji-blot.d.ts +13 -13
  214. package/types/emoji/index.d.ts +7 -6
  215. package/types/emoji/modules/emoji.d.ts +38 -38
  216. package/types/emoji/modules/toolbar-emoji.d.ts +8 -8
  217. package/types/emoji/utils.d.ts +1 -1
  218. package/types/file/formats/file.d.ts +15 -15
  219. package/types/file/index.d.ts +10 -9
  220. package/types/file/modules/file-bar.d.ts +14 -14
  221. package/types/fluent-editor.d.ts +13 -12
  222. package/types/format-painter/index.d.ts +14 -13
  223. package/types/fullscreen/handler.d.ts +2 -1
  224. package/types/global-link/constants.d.ts +3 -3
  225. package/types/global-link/formats/customer-widget-link.d.ts +14 -14
  226. package/types/global-link/formats/doc-link.d.ts +17 -17
  227. package/types/global-link/formats/wiki-link.d.ts +16 -16
  228. package/types/global-link/formats/work-item-link.d.ts +16 -16
  229. package/types/global-link/global-link-panel.d.ts +18 -17
  230. package/types/global-link/index.d.ts +18 -18
  231. package/types/global-link/utils/createTable.d.ts +1 -1
  232. package/types/index.d.ts +3 -2
  233. package/types/link/formats/link.d.ts +15 -14
  234. package/types/link/index.d.ts +6 -6
  235. package/types/link/modules/tooltip.d.ts +32 -31
  236. package/types/mathlive/formats.d.ts +21 -20
  237. package/types/mathlive/index.d.ts +7 -6
  238. package/types/mathlive/tooltip.d.ts +15 -14
  239. package/types/mention/Mention.d.ts +54 -53
  240. package/types/mention/MentionLink.d.ts +15 -14
  241. package/types/mention/constants.d.ts +3 -3
  242. package/types/quick-menu/index.d.ts +21 -20
  243. package/types/screenshot/index.d.ts +18 -17
  244. package/types/soft-break/index.d.ts +14 -14
  245. package/types/strike/index.d.ts +7 -7
  246. package/types/syntax/index.d.ts +13 -12
  247. package/types/table/better-table.d.ts +33 -24
  248. package/types/table/formats/header.d.ts +22 -22
  249. package/types/table/formats/list.d.ts +34 -34
  250. package/types/table/formats/table.d.ts +146 -145
  251. package/types/table/modules/table-column-tool.d.ts +23 -23
  252. package/types/table/modules/table-operation-menu.d.ts +38 -38
  253. package/types/table/modules/table-scroll-bar.d.ts +33 -33
  254. package/types/table/modules/table-selection.d.ts +37 -37
  255. package/types/table/modules/table-selector.d.ts +22 -0
  256. package/types/table/table-config.d.ts +38 -38
  257. package/types/table/utils/index.d.ts +17 -17
  258. package/types/table/utils/node-matchers.d.ts +9 -9
  259. package/types/toolbar/better-picker.d.ts +1 -1
  260. package/types/toolbar/index.d.ts +8 -7
  261. package/types/toolbar/toolbar-tip.d.ts +7 -6
  262. package/types/utils/debounce.d.ts +6 -6
  263. package/types/utils/image.d.ts +1 -1
  264. package/types/utils/is.d.ts +2 -2
  265. package/types/utils/method.d.ts +6 -6
  266. package/types/utils/scroll-lock.d.ts +6 -6
  267. package/types/video/index.d.ts +15 -14
@@ -1,7 +1,8 @@
1
1
  import { AnyFunction } from './type';
2
- export interface IAdditionalToolItemData {
3
- name: string;
4
- content: string;
5
- icon: string;
6
- handler: AnyFunction;
7
- }
2
+
3
+ export interface IAdditionalToolItemData {
4
+ name: string;
5
+ content: string;
6
+ icon: string;
7
+ handler: AnyFunction;
8
+ }
@@ -1,13 +1,13 @@
1
- export interface IContentChange {
2
- content: any;
3
- delta: any;
4
- editor: any;
5
- html: string | null;
6
- oldDelta: any;
7
- source: string;
8
- text: string;
9
- textCount: number;
10
- wordCount: number;
11
- htmlCount: number;
12
- isChanged?: boolean;
13
- }
1
+ export interface IContentChange {
2
+ content: any;
3
+ delta: any;
4
+ editor: any;
5
+ html: string | null;
6
+ oldDelta: any;
7
+ source: string;
8
+ text: string;
9
+ textCount: number;
10
+ wordCount: number;
11
+ htmlCount: number;
12
+ isChanged?: boolean;
13
+ }
@@ -1,6 +1,6 @@
1
- export interface IContentSave {
2
- editor: any;
3
- content: any;
4
- html: string | null;
5
- text: string;
6
- }
1
+ export interface IContentSave {
2
+ editor: any;
3
+ content: any;
4
+ html: string | null;
5
+ text: string;
6
+ }
@@ -1,8 +1,9 @@
1
1
  import { AnyFunction } from './type';
2
- export interface ICounterOption {
3
- format?: 'text' | 'html';
4
- unit?: 'word' | 'char';
5
- count?: number;
6
- template?: string | AnyFunction;
7
- errorTemplate?: string | AnyFunction;
8
- }
2
+
3
+ export interface ICounterOption {
4
+ format?: 'text' | 'html';
5
+ unit?: 'word' | 'char';
6
+ count?: number;
7
+ template?: string | AnyFunction;
8
+ errorTemplate?: string | AnyFunction;
9
+ }
@@ -2,21 +2,29 @@ import { QuillOptions } from 'quill';
2
2
  import { ScreenShotOptions } from '../../screenshot';
3
3
  import { IEditorModules } from './editor-modules.interface';
4
4
  import { EditorFormat } from './type';
5
- export interface IEditorConfig extends QuillOptions {
6
- format?: EditorFormat;
7
- modules?: IEditorModules;
8
- screenshotOnStaticPage?: boolean;
9
- scrollingContainer?: HTMLElement | string | null;
10
- trackChanges?: 'user' | 'all';
11
- autoProtocol?: boolean | string;
12
- editorPaste?: any;
13
- uploadOption?: {
14
- imageUploadToServer?: boolean;
15
- imageAccept?: Array<string>[] | string;
16
- fileAccept?: Array<string>[] | string;
17
- isVideoPlay?: boolean;
18
- };
19
- screenshot?: Partial<ScreenShotOptions>;
20
- lang?: string;
21
- langText?: Record<string, string>;
22
- }
5
+
6
+ export interface IEditorConfig extends QuillOptions {
7
+ format?: EditorFormat;
8
+ modules?: IEditorModules;
9
+ screenshotOnStaticPage?: boolean;
10
+ scrollingContainer?: HTMLElement | string | null;
11
+ trackChanges?: 'user' | 'all';
12
+ autoProtocol?: boolean | string;
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
+ isVideoPlay?: boolean;
23
+ maxSize?: Number;
24
+ success?: (file: File) => void;
25
+ fail?: (file: File) => void;
26
+ };
27
+ screenshot?: Partial<ScreenShotOptions>;
28
+ lang?: string;
29
+ langText?: Record<string, string>;
30
+ }
@@ -1,30 +1,31 @@
1
1
  import { ToolbarOption } from './type';
2
- export interface IEditorModules {
3
- [key: string]: any;
4
- clipboard?: {
5
- matchers?: any[];
6
- matchVisual?: boolean;
7
- } | boolean;
8
- history?: {
9
- delay?: number;
10
- maxStack?: number;
11
- userOnly?: boolean;
12
- } | boolean;
13
- keyboard?: {
14
- bindings?: any;
15
- } | boolean;
16
- syntax?: {
17
- interval?: number;
18
- languages?: {
19
- key: string;
20
- label: string;
21
- }[];
22
- hljs?: any;
23
- } | boolean;
24
- toolbar?: (string | string[])[][] | ToolbarOption | string | {
25
- container?: string | string[] | ToolbarOption;
26
- handlers?: {
27
- [key: string]: any;
28
- };
29
- } | boolean;
30
- }
2
+
3
+ export interface IEditorModules {
4
+ [key: string]: any;
5
+ clipboard?: {
6
+ matchers?: any[];
7
+ matchVisual?: boolean;
8
+ } | boolean;
9
+ history?: {
10
+ delay?: number;
11
+ maxStack?: number;
12
+ userOnly?: boolean;
13
+ } | boolean;
14
+ keyboard?: {
15
+ bindings?: any;
16
+ } | boolean;
17
+ syntax?: {
18
+ interval?: number;
19
+ languages?: {
20
+ key: string;
21
+ label: string;
22
+ }[];
23
+ hljs?: any;
24
+ } | boolean;
25
+ toolbar?: (string | string[])[][] | ToolbarOption | string | {
26
+ container?: string | string[] | ToolbarOption;
27
+ handlers?: {
28
+ [key: string]: any;
29
+ };
30
+ } | boolean;
31
+ }
@@ -1,5 +1,6 @@
1
1
  import { default as Toolbar } from 'quill/modules/toolbar';
2
2
  import { FluentEditor } from '../../fluent-editor';
3
- export interface FluentEditorToolbar extends Toolbar {
4
- quill: FluentEditor;
5
- }
3
+
4
+ export interface FluentEditorToolbar extends Toolbar {
5
+ quill: FluentEditor;
6
+ }
@@ -1,11 +1,12 @@
1
1
  import { AnyFunction } from './type';
2
- export interface FileOperation {
3
- operation: string;
4
- hasRejectedFile?: boolean;
5
- data: {
6
- fileId?: string;
7
- file?: File;
8
- files?: Array<File>;
9
- };
10
- callback?: AnyFunction;
11
- }
2
+
3
+ export interface FileOperation {
4
+ operation: string;
5
+ hasRejectedFile?: boolean;
6
+ data: {
7
+ fileId?: string;
8
+ file?: File;
9
+ files?: Array<File>;
10
+ };
11
+ callback?: AnyFunction;
12
+ }
@@ -1,4 +1,4 @@
1
- export interface IFocusChange {
2
- editor: any;
3
- source: string;
4
- }
1
+ export interface IFocusChange {
2
+ editor: any;
3
+ source: string;
4
+ }
@@ -1,4 +1,4 @@
1
- export interface IFullscreenModule {
2
- mode?: 'normal' | 'immersive';
3
- zIndex: number;
4
- }
1
+ export interface IFullscreenModule {
2
+ mode?: 'normal' | 'immersive';
3
+ zIndex: number;
4
+ }
@@ -1,5 +1,5 @@
1
- export interface IHelpPanelItem {
2
- icon: string;
3
- text: string;
4
- hotkey: string[];
5
- }
1
+ export interface IHelpPanelItem {
2
+ icon: string;
3
+ text: string;
4
+ hotkey: string[];
5
+ }
@@ -1,6 +1,7 @@
1
1
  import { IHelpPanelItem } from './help-panel-item.interface';
2
- export interface IHelpPanelOption {
3
- id: string;
4
- title: string;
5
- content: IHelpPanelItem[];
6
- }
2
+
3
+ export interface IHelpPanelOption {
4
+ id: string;
5
+ title: string;
6
+ content: IHelpPanelItem[];
7
+ }
@@ -1,3 +1,3 @@
1
- export interface ImageModule {
2
- zIndex: number;
3
- }
1
+ export interface ImageModule {
2
+ zIndex: number;
3
+ }
@@ -1,6 +1,7 @@
1
1
  import { AnyFunction } from './type';
2
- export interface ImageUpload {
3
- file: File;
4
- hasRejectedImage?: boolean;
5
- callback: AnyFunction;
6
- }
2
+
3
+ export interface ImageUpload {
4
+ file: File;
5
+ hasRejectedImage?: boolean;
6
+ callback: AnyFunction;
7
+ }
@@ -1,23 +1,23 @@
1
- export * from './additional-toolbar-item.interface';
2
- export * from './content-change.interface';
3
- export * from './content-save.interface';
4
- export * from './counter-option.interface';
5
- export * from './editor-config.interface';
6
- export * from './editor-modules.interface';
7
- export * from './editor-toolbar.interface';
8
- export * from './file-operation.interface';
9
- export * from './focus-change.interface';
10
- export * from './fullscreen-module.interface';
11
- export * from './help-panel-option.interface';
12
- export * from './image-module.interface';
13
- export * from './image-upload.interface';
14
- export * from './load-on-demand-module.interface';
15
- export * from './mention-module.interface';
16
- export * from './paste-change.interface';
17
- export * from './quick-menu-module.interface';
18
- export * from './range.interface';
19
- export * from './registry-options.interface';
20
- export * from './selection-change.interface';
21
- export * from './toolbar-item.interface';
22
- export * from './type';
23
- export * from './validate-error.interface';
1
+ export * from './additional-toolbar-item.interface';
2
+ export * from './content-change.interface';
3
+ export * from './content-save.interface';
4
+ export * from './counter-option.interface';
5
+ export * from './editor-config.interface';
6
+ export * from './editor-modules.interface';
7
+ export * from './editor-toolbar.interface';
8
+ export * from './file-operation.interface';
9
+ export * from './focus-change.interface';
10
+ export * from './fullscreen-module.interface';
11
+ export * from './help-panel-option.interface';
12
+ export * from './image-module.interface';
13
+ export * from './image-upload.interface';
14
+ export * from './load-on-demand-module.interface';
15
+ export * from './mention-module.interface';
16
+ export * from './paste-change.interface';
17
+ export * from './quick-menu-module.interface';
18
+ export * from './range.interface';
19
+ export * from './registry-options.interface';
20
+ export * from './selection-change.interface';
21
+ export * from './toolbar-item.interface';
22
+ export * from './type';
23
+ export * from './validate-error.interface';
@@ -1,5 +1,5 @@
1
- export interface ILoadOnDemandModule {
2
- mode?: 'line' | 'text';
3
- limit?: number;
4
- lazy?: boolean;
5
- }
1
+ export interface ILoadOnDemandModule {
2
+ mode?: 'line' | 'text';
3
+ limit?: number;
4
+ lazy?: boolean;
5
+ }
@@ -1,8 +1,8 @@
1
- export interface IMentionModule {
2
- data: object[];
3
- itemKey: string;
4
- searchKey: string;
5
- mentionSearchFn?: (term: string) => Promise<any[]>;
6
- mentionSelect?: any;
7
- mentionRemove?: any;
8
- }
1
+ export interface IMentionModule {
2
+ data: object[];
3
+ itemKey: string;
4
+ searchKey: string;
5
+ mentionSearchFn?: (term: string) => Promise<any[]>;
6
+ mentionSelect?: any;
7
+ mentionRemove?: any;
8
+ }
@@ -1,5 +1,6 @@
1
1
  import { AnyFunction } from './type';
2
- export interface IPasteChange {
3
- files: File[];
4
- callback: AnyFunction;
5
- }
2
+
3
+ export interface IPasteChange {
4
+ files: File[];
5
+ callback: AnyFunction;
6
+ }
@@ -1,3 +1,3 @@
1
- export interface IQuickMenuModule {
2
- zIndex: number;
3
- }
1
+ export interface IQuickMenuModule {
2
+ zIndex: number;
3
+ }
@@ -1,4 +1,4 @@
1
- export interface IRange {
2
- index: number;
3
- length: number;
4
- }
1
+ export interface IRange {
2
+ index: number;
3
+ length: number;
4
+ }
@@ -1,5 +1,5 @@
1
- export interface IRegistryOption {
2
- importUrl?: string;
3
- params?: any;
4
- register?: any;
5
- }
1
+ export interface IRegistryOption {
2
+ importUrl?: string;
3
+ params?: any;
4
+ register?: any;
5
+ }
@@ -1,7 +1,8 @@
1
1
  import { IRange } from './range.interface';
2
- export interface ISelectionChange {
3
- editor: any;
4
- oldRange: IRange | null;
5
- range: IRange | null;
6
- source: string;
7
- }
2
+
3
+ export interface ISelectionChange {
4
+ editor: any;
5
+ oldRange: IRange | null;
6
+ range: IRange | null;
7
+ source: string;
8
+ }
@@ -1,13 +1,13 @@
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[];
13
- }
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[];
13
+ }
@@ -1,4 +1,5 @@
1
1
  import { IToolbarItem } from './toolbar-item.interface';
2
- export type ToolbarOption = (string[] | IToolbarItem[] | string | IToolbarItem)[];
3
- export type EditorFormat = 'object' | 'json' | 'html' | 'text';
4
- export type AnyFunction = (...args: any[]) => any;
2
+
3
+ export type ToolbarOption = (string[] | IToolbarItem[] | string | IToolbarItem)[];
4
+ export type EditorFormat = 'object' | 'json' | 'html' | 'text';
5
+ export type AnyFunction = (...args: any[]) => any;
@@ -1,13 +1,13 @@
1
- export interface IValidateError {
2
- minLengthError?: {
3
- given: number;
4
- minLength: number;
5
- };
6
- maxLengthError?: {
7
- given: number;
8
- maxLength: number;
9
- };
10
- requiredError?: {
11
- empty: boolean;
12
- };
13
- }
1
+ export interface IValidateError {
2
+ minLengthError?: {
3
+ given: number;
4
+ minLength: number;
5
+ };
6
+ maxLengthError?: {
7
+ given: number;
8
+ maxLength: number;
9
+ };
10
+ requiredError?: {
11
+ empty: boolean;
12
+ };
13
+ }
@@ -1,16 +1,17 @@
1
1
  import { FluentEditor } from 'src/fluent-editor';
2
2
  import { ICounterOption } from '../config/types';
3
- export default class Counter {
4
- quill: FluentEditor;
5
- container: HTMLDivElement;
6
- options: ICounterOption;
7
- constructor(quill: FluentEditor, options: ICounterOption);
8
- resolveOptions(options: ICounterOption): {
9
- format: string;
10
- unit: string;
11
- template: string;
12
- count: number;
13
- } & ICounterOption;
14
- renderCount: () => void;
15
- getContentLength(format: any): number;
16
- }
3
+
4
+ export default class Counter {
5
+ quill: FluentEditor;
6
+ container: HTMLDivElement;
7
+ options: ICounterOption;
8
+ constructor(quill: FluentEditor, options: ICounterOption);
9
+ resolveOptions(options: ICounterOption): {
10
+ format: string;
11
+ unit: string;
12
+ template: string;
13
+ count: number;
14
+ } & ICounterOption;
15
+ renderCount: () => void;
16
+ getContentLength(format: any): number;
17
+ }
@@ -1,28 +1,29 @@
1
1
  import { default as TypeClipboard } from 'quill/modules/clipboard';
2
2
  import { FluentEditor } from './fluent-editor';
3
- declare const Clipboard: typeof TypeClipboard;
4
- declare class CustomClipboard extends Clipboard {
5
- quill: FluentEditor;
6
- convert: any;
7
- onCopy: any;
8
- matchers: any;
9
- prepareMatching(container: any, nodeMatches: any): any[][];
10
- onCaptureCopy(e: any, isCut?: boolean): void;
11
- onCapturePaste(e: ClipboardEvent): void;
12
- onPaste(range: any, { html, text, files: clipboardFiles, rtf }: {
13
- html: any;
14
- text: any;
15
- files: any;
16
- rtf: any;
17
- }): void;
18
- files2urls(files: any, placeholders: any, originalUrls: any, pastedDelta: any, imageIndexs: any): Promise<any[]>;
19
- flipFilesArray(filesArr: any): any[][];
20
- convertHexToBase64(hexString: any): string;
21
- extractImageDataFromRtf(rtfData: any): any[];
22
- extractFilesFromDelta(delta: any, clipboardFiles: any, hexImages?: any): Promise<any[]>;
23
- getImgSelection(delta: any, imageIndex: any): {
24
- index: number;
25
- length: number;
26
- };
27
- }
28
- export default CustomClipboard;
3
+
4
+ declare const Clipboard: typeof TypeClipboard;
5
+ declare class CustomClipboard extends Clipboard {
6
+ quill: FluentEditor;
7
+ convert: any;
8
+ onCopy: any;
9
+ matchers: any;
10
+ prepareMatching(container: any, nodeMatches: any): any[][];
11
+ onCaptureCopy(e: any, isCut?: boolean): void;
12
+ onCapturePaste(e: ClipboardEvent): void;
13
+ onPaste(range: any, { html, text, files: clipboardFiles, rtf }: {
14
+ html: any;
15
+ text: any;
16
+ files: any;
17
+ rtf: any;
18
+ }): void;
19
+ files2urls(files: any, placeholders: any, originalUrls: any, pastedDelta: any, imageIndexs: any): Promise<any[]>;
20
+ flipFilesArray(filesArr: any): any[][];
21
+ convertHexToBase64(hexString: any): string;
22
+ extractImageDataFromRtf(rtfData: any): any[];
23
+ extractFilesFromDelta(delta: any, clipboardFiles: any, hexImages?: any): Promise<any[]>;
24
+ getImgSelection(delta: any, imageIndex: any): {
25
+ index: number;
26
+ length: number;
27
+ };
28
+ }
29
+ export default CustomClipboard;
@@ -1,23 +1,24 @@
1
1
  import { default as Action } from './actions/Action';
2
2
  import { Options } from './Options';
3
3
  import { default as BlotSpec } from './specs/BlotSpec';
4
- export default class BlotFormatter {
5
- quill: any;
6
- options: Options;
7
- currentSpec: BlotSpec;
8
- specs: BlotSpec[];
9
- overlay: HTMLElement;
10
- actions: Action[];
11
- observer: any;
12
- static register(): void;
13
- constructor(quill: any, options?: any);
14
- show(spec: BlotSpec): void;
15
- hide(): void;
16
- update(): void;
17
- createActions(spec: BlotSpec): void;
18
- destroyActions(): void;
19
- repositionOverlay(): void;
20
- setUserSelect(value: string): void;
21
- onClick: () => void;
22
- hideImageOverlay: (event: any) => void;
23
- }
4
+
5
+ export default class BlotFormatter {
6
+ quill: any;
7
+ options: Options;
8
+ currentSpec: BlotSpec;
9
+ specs: BlotSpec[];
10
+ overlay: HTMLElement;
11
+ actions: Action[];
12
+ observer: any;
13
+ static register(): void;
14
+ constructor(quill: any, options?: any);
15
+ show(spec: BlotSpec): void;
16
+ hide(): void;
17
+ update(): void;
18
+ createActions(spec: BlotSpec): void;
19
+ destroyActions(): void;
20
+ repositionOverlay(): void;
21
+ setUserSelect(value: string): void;
22
+ onClick: () => void;
23
+ hideImageOverlay: (event: any) => void;
24
+ }