forked from JiHong88/suneditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparams.js
More file actions
130 lines (114 loc) · 2.93 KB
/
params.js
File metadata and controls
130 lines (114 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/**
* @fileoverview Common parameter types used across SunEditor plugins and callbacks.
* These types define the structure of parameters passed to various plugin methods.
*/
// ================================================================
// PARAMS - Common parameter types
// ================================================================
/**
* @typedef {{
* file: File,
* event: ClipboardEvent | DragEvent,
* frameContext: SunEditor.FrameContext
* }} FilePasteDrop
* @description Parameters for file paste/drop events
*/
/**
* @typedef {{
* frameContext: SunEditor.FrameContext,
* event: FocusEvent
* }} FocusBlurEvent
* @description Parameters for focus and blur events
*/
/**
* @typedef {{
* frameContext: SunEditor.FrameContext,
* event: Event
* }} ScrollEvent
* @description Parameters for scroll events
*/
/**
* @typedef {{
* frameContext: SunEditor.FrameContext,
* event: InputEvent,
* data: string
* }} InputEventWithData
* @description Parameters for beforeinput and input events
*/
/**
* @typedef {{
* frameContext: SunEditor.FrameContext,
* event: ClipboardEvent,
* data: string,
* doc: Document
* }} Paste
* @description Parameters for paste events
*/
/**
* @typedef {{
* frameContext: SunEditor.FrameContext,
* event: MouseEvent
* }} Mouse
* @description Parameters for mouse events
*/
/**
* @typedef {{
* frameContext: SunEditor.FrameContext,
* event: KeyboardEvent
* }} Keyboard
* @description Parameters for keyboard events
*/
/**
* @typedef {{
* target: HTMLElement,
* event: KeyboardEvent
* }} ToolbarInputKeyDown
* @description Parameters for toolbar input keydown events
*/
/**
* @typedef {{
* target: HTMLElement,
* value: string,
* event: FocusEvent | MouseEvent
* }} ToolbarInputChange
* @description Parameters for toolbar input change events (triggered by blur or other input click)
*/
/**
* @typedef {{
* event: ClipboardEvent,
* cloneContainer: HTMLElement,
* info: SunEditor.ComponentInfo
* }} CopyComponent
* @description Parameters for component copy events
*/
// ================================================================
// PLUGIN EVENT PARAMS - Plugin hook event parameter types
// ================================================================
/**
* @typedef {{
* frameContext: SunEditor.FrameContext,
* event: MouseEvent
* }} MouseEventInfo
* @description Parameters for plugin mouse event hooks
*/
/**
* @typedef {{
* frameContext: SunEditor.FrameContext,
* event: KeyboardEvent,
* range: Range,
* line: HTMLElement
* }} KeyEventInfo
* @description Parameters for plugin keyboard event hooks
*/
/**
* @typedef {{
* range: Range,
* line: HTMLElement,
* info: import('../core/logic/shell/shortcuts').ShortcutInfo,
* event: KeyboardEvent,
* keyCode: string,
* $: SunEditor.Deps
* }} ShortcutInfo
* @description Information of the `shortcut` plugin hook
*/
export {};