@ckeditor/ckeditor5-clipboard 48.8.1-alpha.3 → 49.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 (170) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/augmentation.d.ts +14 -14
  3. package/dist/clipboard.d.ts +35 -35
  4. package/dist/clipboardmarkersutils.d.ts +194 -194
  5. package/dist/clipboardobserver.d.ts +274 -269
  6. package/dist/clipboardpipeline.d.ts +252 -248
  7. package/dist/dragdrop.d.ts +100 -101
  8. package/dist/dragdropblocktoolbar.d.ts +46 -46
  9. package/dist/dragdroptarget.d.ts +95 -94
  10. package/dist/index-content.css +3 -0
  11. package/dist/index-content.css.map +1 -0
  12. package/dist/index-editor.css +68 -68
  13. package/dist/index-editor.css.map +1 -0
  14. package/dist/index.css +48 -50
  15. package/dist/index.css.map +1 -1
  16. package/dist/index.d.ts +23 -21
  17. package/dist/index.js +1713 -2184
  18. package/dist/index.js.map +1 -1
  19. package/dist/lineview.d.ts +42 -42
  20. package/dist/pasteplaintext.d.ts +27 -27
  21. package/dist/translations/af.js +1 -1
  22. package/dist/translations/af.umd.js +5 -3
  23. package/dist/translations/ar.js +1 -1
  24. package/dist/translations/ar.umd.js +5 -3
  25. package/dist/translations/ast.js +1 -1
  26. package/dist/translations/ast.umd.js +5 -3
  27. package/dist/translations/az.js +1 -1
  28. package/dist/translations/az.umd.js +5 -3
  29. package/dist/translations/be.js +1 -1
  30. package/dist/translations/be.umd.js +5 -3
  31. package/dist/translations/bg.js +1 -1
  32. package/dist/translations/bg.umd.js +5 -3
  33. package/dist/translations/bn.js +1 -1
  34. package/dist/translations/bn.umd.js +5 -3
  35. package/dist/translations/bs.js +1 -1
  36. package/dist/translations/bs.umd.js +5 -3
  37. package/dist/translations/ca.js +1 -1
  38. package/dist/translations/ca.umd.js +5 -3
  39. package/dist/translations/cs.js +1 -1
  40. package/dist/translations/cs.umd.js +5 -3
  41. package/dist/translations/da.js +1 -1
  42. package/dist/translations/da.umd.js +5 -3
  43. package/dist/translations/de-ch.js +1 -1
  44. package/dist/translations/de-ch.umd.js +5 -3
  45. package/dist/translations/de.js +1 -1
  46. package/dist/translations/de.umd.js +5 -3
  47. package/dist/translations/el.js +1 -1
  48. package/dist/translations/el.umd.js +5 -3
  49. package/dist/translations/en-au.js +1 -1
  50. package/dist/translations/en-au.umd.js +5 -3
  51. package/dist/translations/en-gb.js +1 -1
  52. package/dist/translations/en-gb.umd.js +5 -3
  53. package/dist/translations/en.js +1 -1
  54. package/dist/translations/en.umd.js +5 -3
  55. package/dist/translations/eo.js +1 -1
  56. package/dist/translations/eo.umd.js +5 -3
  57. package/dist/translations/es-co.js +1 -1
  58. package/dist/translations/es-co.umd.js +5 -3
  59. package/dist/translations/es.js +1 -1
  60. package/dist/translations/es.umd.js +5 -3
  61. package/dist/translations/et.js +1 -1
  62. package/dist/translations/et.umd.js +5 -3
  63. package/dist/translations/eu.js +1 -1
  64. package/dist/translations/eu.umd.js +5 -3
  65. package/dist/translations/fa.js +1 -1
  66. package/dist/translations/fa.umd.js +5 -3
  67. package/dist/translations/fi.js +1 -1
  68. package/dist/translations/fi.umd.js +5 -3
  69. package/dist/translations/fr.js +1 -1
  70. package/dist/translations/fr.umd.js +5 -3
  71. package/dist/translations/gl.js +1 -1
  72. package/dist/translations/gl.umd.js +5 -3
  73. package/dist/translations/gu.js +1 -1
  74. package/dist/translations/gu.umd.js +5 -3
  75. package/dist/translations/he.js +1 -1
  76. package/dist/translations/he.umd.js +5 -3
  77. package/dist/translations/hi.js +1 -1
  78. package/dist/translations/hi.umd.js +5 -3
  79. package/dist/translations/hr.js +1 -1
  80. package/dist/translations/hr.umd.js +5 -3
  81. package/dist/translations/hu.js +1 -1
  82. package/dist/translations/hu.umd.js +5 -3
  83. package/dist/translations/hy.js +1 -1
  84. package/dist/translations/hy.umd.js +5 -3
  85. package/dist/translations/id.js +1 -1
  86. package/dist/translations/id.umd.js +5 -3
  87. package/dist/translations/it.js +1 -1
  88. package/dist/translations/it.umd.js +5 -3
  89. package/dist/translations/ja.js +1 -1
  90. package/dist/translations/ja.umd.js +5 -3
  91. package/dist/translations/jv.js +1 -1
  92. package/dist/translations/jv.umd.js +5 -3
  93. package/dist/translations/kk.js +1 -1
  94. package/dist/translations/kk.umd.js +5 -3
  95. package/dist/translations/km.js +1 -1
  96. package/dist/translations/km.umd.js +5 -3
  97. package/dist/translations/kn.js +1 -1
  98. package/dist/translations/kn.umd.js +5 -3
  99. package/dist/translations/ko.js +1 -1
  100. package/dist/translations/ko.umd.js +5 -3
  101. package/dist/translations/ku.js +1 -1
  102. package/dist/translations/ku.umd.js +5 -3
  103. package/dist/translations/lt.js +1 -1
  104. package/dist/translations/lt.umd.js +5 -3
  105. package/dist/translations/lv.js +1 -1
  106. package/dist/translations/lv.umd.js +5 -3
  107. package/dist/translations/ms.js +1 -1
  108. package/dist/translations/ms.umd.js +5 -3
  109. package/dist/translations/nb.js +1 -1
  110. package/dist/translations/nb.umd.js +5 -3
  111. package/dist/translations/ne.js +1 -1
  112. package/dist/translations/ne.umd.js +5 -3
  113. package/dist/translations/nl.js +1 -1
  114. package/dist/translations/nl.umd.js +5 -3
  115. package/dist/translations/no.js +1 -1
  116. package/dist/translations/no.umd.js +5 -3
  117. package/dist/translations/oc.js +1 -1
  118. package/dist/translations/oc.umd.js +5 -3
  119. package/dist/translations/pl.js +1 -1
  120. package/dist/translations/pl.umd.js +5 -3
  121. package/dist/translations/pt-br.js +1 -1
  122. package/dist/translations/pt-br.umd.js +5 -3
  123. package/dist/translations/pt.js +1 -1
  124. package/dist/translations/pt.umd.js +5 -3
  125. package/dist/translations/ro.js +1 -1
  126. package/dist/translations/ro.umd.js +5 -3
  127. package/dist/translations/ru.js +1 -1
  128. package/dist/translations/ru.umd.js +5 -3
  129. package/dist/translations/si.js +1 -1
  130. package/dist/translations/si.umd.js +5 -3
  131. package/dist/translations/sk.js +1 -1
  132. package/dist/translations/sk.umd.js +5 -3
  133. package/dist/translations/sl.js +1 -1
  134. package/dist/translations/sl.umd.js +5 -3
  135. package/dist/translations/sq.js +1 -1
  136. package/dist/translations/sq.umd.js +5 -3
  137. package/dist/translations/sr-latn.js +1 -1
  138. package/dist/translations/sr-latn.umd.js +5 -3
  139. package/dist/translations/sr.js +1 -1
  140. package/dist/translations/sr.umd.js +5 -3
  141. package/dist/translations/sv.js +1 -1
  142. package/dist/translations/sv.umd.js +5 -3
  143. package/dist/translations/th.js +1 -1
  144. package/dist/translations/th.umd.js +5 -3
  145. package/dist/translations/ti.js +1 -1
  146. package/dist/translations/ti.umd.js +5 -3
  147. package/dist/translations/tk.js +1 -1
  148. package/dist/translations/tk.umd.js +5 -3
  149. package/dist/translations/tr.js +1 -1
  150. package/dist/translations/tr.umd.js +5 -3
  151. package/dist/translations/tt.js +1 -1
  152. package/dist/translations/tt.umd.js +5 -3
  153. package/dist/translations/ug.js +1 -1
  154. package/dist/translations/ug.umd.js +5 -3
  155. package/dist/translations/uk.js +1 -1
  156. package/dist/translations/uk.umd.js +5 -3
  157. package/dist/translations/ur.js +1 -1
  158. package/dist/translations/ur.umd.js +5 -3
  159. package/dist/translations/uz.js +1 -1
  160. package/dist/translations/uz.umd.js +5 -3
  161. package/dist/translations/vi.js +1 -1
  162. package/dist/translations/vi.umd.js +5 -3
  163. package/dist/translations/zh-cn.js +1 -1
  164. package/dist/translations/zh-cn.umd.js +5 -3
  165. package/dist/translations/zh.js +1 -1
  166. package/dist/translations/zh.umd.js +5 -3
  167. package/dist/utils/normalizeclipboarddata.d.ts +12 -12
  168. package/dist/utils/plaintexttohtml.d.ts +10 -10
  169. package/dist/utils/viewtoplaintext.d.ts +12 -12
  170. package/package.json +7 -7
