@overlap/rte 0.1.4 → 0.1.6
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.
- package/README.md +52 -40
- package/dist/components/Editor.d.ts.map +1 -1
- package/dist/components/Icons.d.ts +2 -0
- package/dist/components/Icons.d.ts.map +1 -1
- package/dist/constants.d.ts +9 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/hooks/useCheckbox.d.ts +23 -0
- package/dist/hooks/useCheckbox.d.ts.map +1 -0
- package/dist/hooks/useEditorEvents.d.ts +18 -0
- package/dist/hooks/useEditorEvents.d.ts.map +1 -0
- package/dist/hooks/useEditorInit.d.ts +23 -0
- package/dist/hooks/useEditorInit.d.ts.map +1 -0
- package/dist/hooks/useEditorSelection.d.ts +7 -0
- package/dist/hooks/useEditorSelection.d.ts.map +1 -0
- package/dist/index.d.ts +45 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +1294 -628
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1295 -626
- package/dist/index.js.map +1 -1
- package/dist/plugins/blockFormat.d.ts +2 -2
- package/dist/plugins/blockFormat.d.ts.map +1 -1
- package/dist/styles.css +476 -386
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/checkbox.d.ts +27 -0
- package/dist/utils/checkbox.d.ts.map +1 -0
- package/dist/utils/content.d.ts +19 -2
- package/dist/utils/content.d.ts.map +1 -1
- package/dist/utils/dom.d.ts +31 -0
- package/dist/utils/dom.d.ts.map +1 -0
- package/package.json +1 -7
package/dist/styles.css
CHANGED
|
@@ -1,638 +1,728 @@
|
|
|
1
1
|
/* CSS Variables für Theme-Support */
|
|
2
2
|
:root {
|
|
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
|
-
|
|
3
|
+
/* Colors */
|
|
4
|
+
--rte-border-color: #e5e7eb;
|
|
5
|
+
--rte-border-radius: 8px;
|
|
6
|
+
--rte-toolbar-bg: #f9fafb;
|
|
7
|
+
--rte-button-hover-bg: #f3f4f6;
|
|
8
|
+
--rte-button-active-bg: #e5e7eb;
|
|
9
|
+
--rte-content-bg: #ffffff;
|
|
10
|
+
--rte-text-color: #111827;
|
|
11
|
+
--rte-text-secondary: #6b7280;
|
|
12
|
+
--rte-primary-color: #3b82f6;
|
|
13
|
+
--rte-primary-hover: #2563eb;
|
|
14
|
+
|
|
15
|
+
/* Spacing */
|
|
16
|
+
--rte-padding-xs: 4px;
|
|
17
|
+
--rte-padding-sm: 6px;
|
|
18
|
+
--rte-padding-md: 8px;
|
|
19
|
+
--rte-padding-lg: 12px;
|
|
20
|
+
--rte-padding-xl: 16px;
|
|
21
|
+
--rte-padding-2xl: 20px;
|
|
22
|
+
|
|
23
|
+
/* Shadows */
|
|
24
|
+
--rte-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
25
|
+
--rte-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
26
|
+
0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
27
|
+
--rte-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
28
|
+
0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
29
|
+
--rte-shadow-popover: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
30
|
+
0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
31
|
+
|
|
32
|
+
/* Typography */
|
|
33
|
+
--rte-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
|
|
34
|
+
"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
|
|
35
|
+
"Helvetica Neue", sans-serif;
|
|
36
|
+
--rte-line-height: 1.6;
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
/* Container */
|
|
35
40
|
.rte-container {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
border: 1px solid var(--rte-border-color);
|
|
44
|
+
border-radius: var(--rte-border-radius);
|
|
45
|
+
background: var(--rte-content-bg);
|
|
46
|
+
font-family: var(--rte-font-family);
|
|
47
|
+
box-shadow: var(--rte-shadow-sm);
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
/* Toolbar */
|
|
46
51
|
.rte-toolbar {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: var(--rte-padding-md);
|
|
56
|
+
padding: var(--rte-padding-md);
|
|
57
|
+
background: var(--rte-toolbar-bg);
|
|
58
|
+
border-bottom: 1px solid var(--rte-border-color);
|
|
59
|
+
border-top-left-radius: var(--rte-border-radius);
|
|
60
|
+
border-top-right-radius: var(--rte-border-radius);
|
|
56
61
|
}
|
|
57
62
|
|
|
58
63
|
/* Sticky Toolbar */
|
|
59
64
|
.rte-toolbar-sticky {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
position: sticky;
|
|
66
|
+
top: 0;
|
|
67
|
+
z-index: 10;
|
|
68
|
+
box-shadow: var(--rte-shadow-sm);
|
|
69
|
+
transition: box-shadow 0.2s ease;
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
.rte-toolbar-left {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
display: flex;
|
|
74
|
+
gap: var(--rte-padding-xs);
|
|
75
|
+
flex-wrap: wrap;
|
|
76
|
+
align-items: center;
|
|
77
|
+
flex: 1;
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
.rte-toolbar-right {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
display: flex;
|
|
82
|
+
gap: var(--rte-padding-xs);
|
|
83
|
+
align-items: center;
|
|
84
|
+
flex-shrink: 0;
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
/* Toolbar Divider */
|
|
83
88
|
.rte-toolbar-divider {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
width: 1px;
|
|
90
|
+
height: 24px;
|
|
91
|
+
background: var(--rte-border-color);
|
|
92
|
+
margin: 0 var(--rte-padding-sm);
|
|
93
|
+
flex-shrink: 0;
|
|
89
94
|
}
|
|
90
95
|
|
|
91
96
|
/* Toolbar Buttons - Ghost/Subtle Style */
|
|
92
97
|
.rte-toolbar-button {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
min-width: 32px;
|
|
102
|
+
height: 32px;
|
|
103
|
+
padding: 0 var(--rte-padding-md);
|
|
104
|
+
border: none;
|
|
105
|
+
background: transparent;
|
|
106
|
+
border-radius: 6px;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
color: var(--rte-text-color);
|
|
109
|
+
transition: all 0.15s ease;
|
|
110
|
+
font-size: 14px;
|
|
106
111
|
}
|
|
107
112
|
|
|
108
113
|
.rte-toolbar-button:hover:not(:disabled) {
|
|
109
|
-
|
|
110
|
-
|
|
114
|
+
background: var(--rte-button-hover-bg);
|
|
115
|
+
color: var(--rte-text-color);
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
.rte-toolbar-button:active:not(:disabled) {
|
|
114
|
-
|
|
115
|
-
|
|
119
|
+
background: var(--rte-button-active-bg);
|
|
120
|
+
transform: scale(0.98);
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
.rte-toolbar-button:disabled {
|
|
119
|
-
|
|
120
|
-
|
|
124
|
+
opacity: 0.4;
|
|
125
|
+
cursor: not-allowed;
|
|
121
126
|
}
|
|
122
127
|
|
|
123
128
|
.rte-toolbar-button-active {
|
|
124
|
-
|
|
125
|
-
|
|
129
|
+
background: var(--rte-button-active-bg);
|
|
130
|
+
color: var(--rte-primary-color);
|
|
126
131
|
}
|
|
127
132
|
|
|
128
133
|
.rte-toolbar-button-active:hover:not(:disabled) {
|
|
129
|
-
|
|
130
|
-
|
|
134
|
+
background: var(--rte-button-hover-bg);
|
|
135
|
+
color: var(--rte-primary-hover);
|
|
131
136
|
}
|
|
132
137
|
|
|
133
138
|
/* Editor Content Area */
|
|
134
139
|
.rte-editor {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
min-height: 200px;
|
|
141
|
+
padding: var(--rte-padding-2xl);
|
|
142
|
+
outline: none;
|
|
143
|
+
line-height: var(--rte-line-height);
|
|
144
|
+
color: var(--rte-text-color);
|
|
145
|
+
overflow-y: auto;
|
|
146
|
+
background: var(--rte-content-bg);
|
|
147
|
+
border-bottom-left-radius: var(--rte-border-radius);
|
|
148
|
+
border-bottom-right-radius: var(--rte-border-radius);
|
|
144
149
|
}
|
|
145
150
|
|
|
146
151
|
.rte-editor:focus {
|
|
147
|
-
|
|
152
|
+
outline: none;
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
.rte-editor:empty:before {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
156
|
+
content: attr(data-placeholder);
|
|
157
|
+
color: var(--rte-text-secondary);
|
|
158
|
+
pointer-events: none;
|
|
159
|
+
display: block;
|
|
160
|
+
min-height: 1.5em;
|
|
154
161
|
}
|
|
155
162
|
|
|
156
163
|
/* Typography in Editor */
|
|
157
164
|
.rte-editor p {
|
|
158
|
-
|
|
165
|
+
margin: 0 0 var(--rte-padding-lg) 0;
|
|
159
166
|
}
|
|
160
167
|
|
|
161
168
|
.rte-editor p:last-child {
|
|
162
|
-
|
|
169
|
+
margin-bottom: 0;
|
|
163
170
|
}
|
|
164
171
|
|
|
165
172
|
.rte-editor h1 {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
173
|
+
font-size: 2em;
|
|
174
|
+
font-weight: 700;
|
|
175
|
+
margin: 0 0 var(--rte-padding-lg) 0;
|
|
176
|
+
line-height: 1.2;
|
|
170
177
|
}
|
|
171
178
|
|
|
172
179
|
.rte-editor h2 {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
180
|
+
font-size: 1.5em;
|
|
181
|
+
font-weight: 600;
|
|
182
|
+
margin: 0 0 var(--rte-padding-lg) 0;
|
|
183
|
+
line-height: 1.3;
|
|
177
184
|
}
|
|
178
185
|
|
|
179
186
|
.rte-editor h3 {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
187
|
+
font-size: 1.25em;
|
|
188
|
+
font-weight: 600;
|
|
189
|
+
margin: 0 0 var(--rte-padding-lg) 0;
|
|
190
|
+
line-height: 1.4;
|
|
184
191
|
}
|
|
185
192
|
|
|
186
193
|
.rte-editor h4 {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
194
|
+
font-size: 1.1em;
|
|
195
|
+
font-weight: 600;
|
|
196
|
+
margin: 0 0 var(--rte-padding-lg) 0;
|
|
197
|
+
line-height: 1.4;
|
|
191
198
|
}
|
|
192
199
|
|
|
193
200
|
.rte-editor h5 {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
201
|
+
font-size: 1em;
|
|
202
|
+
font-weight: 600;
|
|
203
|
+
margin: 0 0 var(--rte-padding-lg) 0;
|
|
204
|
+
line-height: 1.5;
|
|
198
205
|
}
|
|
199
206
|
|
|
200
207
|
.rte-editor h6 {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
208
|
+
font-size: 0.9em;
|
|
209
|
+
font-weight: 600;
|
|
210
|
+
margin: 0 0 var(--rte-padding-lg) 0;
|
|
211
|
+
line-height: 1.5;
|
|
205
212
|
}
|
|
206
213
|
|
|
207
214
|
.rte-editor blockquote {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
215
|
+
margin: 0 0 var(--rte-padding-lg) 0;
|
|
216
|
+
padding: var(--rte-padding-lg) var(--rte-padding-xl);
|
|
217
|
+
border-left: 3px solid var(--rte-border-color);
|
|
218
|
+
background: var(--rte-toolbar-bg);
|
|
219
|
+
color: var(--rte-text-secondary);
|
|
220
|
+
border-radius: 0 var(--rte-border-radius) var(--rte-border-radius) 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* ==========================================================================
|
|
224
|
+
Checkbox Lists (Todo Lists)
|
|
225
|
+
Supports: own format (.rte-checkbox-list),
|
|
226
|
+
Lexical format ([__lexicallisttype="check"], [class*="checklist"]),
|
|
227
|
+
and GitHub format (.contains-task-list)
|
|
228
|
+
Detection uses attribute selectors so it works with any CSS framework.
|
|
229
|
+
========================================================================== */
|
|
230
|
+
|
|
231
|
+
/* Base checkbox list styles - matches all supported formats */
|
|
232
|
+
.rte-editor ul.rte-checkbox-list,
|
|
233
|
+
.rte-editor ul[__lexicallisttype="check"],
|
|
234
|
+
.rte-editor ul[class*="checklist"],
|
|
235
|
+
.rte-editor ul.contains-task-list {
|
|
236
|
+
list-style: none;
|
|
237
|
+
padding-left: var(--rte-padding-2xl);
|
|
238
|
+
margin: var(--rte-padding-md) 0;
|
|
239
|
+
position: relative;
|
|
240
|
+
min-height: 1.5em;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* All checkbox list items */
|
|
244
|
+
.rte-editor ul.rte-checkbox-list li,
|
|
245
|
+
.rte-editor ul[__lexicallisttype="check"] li,
|
|
246
|
+
.rte-editor ul[class*="checklist"] li,
|
|
247
|
+
.rte-editor ul.contains-task-list li {
|
|
248
|
+
margin: var(--rte-padding-sm) 0;
|
|
249
|
+
padding-left: 0;
|
|
250
|
+
position: relative;
|
|
251
|
+
min-height: 1.5em;
|
|
252
|
+
cursor: text;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* Invisible clickable area for checkbox toggle */
|
|
256
|
+
.rte-editor li[role="checkbox"]::after {
|
|
257
|
+
content: "";
|
|
258
|
+
position: absolute;
|
|
259
|
+
left: -40px;
|
|
260
|
+
top: 0;
|
|
261
|
+
width: 40px;
|
|
262
|
+
height: 100%;
|
|
263
|
+
cursor: pointer;
|
|
264
|
+
z-index: 100;
|
|
265
|
+
pointer-events: auto;
|
|
266
|
+
background: transparent;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* Visual checkbox marker via ::before pseudo-element */
|
|
270
|
+
.rte-editor li[role="checkbox"]::before {
|
|
271
|
+
content: "";
|
|
272
|
+
position: absolute;
|
|
273
|
+
left: -24px;
|
|
274
|
+
top: 2px;
|
|
275
|
+
width: 18px;
|
|
276
|
+
height: 18px;
|
|
277
|
+
border: 2px solid var(--rte-primary-color, #000);
|
|
278
|
+
border-radius: 3px;
|
|
279
|
+
background-color: transparent;
|
|
280
|
+
cursor: pointer;
|
|
281
|
+
-webkit-user-select: none;
|
|
282
|
+
-moz-user-select: none;
|
|
283
|
+
user-select: none;
|
|
284
|
+
z-index: 101;
|
|
285
|
+
pointer-events: none;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* Checked state: show checkmark */
|
|
289
|
+
.rte-editor li[role="checkbox"][aria-checked="true"]::before {
|
|
290
|
+
background-color: var(--rte-primary-color, #000);
|
|
291
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M10 3L4.5 8.5L2 6' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
292
|
+
background-repeat: no-repeat;
|
|
293
|
+
background-position: center;
|
|
294
|
+
background-size: 12px 12px;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* Checked state: strikethrough + reduced opacity */
|
|
298
|
+
.rte-editor li[role="checkbox"][aria-checked="true"] {
|
|
299
|
+
opacity: 0.6;
|
|
300
|
+
text-decoration: line-through;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* Focus state */
|
|
304
|
+
.rte-editor li[role="checkbox"]:focus {
|
|
305
|
+
outline: 2px solid var(--rte-primary-color, #000);
|
|
306
|
+
outline-offset: 2px;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* RTL support */
|
|
310
|
+
.rte-editor li[dir="rtl"][role="checkbox"]::before {
|
|
311
|
+
left: auto;
|
|
312
|
+
right: -24px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.rte-editor li[dir="rtl"][role="checkbox"]::after {
|
|
316
|
+
left: auto;
|
|
317
|
+
right: -40px;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* Strikethrough support (Lexical uses <s> tag) */
|
|
321
|
+
.rte-editor s,
|
|
322
|
+
.rte-editor del,
|
|
323
|
+
.rte-editor strike {
|
|
324
|
+
text-decoration: line-through;
|
|
214
325
|
}
|
|
215
326
|
|
|
216
327
|
.rte-editor ul,
|
|
217
328
|
.rte-editor ol {
|
|
218
|
-
|
|
219
|
-
|
|
329
|
+
margin: 0 0 var(--rte-padding-lg) 0;
|
|
330
|
+
padding-left: var(--rte-padding-2xl);
|
|
220
331
|
}
|
|
221
332
|
|
|
222
333
|
.rte-editor li {
|
|
223
|
-
|
|
334
|
+
margin: var(--rte-padding-sm) 0;
|
|
224
335
|
}
|
|
225
336
|
|
|
226
337
|
.rte-editor a {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
338
|
+
color: var(--rte-primary-color);
|
|
339
|
+
text-decoration: underline;
|
|
340
|
+
text-underline-offset: 2px;
|
|
341
|
+
transition: color 0.15s ease;
|
|
231
342
|
}
|
|
232
343
|
|
|
233
344
|
.rte-editor a:hover {
|
|
234
|
-
|
|
345
|
+
color: var(--rte-primary-hover);
|
|
235
346
|
}
|
|
236
347
|
|
|
237
348
|
.rte-editor strong,
|
|
238
349
|
.rte-editor b {
|
|
239
|
-
|
|
350
|
+
font-weight: 600;
|
|
240
351
|
}
|
|
241
352
|
|
|
242
353
|
.rte-editor em,
|
|
243
354
|
.rte-editor i {
|
|
244
|
-
|
|
355
|
+
font-style: italic;
|
|
245
356
|
}
|
|
246
357
|
|
|
247
358
|
.rte-editor u {
|
|
248
|
-
|
|
249
|
-
|
|
359
|
+
text-decoration: underline;
|
|
360
|
+
text-underline-offset: 2px;
|
|
250
361
|
}
|
|
251
362
|
|
|
252
363
|
/* Dropdown Styles */
|
|
253
364
|
.rte-dropdown {
|
|
254
|
-
|
|
255
|
-
|
|
365
|
+
position: relative;
|
|
366
|
+
display: inline-block;
|
|
256
367
|
}
|
|
257
368
|
|
|
258
369
|
.rte-dropdown-button {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
370
|
+
min-width: 32px;
|
|
371
|
+
width: auto;
|
|
372
|
+
padding: 0 var(--rte-padding-md);
|
|
262
373
|
}
|
|
263
374
|
|
|
264
375
|
.rte-dropdown-button-has-value {
|
|
265
|
-
|
|
376
|
+
padding: 0 var(--rte-padding-lg);
|
|
266
377
|
}
|
|
267
378
|
|
|
268
379
|
.rte-dropdown-value {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
380
|
+
margin-left: var(--rte-padding-sm);
|
|
381
|
+
font-size: 12px;
|
|
382
|
+
font-weight: 500;
|
|
383
|
+
color: var(--rte-text-color);
|
|
273
384
|
}
|
|
274
385
|
|
|
275
386
|
/* Dropdown Menu - Modern Popover */
|
|
276
387
|
.rte-dropdown-menu {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
388
|
+
position: absolute;
|
|
389
|
+
top: calc(100% + 4px);
|
|
390
|
+
left: 0;
|
|
391
|
+
background: var(--rte-content-bg);
|
|
392
|
+
border: 1px solid var(--rte-border-color);
|
|
393
|
+
border-radius: var(--rte-border-radius);
|
|
394
|
+
box-shadow: var(--rte-shadow-popover);
|
|
395
|
+
z-index: 1000;
|
|
396
|
+
min-width: 180px;
|
|
397
|
+
max-height: 320px;
|
|
398
|
+
overflow-y: auto;
|
|
399
|
+
padding: var(--rte-padding-sm);
|
|
400
|
+
margin-top: var(--rte-padding-xs);
|
|
290
401
|
}
|
|
291
402
|
|
|
292
403
|
.rte-dropdown-item {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
404
|
+
display: flex;
|
|
405
|
+
align-items: center;
|
|
406
|
+
gap: var(--rte-padding-md);
|
|
407
|
+
width: 100%;
|
|
408
|
+
padding: var(--rte-padding-md) var(--rte-padding-lg);
|
|
409
|
+
border: none;
|
|
410
|
+
background: transparent;
|
|
411
|
+
text-align: left;
|
|
412
|
+
cursor: pointer;
|
|
413
|
+
color: var(--rte-text-color);
|
|
414
|
+
font-size: 14px;
|
|
415
|
+
border-radius: 6px;
|
|
416
|
+
transition: all 0.15s ease;
|
|
417
|
+
font-family: var(--rte-font-family);
|
|
418
|
+
position: relative;
|
|
308
419
|
}
|
|
309
420
|
|
|
310
421
|
.rte-dropdown-item:hover {
|
|
311
|
-
|
|
422
|
+
background: var(--rte-button-hover-bg);
|
|
312
423
|
}
|
|
313
424
|
|
|
314
425
|
.rte-dropdown-item-active {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
426
|
+
background: var(--rte-button-hover-bg);
|
|
427
|
+
color: var(--rte-text-color);
|
|
428
|
+
font-weight: 500;
|
|
318
429
|
}
|
|
319
430
|
|
|
320
431
|
.rte-dropdown-item-active::before {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
432
|
+
content: "";
|
|
433
|
+
position: absolute;
|
|
434
|
+
left: 0;
|
|
435
|
+
top: 0;
|
|
436
|
+
bottom: 0;
|
|
437
|
+
width: 3px;
|
|
438
|
+
background: var(--rte-primary-color);
|
|
439
|
+
border-radius: 0 2px 2px 0;
|
|
329
440
|
}
|
|
330
441
|
|
|
331
442
|
.rte-dropdown-item-active .rte-dropdown-heading-preview,
|
|
332
443
|
.rte-dropdown-item-active > span:last-child {
|
|
333
|
-
|
|
334
|
-
|
|
444
|
+
color: var(--rte-primary-color);
|
|
445
|
+
font-weight: 600;
|
|
335
446
|
}
|
|
336
447
|
|
|
337
448
|
.rte-dropdown-color-preview.active {
|
|
338
|
-
|
|
339
|
-
|
|
449
|
+
border: 2px solid var(--rte-primary-color);
|
|
450
|
+
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
|
|
340
451
|
}
|
|
341
452
|
|
|
342
453
|
/* Color Preview in Dropdown */
|
|
343
454
|
.rte-dropdown-color-preview {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
455
|
+
display: inline-block;
|
|
456
|
+
width: 20px;
|
|
457
|
+
height: 20px;
|
|
458
|
+
border-radius: 4px;
|
|
459
|
+
border: 1px solid var(--rte-border-color);
|
|
460
|
+
flex-shrink: 0;
|
|
461
|
+
box-shadow: var(--rte-shadow-sm);
|
|
351
462
|
}
|
|
352
463
|
|
|
353
464
|
/* Font Size Preview in Dropdown */
|
|
354
465
|
.rte-dropdown-fontsize-preview {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
466
|
+
display: inline-block;
|
|
467
|
+
min-width: 40px;
|
|
468
|
+
text-align: right;
|
|
469
|
+
font-weight: 500;
|
|
470
|
+
color: var(--rte-text-secondary);
|
|
360
471
|
}
|
|
361
472
|
|
|
362
473
|
/* Heading Preview in Dropdown */
|
|
363
474
|
.rte-dropdown-heading-preview {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
.rte-dropdown-heading-preview.
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
.rte-dropdown-heading-preview.h2 {
|
|
379
|
-
font-size: 16px;
|
|
380
|
-
font-weight: 600;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.rte-dropdown-heading-preview.h3 {
|
|
384
|
-
font-size: 15px;
|
|
385
|
-
font-weight: 600;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
.rte-dropdown-heading-preview.h4 {
|
|
389
|
-
font-size: 14px;
|
|
390
|
-
font-weight: 600;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
.rte-dropdown-heading-preview.h5 {
|
|
394
|
-
font-size: 13px;
|
|
395
|
-
font-weight: 600;
|
|
396
|
-
}
|
|
397
|
-
|
|
475
|
+
display: inline-flex;
|
|
476
|
+
align-items: center;
|
|
477
|
+
font-weight: 600;
|
|
478
|
+
color: var(--rte-text-color);
|
|
479
|
+
font-size: 14px;
|
|
480
|
+
line-height: 1.2;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.rte-dropdown-heading-preview.h1,
|
|
484
|
+
.rte-dropdown-heading-preview.h2,
|
|
485
|
+
.rte-dropdown-heading-preview.h3,
|
|
486
|
+
.rte-dropdown-heading-preview.h4,
|
|
487
|
+
.rte-dropdown-heading-preview.h5,
|
|
398
488
|
.rte-dropdown-heading-preview.h6 {
|
|
399
|
-
|
|
400
|
-
|
|
489
|
+
font-size: 16px;
|
|
490
|
+
font-weight: 600;
|
|
401
491
|
}
|
|
402
492
|
|
|
403
493
|
.rte-dropdown-heading-preview.p {
|
|
404
|
-
|
|
405
|
-
|
|
494
|
+
font-size: 14px;
|
|
495
|
+
font-weight: 400;
|
|
406
496
|
}
|
|
407
497
|
|
|
408
498
|
/* Image Styles in Editor */
|
|
409
499
|
.rte-editor img {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
500
|
+
max-width: 100%;
|
|
501
|
+
height: auto;
|
|
502
|
+
display: block;
|
|
503
|
+
margin: var(--rte-padding-xl) 0;
|
|
504
|
+
border-radius: var(--rte-border-radius);
|
|
505
|
+
box-shadow: var(--rte-shadow-sm);
|
|
416
506
|
}
|
|
417
507
|
|
|
418
508
|
.rte-editor img[data-uploading="true"] {
|
|
419
|
-
|
|
420
|
-
|
|
509
|
+
opacity: 0.6;
|
|
510
|
+
position: relative;
|
|
421
511
|
}
|
|
422
512
|
|
|
423
513
|
.rte-editor img[data-uploading="true"]::after {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
514
|
+
content: "";
|
|
515
|
+
position: absolute;
|
|
516
|
+
top: 50%;
|
|
517
|
+
left: 50%;
|
|
518
|
+
transform: translate(-50%, -50%);
|
|
519
|
+
width: 24px;
|
|
520
|
+
height: 24px;
|
|
521
|
+
border: 2px solid var(--rte-primary-color);
|
|
522
|
+
border-top-color: transparent;
|
|
523
|
+
border-radius: 50%;
|
|
524
|
+
animation: spin 0.8s linear infinite;
|
|
435
525
|
}
|
|
436
526
|
|
|
437
527
|
@keyframes spin {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
528
|
+
to {
|
|
529
|
+
transform: translate(-50%, -50%) rotate(360deg);
|
|
530
|
+
}
|
|
441
531
|
}
|
|
442
532
|
|
|
443
533
|
/* Image Modal */
|
|
444
534
|
.rte-image-modal-overlay {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
535
|
+
position: fixed;
|
|
536
|
+
top: 0;
|
|
537
|
+
left: 0;
|
|
538
|
+
right: 0;
|
|
539
|
+
bottom: 0;
|
|
540
|
+
background: rgba(0, 0, 0, 0.5);
|
|
541
|
+
display: flex;
|
|
542
|
+
align-items: center;
|
|
543
|
+
justify-content: center;
|
|
544
|
+
z-index: 10000;
|
|
545
|
+
padding: var(--rte-padding-xl);
|
|
456
546
|
}
|
|
457
547
|
|
|
458
548
|
.rte-image-modal {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
549
|
+
background: var(--rte-content-bg);
|
|
550
|
+
border-radius: var(--rte-border-radius);
|
|
551
|
+
box-shadow: var(--rte-shadow-lg);
|
|
552
|
+
width: 100%;
|
|
553
|
+
max-width: 500px;
|
|
554
|
+
max-height: 90vh;
|
|
555
|
+
overflow-y: auto;
|
|
556
|
+
display: flex;
|
|
557
|
+
flex-direction: column;
|
|
468
558
|
}
|
|
469
559
|
|
|
470
560
|
.rte-image-modal-header {
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
561
|
+
display: flex;
|
|
562
|
+
align-items: center;
|
|
563
|
+
justify-content: space-between;
|
|
564
|
+
padding: var(--rte-padding-xl);
|
|
565
|
+
border-bottom: 1px solid var(--rte-border-color);
|
|
476
566
|
}
|
|
477
567
|
|
|
478
568
|
.rte-image-modal-header h3 {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
569
|
+
margin: 0;
|
|
570
|
+
font-size: 18px;
|
|
571
|
+
font-weight: 600;
|
|
572
|
+
color: var(--rte-text-color);
|
|
483
573
|
}
|
|
484
574
|
|
|
485
575
|
.rte-image-modal-close {
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
576
|
+
display: flex;
|
|
577
|
+
align-items: center;
|
|
578
|
+
justify-content: center;
|
|
579
|
+
width: 32px;
|
|
580
|
+
height: 32px;
|
|
581
|
+
border: none;
|
|
582
|
+
background: transparent;
|
|
583
|
+
border-radius: 6px;
|
|
584
|
+
cursor: pointer;
|
|
585
|
+
color: var(--rte-text-secondary);
|
|
586
|
+
transition: all 0.15s ease;
|
|
497
587
|
}
|
|
498
588
|
|
|
499
589
|
.rte-image-modal-close:hover {
|
|
500
|
-
|
|
501
|
-
|
|
590
|
+
background: var(--rte-button-hover-bg);
|
|
591
|
+
color: var(--rte-text-color);
|
|
502
592
|
}
|
|
503
593
|
|
|
504
594
|
.rte-image-modal-content {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
595
|
+
padding: var(--rte-padding-xl);
|
|
596
|
+
display: flex;
|
|
597
|
+
flex-direction: column;
|
|
598
|
+
gap: var(--rte-padding-xl);
|
|
509
599
|
}
|
|
510
600
|
|
|
511
601
|
.rte-image-upload-section {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
602
|
+
display: flex;
|
|
603
|
+
flex-direction: column;
|
|
604
|
+
gap: var(--rte-padding-md);
|
|
515
605
|
}
|
|
516
606
|
|
|
517
607
|
.rte-image-upload-label {
|
|
518
|
-
|
|
519
|
-
|
|
608
|
+
display: block;
|
|
609
|
+
cursor: pointer;
|
|
520
610
|
}
|
|
521
611
|
|
|
522
612
|
.rte-image-upload-button {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
613
|
+
display: flex;
|
|
614
|
+
align-items: center;
|
|
615
|
+
justify-content: center;
|
|
616
|
+
gap: var(--rte-padding-md);
|
|
617
|
+
padding: var(--rte-padding-xl);
|
|
618
|
+
border: 2px dashed var(--rte-border-color);
|
|
619
|
+
border-radius: var(--rte-border-radius);
|
|
620
|
+
background: var(--rte-toolbar-bg);
|
|
621
|
+
color: var(--rte-text-color);
|
|
622
|
+
transition: all 0.15s ease;
|
|
623
|
+
font-size: 14px;
|
|
624
|
+
font-weight: 500;
|
|
535
625
|
}
|
|
536
626
|
|
|
537
627
|
.rte-image-upload-button:hover {
|
|
538
|
-
|
|
539
|
-
|
|
628
|
+
border-color: var(--rte-primary-color);
|
|
629
|
+
background: var(--rte-button-hover-bg);
|
|
540
630
|
}
|
|
541
631
|
|
|
542
632
|
.rte-image-url-section,
|
|
543
633
|
.rte-image-alt-section {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
634
|
+
display: flex;
|
|
635
|
+
flex-direction: column;
|
|
636
|
+
gap: var(--rte-padding-sm);
|
|
547
637
|
}
|
|
548
638
|
|
|
549
639
|
.rte-image-url-section label,
|
|
550
640
|
.rte-image-alt-section label {
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
641
|
+
font-size: 14px;
|
|
642
|
+
font-weight: 500;
|
|
643
|
+
color: var(--rte-text-color);
|
|
554
644
|
}
|
|
555
645
|
|
|
556
646
|
.rte-image-url-input,
|
|
557
647
|
.rte-image-alt-input {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
648
|
+
width: 100%;
|
|
649
|
+
padding: var(--rte-padding-md) var(--rte-padding-lg);
|
|
650
|
+
border: 1px solid var(--rte-border-color);
|
|
651
|
+
border-radius: 6px;
|
|
652
|
+
font-size: 14px;
|
|
653
|
+
font-family: var(--rte-font-family);
|
|
654
|
+
color: var(--rte-text-color);
|
|
655
|
+
background: var(--rte-content-bg);
|
|
656
|
+
transition: all 0.15s ease;
|
|
567
657
|
}
|
|
568
658
|
|
|
569
659
|
.rte-image-url-input:focus,
|
|
570
660
|
.rte-image-alt-input:focus {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
661
|
+
outline: none;
|
|
662
|
+
border-color: var(--rte-primary-color);
|
|
663
|
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
|
574
664
|
}
|
|
575
665
|
|
|
576
666
|
.rte-image-preview {
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
667
|
+
display: flex;
|
|
668
|
+
justify-content: center;
|
|
669
|
+
padding: var(--rte-padding-lg);
|
|
670
|
+
background: var(--rte-toolbar-bg);
|
|
671
|
+
border-radius: var(--rte-border-radius);
|
|
582
672
|
}
|
|
583
673
|
|
|
584
674
|
.rte-image-preview img {
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
675
|
+
max-width: 100%;
|
|
676
|
+
max-height: 200px;
|
|
677
|
+
border-radius: var(--rte-border-radius);
|
|
678
|
+
box-shadow: var(--rte-shadow-sm);
|
|
589
679
|
}
|
|
590
680
|
|
|
591
681
|
.rte-image-modal-footer {
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
682
|
+
display: flex;
|
|
683
|
+
align-items: center;
|
|
684
|
+
justify-content: flex-end;
|
|
685
|
+
gap: var(--rte-padding-md);
|
|
686
|
+
padding: var(--rte-padding-xl);
|
|
687
|
+
border-top: 1px solid var(--rte-border-color);
|
|
598
688
|
}
|
|
599
689
|
|
|
600
690
|
.rte-image-modal-cancel,
|
|
601
691
|
.rte-image-modal-insert {
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
692
|
+
padding: var(--rte-padding-md) var(--rte-padding-xl);
|
|
693
|
+
border: none;
|
|
694
|
+
border-radius: 6px;
|
|
695
|
+
font-size: 14px;
|
|
696
|
+
font-weight: 500;
|
|
697
|
+
cursor: pointer;
|
|
698
|
+
transition: all 0.15s ease;
|
|
699
|
+
font-family: var(--rte-font-family);
|
|
610
700
|
}
|
|
611
701
|
|
|
612
702
|
.rte-image-modal-cancel {
|
|
613
|
-
|
|
614
|
-
|
|
703
|
+
background: transparent;
|
|
704
|
+
color: var(--rte-text-secondary);
|
|
615
705
|
}
|
|
616
706
|
|
|
617
707
|
.rte-image-modal-cancel:hover {
|
|
618
|
-
|
|
619
|
-
|
|
708
|
+
background: var(--rte-button-hover-bg);
|
|
709
|
+
color: var(--rte-text-color);
|
|
620
710
|
}
|
|
621
711
|
|
|
622
712
|
.rte-image-modal-insert {
|
|
623
|
-
|
|
624
|
-
|
|
713
|
+
background: var(--rte-primary-color);
|
|
714
|
+
color: white;
|
|
625
715
|
}
|
|
626
716
|
|
|
627
717
|
.rte-image-modal-insert:hover:not(:disabled) {
|
|
628
|
-
|
|
718
|
+
background: var(--rte-primary-hover);
|
|
629
719
|
}
|
|
630
720
|
|
|
631
721
|
.rte-image-modal-insert:disabled {
|
|
632
|
-
|
|
633
|
-
|
|
722
|
+
opacity: 0.5;
|
|
723
|
+
cursor: not-allowed;
|
|
634
724
|
}
|
|
635
725
|
|
|
636
726
|
.rte-spin {
|
|
637
|
-
|
|
727
|
+
animation: spin 0.8s linear infinite;
|
|
638
728
|
}
|