@@ -1,313 +1,318 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import { ViewDataTransfer, DomEventObserver, type ViewDocumentDomEventData, type EditingView, type ViewDocumentFragment, type ViewElement, type ViewRange } from '@ckeditor/ckeditor5-engine';
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import { ViewDataTransfer, DomEventObserver, type ViewDocumentDomEventData, type EditingView, type ViewDocumentFragment, type ViewElement, type ViewRange } from "@ckeditor/ckeditor5-engine";
6
6
  /**
7
- * Clipboard events observer.
8
- *
9
- * Fires the following events:
10
- *
11
- * * {@link module:engine/view/document~ViewDocument#event:clipboardInput},
12
- * * {@link module:engine/view/document~ViewDocument#event:paste},
13
- * * {@link module:engine/view/document~ViewDocument#event:copy},
14
- * * {@link module:engine/view/document~ViewDocument#event:cut},
15
- * * {@link module:engine/view/document~ViewDocument#event:drop},
16
- * * {@link module:engine/view/document~ViewDocument#event:dragover},
17
- * * {@link module:engine/view/document~ViewDocument#event:dragging},
18
- * * {@link module:engine/view/document~ViewDocument#event:dragstart},
19
- * * {@link module:engine/view/document~ViewDocument#event:dragend},
20
- * * {@link module:engine/view/document~ViewDocument#event:dragenter},
21
- * * {@link module:engine/view/document~ViewDocument#event:dragleave}.
22
- *
23
- * **Note**: This observer is not available by default (ckeditor5-engine does not add it on its own).
24
- * To make it available, it needs to be added to {@link module:engine/view/document~ViewDocument} by using
25
- * the {@link module:engine/view/view~EditingView#addObserver `View#addObserver()`} method. Alternatively, you can load the
26
- * {@link module:clipboard/clipboard~Clipboard} plugin which adds this observer automatically (because it uses it).
27
- */
28
- export declare class ClipboardObserver extends DomEventObserver<'paste' | 'copy' | 'cut' | 'drop' | 'dragover' | 'dragstart' | 'dragend' | 'dragenter' | 'dragleave', ClipboardEventData> {
29
- readonly domEventType: readonly ["paste", "copy", "cut", "drop", "dragover", "dragstart", "dragend", "dragenter", "dragleave"];
30
- constructor(view: EditingView);
31
- onDomEvent(domEvent: ClipboardEvent | DragEvent): void;
7
+ * Clipboard events observer.
8
+ *
9
+ * Fires the following events:
10
+ *
11
+ * * {@link module:engine/view/document~ViewDocument#event:clipboardInput},
12
+ * * {@link module:engine/view/document~ViewDocument#event:paste},
13
+ * * {@link module:engine/view/document~ViewDocument#event:copy},
14
+ * * {@link module:engine/view/document~ViewDocument#event:cut},
15
+ * * {@link module:engine/view/document~ViewDocument#event:drop},
16
+ * * {@link module:engine/view/document~ViewDocument#event:dragover},
17
+ * * {@link module:engine/view/document~ViewDocument#event:dragging},
18
+ * * {@link module:engine/view/document~ViewDocument#event:dragstart},
19
+ * * {@link module:engine/view/document~ViewDocument#event:dragend},
20
+ * * {@link module:engine/view/document~ViewDocument#event:dragenter},
21
+ * * {@link module:engine/view/document~ViewDocument#event:dragleave}.
22
+ *
23
+ * **Note**: This observer is not available by default (ckeditor5-engine does not add it on its own).
24
+ * To make it available, it needs to be added to {@link module:engine/view/document~ViewDocument} by using
25
+ * the {@link module:engine/view/view~EditingView#addObserver `View#addObserver()`} method. Alternatively, you can load the
26
+ * {@link module:clipboard/clipboard~Clipboard} plugin which adds this observer automatically (because it uses it).
27
+ */
28
+ export declare class ClipboardObserver extends DomEventObserver<"paste" | "copy" | "cut" | "drop" | "dragover" | "dragstart" | "dragend" | "dragenter" | "dragleave", ClipboardEventData> {
29
+ readonly domEventType: readonly ["paste", "copy", "cut", "drop", "dragover", "dragstart", "dragend", "dragenter", "dragleave"];
30
+ constructor(view: EditingView);
31
+ onDomEvent(domEvent: ClipboardEvent | DragEvent): void;
32
32
  }
33
33
  /**
34
- * The data of 'paste', 'copy', 'cut', 'drop', 'dragover', 'dragstart', 'dragend', 'dragenter' and 'dragleave' events.
35
- */
34
+ * The data of 'paste', 'copy', 'cut', 'drop', 'dragover', 'dragstart', 'dragend', 'dragenter' and 'dragleave' events.
35
+ */
36
36
  export interface ClipboardEventData {
37
- /**
38
- * The data transfer instance.
39
- */
40
- dataTransfer: ViewDataTransfer;
41
- /**
42
- * The position into which the content is dropped.
43
- */
44
- dropRange?: ViewRange | null;
37
+ /**
38
+ * The data transfer instance.
39
+ */
40
+ dataTransfer: ViewDataTransfer;
41
+ /**
42
+ * The position into which the content is dropped.
43
+ */
44
+ dropRange?: ViewRange | null;
45
45
  }
46
46
  /**
47
- * Fired as a continuation of the {@link module:engine/view/document~ViewDocument#event:paste} and
48
- * {@link module:engine/view/document~ViewDocument#event:drop} events.
49
- *
50
- * It is a part of the {@glink framework/deep-dive/clipboard#input-pipeline clipboard input pipeline}.
51
- *
52
- * This event carries a `dataTransfer` object which comes from the clipboard and whose content should be processed
53
- * and inserted into the editor.
54
- *
55
- * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
56
- * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
57
- * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
58
- * plugin, but if for some reason it is not loaded, the observer must be added manually.
59
- *
60
- * @see module:clipboard/clipboardobserver~ClipboardObserver
61
- * @see module:clipboard/clipboard~Clipboard
62
- *
63
- * @eventName module:engine/view/document~ViewDocument#clipboardInput
64
- * @param data The event data.
65
- */
47
+ * Fired as a continuation of the {@link module:engine/view/document~ViewDocument#event:paste} and
48
+ * {@link module:engine/view/document~ViewDocument#event:drop} events.
49
+ *
50
+ * It is a part of the {@glink framework/deep-dive/clipboard#input-pipeline clipboard input pipeline}.
51
+ *
52
+ * This event carries a `dataTransfer` object which comes from the clipboard and whose content should be processed
53
+ * and inserted into the editor.
54
+ *
55
+ * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
56
+ * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
57
+ * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
58
+ * plugin, but if for some reason it is not loaded, the observer must be added manually.
59
+ *
60
+ * @see module:clipboard/clipboardobserver~ClipboardObserver
61
+ * @see module:clipboard/clipboard~Clipboard
62
+ *
63
+ * @eventName module:engine/view/document~ViewDocument#clipboardInput
64
+ * @param data The event data.
65
+ */
66
66
  export type ViewDocumentClipboardInputEvent = {
67
- name: 'clipboardInput';
68
- args: [data: ViewDocumentDomEventData<ClipboardEvent | DragEvent> & ClipboardInputEventData];
67
+ name: "clipboardInput";
68
+ args: [data: ViewDocumentDomEventData<ClipboardEvent | DragEvent> & ClipboardInputEventData];
69
69
  };
70
70
  /**
71
- * The value of the {@link module:engine/view/document~ViewDocument#event:paste},
72
- * {@link module:engine/view/document~ViewDocument#event:copy} and {@link module:engine/view/document~ViewDocument#event:cut} events.
73
- *
74
- * In order to access the clipboard data, use the `dataTransfer` property.
75
- */
71
+ * The value of the {@link module:engine/view/document~ViewDocument#event:paste},
72
+ * {@link module:engine/view/document~ViewDocument#event:copy} and {@link module:engine/view/document~ViewDocument#event:cut} events.
73
+ *
74
+ * In order to access the clipboard data, use the `dataTransfer` property.
75
+ */
76
76
  export interface ClipboardInputEventData {
77
- /**
78
- * Data transfer instance.
79
- */
80
- dataTransfer: ViewDataTransfer;
81
- /**
82
- * Whether the event was triggered by a paste or a drop operation.
83
- */
84
- method: 'paste' | 'drop';
85
- /**
86
- * The tree view element representing the target.
87
- */
88
- target: ViewElement;
89
- /**
90
- * The ranges which are the target of the operation (usually – into which the content should be inserted).
91
- * If the clipboard input was triggered by a paste operation, this property is not set. If by a drop operation,
92
- * then it is the drop position (which can be different than the selection at the moment of the drop).
93
- */
94
- targetRanges: Array<ViewRange> | null;
95
- /**
96
- * The content of clipboard input.
97
- */
98
- content?: ViewDocumentFragment;
77
+ /**
78
+ * Data transfer instance.
79
+ */
80
+ dataTransfer: ViewDataTransfer;
81
+ /**
82
+ * Whether the event was triggered by a paste or a drop operation.
83
+ */
84
+ method: "paste" | "drop";
85
+ /**
86
+ * The tree view element representing the target.
87
+ */
88
+ target: ViewElement;
89
+ /**
90
+ * The ranges which are the target of the operation (usually – into which the content should be inserted).
91
+ * If the clipboard input was triggered by a paste operation, this property is not set. If by a drop operation,
92
+ * then it is the drop position (which can be different than the selection at the moment of the drop).
93
+ */
94
+ targetRanges: Array<ViewRange> | null;
95
+ /**
96
+ * The content of clipboard input. Defaults to `text/html`. Falls-back to `text/plain`.
97
+ */
98
+ content: string | ViewDocumentFragment;
99
+ /**
100
+ * Custom data stored by the `clipboardInput` event handlers. Custom properties of this object can be defined and use to
101
+ * pass parameters between listeners. Content of this property is passed to the `inputTransformation` event.
102
+ */
103
+ extraContent?: unknown;
99
104
  }
100
105
  /**
101
- * Fired when the user drags the content over one of the editing roots of the editor.
102
- *
103
- * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
104
- *
105
- * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
106
- * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
107
- * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
108
- * plugin, but if for some reason it is not loaded, the observer must be added manually.
109
- *
110
- * @see module:engine/view/document~ViewDocument#event:clipboardInput
111
- *
112
- * @eventName module:engine/view/document~ViewDocument#dragover
113
- * @param data The event data.
114
- */
106
+ * Fired when the user drags the content over one of the editing roots of the editor.
107
+ *
108
+ * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
109
+ *
110
+ * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
111
+ * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
112
+ * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
113
+ * plugin, but if for some reason it is not loaded, the observer must be added manually.
114
+ *
115
+ * @see module:engine/view/document~ViewDocument#event:clipboardInput
116
+ *
117
+ * @eventName module:engine/view/document~ViewDocument#dragover
118
+ * @param data The event data.
119
+ */
115
120
  export type ViewDocumentDragOverEvent = {
116
- name: 'dragover';
117
- args: [data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData];
121
+ name: "dragover";
122
+ args: [data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData];
118
123
  };
119
124
  /**
120
- * Fired when the user dropped the content into one of the editing roots of the editor.
121
- *
122
- * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
123
- *
124
- * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
125
- * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
126
- * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
127
- * plugin, but if for some reason it is not loaded, the observer must be added manually.
128
- *
129
- * @see module:engine/view/document~ViewDocument#event:clipboardInput
130
- *
131
- * @eventName module:engine/view/document~ViewDocument#drop
132
- * @param data The event data.
133
- */
125
+ * Fired when the user dropped the content into one of the editing roots of the editor.
126
+ *
127
+ * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
128
+ *
129
+ * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
130
+ * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
131
+ * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
132
+ * plugin, but if for some reason it is not loaded, the observer must be added manually.
133
+ *
134
+ * @see module:engine/view/document~ViewDocument#event:clipboardInput
135
+ *
136
+ * @eventName module:engine/view/document~ViewDocument#drop
137
+ * @param data The event data.
138
+ */
134
139
  export type ViewDocumentDropEvent = {
135
- name: 'drop';
136
- args: [data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData];
140
+ name: "drop";
141
+ args: [data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData];
137
142
  };
138
143
  /**
139
- * Fired when the user pasted the content into one of the editing roots of the editor.
140
- *
141
- * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
142
- *
143
- * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
144
- * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
145
- * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
146
- * plugin, but if for some reason it is not loaded, the observer must be added manually.
147
- *
148
- * @see module:engine/view/document~ViewDocument#event:clipboardInput
149
- *
150
- * @eventName module:engine/view/document~ViewDocument#paste
151
- * @param {module:clipboard/clipboardobserver~ClipboardEventData} data The event data.
152
- */
144
+ * Fired when the user pasted the content into one of the editing roots of the editor.
145
+ *
146
+ * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
147
+ *
148
+ * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
149
+ * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
150
+ * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
151
+ * plugin, but if for some reason it is not loaded, the observer must be added manually.
152
+ *
153
+ * @see module:engine/view/document~ViewDocument#event:clipboardInput
154
+ *
155
+ * @eventName module:engine/view/document~ViewDocument#paste
156
+ * @param {module:clipboard/clipboardobserver~ClipboardEventData} data The event data.
157
+ */
153
158
  export type ViewDocumentPasteEvent = {
154
- name: 'paste';
155
- args: [data: ViewDocumentDomEventData<ClipboardEvent> & ClipboardEventData];
159
+ name: "paste";
160
+ args: [data: ViewDocumentDomEventData<ClipboardEvent> & ClipboardEventData];
156
161
  };
157
162
  /**
158
- * Fired when the user copied the content from one of the editing roots of the editor.
159
- *
160
- * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
161
- *
162
- * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
163
- * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
164
- * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
165
- * plugin, but if for some reason it is not loaded, the observer must be added manually.
166
- *
167
- * @see module:clipboard/clipboardobserver~ClipboardObserver
168
- *
169
- * @eventName module:engine/view/document~ViewDocument#copy
170
- * @param data The event data.
171
- */
163
+ * Fired when the user copied the content from one of the editing roots of the editor.
164
+ *
165
+ * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
166
+ *
167
+ * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
168
+ * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
169
+ * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
170
+ * plugin, but if for some reason it is not loaded, the observer must be added manually.
171
+ *
172
+ * @see module:clipboard/clipboardobserver~ClipboardObserver
173
+ *
174
+ * @eventName module:engine/view/document~ViewDocument#copy
175
+ * @param data The event data.
176
+ */
172
177
  export type ViewDocumentCopyEvent = {
173
- name: 'copy';
174
- args: [data: ViewDocumentDomEventData<ClipboardEvent> & ClipboardEventData];
178
+ name: "copy";
179
+ args: [data: ViewDocumentDomEventData<ClipboardEvent> & ClipboardEventData];
175
180
  };
176
181
  /**
177
- * Fired when the user cut the content from one of the editing roots of the editor.
178
- *
179
- * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
180
- *
181
- * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
182
- * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
183
- * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
184
- * plugin, but if for some reason it is not loaded, the observer must be added manually.
185
- *
186
- * @see module:clipboard/clipboardobserver~ClipboardObserver
187
- *
188
- * @eventName module:engine/view/document~ViewDocument#cut
189
- * @param data The event data.
190
- */
182
+ * Fired when the user cut the content from one of the editing roots of the editor.
183
+ *
184
+ * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
185
+ *
186
+ * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
187
+ * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
188
+ * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
189
+ * plugin, but if for some reason it is not loaded, the observer must be added manually.
190
+ *
191
+ * @see module:clipboard/clipboardobserver~ClipboardObserver
192
+ *
193
+ * @eventName module:engine/view/document~ViewDocument#cut
194
+ * @param data The event data.
195
+ */
191
196
  export type ViewDocumentCutEvent = {
192
- name: 'cut';
193
- args: [data: ViewDocumentDomEventData<ClipboardEvent> & ClipboardEventData];
197
+ name: "cut";
198
+ args: [data: ViewDocumentDomEventData<ClipboardEvent> & ClipboardEventData];
194
199
  };
195
200
  /**
196
- * Fired as a continuation of the {@link module:engine/view/document~ViewDocument#event:dragover} event.
197
- *
198
- * It is a part of the {@glink framework/deep-dive/clipboard#input-pipeline clipboard input pipeline}.
199
- *
200
- * This event carries a `dataTransfer` object which comes from the clipboard and whose content should be processed
201
- * and inserted into the editor.
202
- *
203
- * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
204
- * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
205
- * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the
206
- * {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded,
207
- * the observer must be added manually.
208
- *
209
- * @see module:clipboard/clipboardobserver~ClipboardObserver
210
- * @see module:clipboard/clipboard~Clipboard
211
- *
212
- * @eventName module:engine/view/document~ViewDocument#dragging
213
- * @param data The event data.
214
- */
201
+ * Fired as a continuation of the {@link module:engine/view/document~ViewDocument#event:dragover} event.
202
+ *
203
+ * It is a part of the {@glink framework/deep-dive/clipboard#input-pipeline clipboard input pipeline}.
204
+ *
205
+ * This event carries a `dataTransfer` object which comes from the clipboard and whose content should be processed
206
+ * and inserted into the editor.
207
+ *
208
+ * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
209
+ * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
210
+ * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the
211
+ * {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded,
212
+ * the observer must be added manually.
213
+ *
214
+ * @see module:clipboard/clipboardobserver~ClipboardObserver
215
+ * @see module:clipboard/clipboard~Clipboard
216
+ *
217
+ * @eventName module:engine/view/document~ViewDocument#dragging
218
+ * @param data The event data.
219
+ */
215
220
  export type ViewDocumentDraggingEvent = {
216
- name: 'dragging';
217
- args: [data: ViewDocumentDomEventData<DragEvent> & DraggingEventData];
221
+ name: "dragging";
222
+ args: [data: ViewDocumentDomEventData<DragEvent> & DraggingEventData];
218
223
  };
219
224
  export interface DraggingEventData {
220
- /**
221
- * The data transfer instance.
222
- */
223
- dataTransfer: ViewDataTransfer;
224
- /**
225
- * Whether the event was triggered by a paste or a drop operation.
226
- */
227
- method: 'dragover';
228
- /**
229
- * The tree view element representing the target.
230
- */
231
- target: Element;
232
- /**
233
- * Ranges which are the target of the operation (usually – into which the content should be inserted).
234
- * It is the drop position (which can be different than the selection at the moment of drop).
235
- */
236
- targetRanges: Array<ViewRange> | null;
225
+ /**
226
+ * The data transfer instance.
227
+ */
228
+ dataTransfer: ViewDataTransfer;
229
+ /**
230
+ * Whether the event was triggered by a paste or a drop operation.
231
+ */
232
+ method: "dragover";
233
+ /**
234
+ * The tree view element representing the target.
235
+ */
236
+ target: Element;
237
+ /**
238
+ * Ranges which are the target of the operation (usually – into which the content should be inserted).
239
+ * It is the drop position (which can be different than the selection at the moment of drop).
240
+ */
241
+ targetRanges: Array<ViewRange> | null;
237
242
  }
238
243
  /**
239
- * Fired when the user starts dragging the content in one of the editing roots of the editor.
240
- *
241
- * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
242
- *
243
- * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
244
- * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
245
- * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
246
- * plugin, but if for some reason it is not loaded, the observer must be added manually.
247
- *
248
- * @see module:engine/view/document~ViewDocument#event:clipboardInput
249
- *
250
- * @eventName module:engine/view/document~ViewDocument#dragstart
251
- * @param data The event data.
252
- */
244
+ * Fired when the user starts dragging the content in one of the editing roots of the editor.
245
+ *
246
+ * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
247
+ *
248
+ * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
249
+ * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
250
+ * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
251
+ * plugin, but if for some reason it is not loaded, the observer must be added manually.
252
+ *
253
+ * @see module:engine/view/document~ViewDocument#event:clipboardInput
254
+ *
255
+ * @eventName module:engine/view/document~ViewDocument#dragstart
256
+ * @param data The event data.
257
+ */
253
258
  export type ViewDocumentDragStartEvent = {
254
- name: 'dragstart';
255
- args: [data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData];
259
+ name: "dragstart";
260
+ args: [data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData];
256
261
  };
257
262
  /**
258
- * Fired when the user ended dragging the content.
259
- *
260
- * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
261
- *
262
- * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
263
- * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
264
- * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
265
- * plugin, but if for some reason it is not loaded, the observer must be added manually.
266
- *
267
- * @see module:engine/view/document~ViewDocument#event:clipboardInput
268
- *
269
- * @eventName module:engine/view/document~ViewDocument#dragend
270
- * @param data The event data.
271
- */
263
+ * Fired when the user ended dragging the content.
264
+ *
265
+ * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
266
+ *
267
+ * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
268
+ * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
269
+ * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
270
+ * plugin, but if for some reason it is not loaded, the observer must be added manually.
271
+ *
272
+ * @see module:engine/view/document~ViewDocument#event:clipboardInput
273
+ *
274
+ * @eventName module:engine/view/document~ViewDocument#dragend
275
+ * @param data The event data.
276
+ */
272
277
  export type ViewDocumentDragEndEvent = {
273
- name: 'dragend';
274
- args: [data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData];
278
+ name: "dragend";
279
+ args: [data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData];
275
280
  };
276
281
  /**
277
- * Fired when the user drags the content into one of the editing roots of the editor.
278
- *
279
- * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
280
- *
281
- * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
282
- * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
283
- * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
284
- * plugin, but if for some reason it is not loaded, the observer must be added manually.
285
- *
286
- * @see module:engine/view/document~ViewDocument#event:clipboardInput
287
- *
288
- * @eventName module:engine/view/document~ViewDocument#dragenter
289
- * @param data The event data.
290
- */
282
+ * Fired when the user drags the content into one of the editing roots of the editor.
283
+ *
284
+ * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
285
+ *
286
+ * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
287
+ * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
288
+ * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
289
+ * plugin, but if for some reason it is not loaded, the observer must be added manually.
290
+ *
291
+ * @see module:engine/view/document~ViewDocument#event:clipboardInput
292
+ *
293
+ * @eventName module:engine/view/document~ViewDocument#dragenter
294
+ * @param data The event data.
295
+ */
291
296
  export type ViewDocumentDragEnterEvent = {
292
- name: 'dragenter';
293
- args: [data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData];
297
+ name: "dragenter";
298
+ args: [data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData];
294
299
  };
295
300
  /**
296
- * Fired when the user drags the content out of one of the editing roots of the editor.
297
- *
298
- * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
299
- *
300
- * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
301
- * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
302
- * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
303
- * plugin, but if for some reason it is not loaded, the observer must be added manually.
304
- *
305
- * @see module:engine/view/document~ViewDocument#event:clipboardInput
306
- *
307
- * @eventName module:engine/view/document~ViewDocument#dragleave
308
- * @param data The event data.
309
- */
301
+ * Fired when the user drags the content out of one of the editing roots of the editor.
302
+ *
303
+ * Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}.
304
+ *
305
+ * **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver}
306
+ * needs to be added to the {@link module:engine/view/document~ViewDocument} by using the
307
+ * {@link module:engine/view/view~EditingView#addObserver} method. This is usually done by the {@link module:clipboard/clipboard~Clipboard}
308
+ * plugin, but if for some reason it is not loaded, the observer must be added manually.
309
+ *
310
+ * @see module:engine/view/document~ViewDocument#event:clipboardInput
311
+ *
312
+ * @eventName module:engine/view/document~ViewDocument#dragleave
313
+ * @param data The event data.
314
+ */
310
315
  export type ViewDocumentDragLeaveEvent = {
311
- name: 'dragleave';
312
- args: [data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData];
316
+ name: "dragleave";
317
+ args: [data: ViewDocumentDomEventData<DragEvent> & ClipboardEventData];
313
318
  };