@oix1987/yjd 1.0.3 → 2.0.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.
- package/LICENSE +15 -0
- package/README.md +146 -142
- package/core.js +77 -0
- package/dist/core.esm.js +2 -0
- package/dist/core.esm.js.map +1 -0
- package/dist/rich-editor.esm.js +1 -1
- package/dist/rich-editor.esm.js.map +1 -1
- package/dist/rich-editor.min.js +1 -1
- package/dist/rich-editor.min.js.map +1 -1
- package/index.d.ts +134 -103
- package/index.js +227 -0
- package/lib/core/editor.js +1806 -0
- package/lib/core/format.js +540 -0
- package/lib/core/module.js +81 -0
- package/lib/core/registry.js +158 -0
- package/lib/formats/background.js +213 -0
- package/lib/formats/bold.js +49 -0
- package/lib/formats/capitalization.js +579 -0
- package/lib/formats/color.js +183 -0
- package/lib/formats/emoji.js +282 -0
- package/lib/formats/font-family.js +548 -0
- package/lib/formats/heading.js +502 -0
- package/lib/formats/image.js +347 -0
- package/lib/formats/import.js +385 -0
- package/lib/formats/indent.js +297 -0
- package/lib/formats/italic.js +27 -0
- package/lib/formats/line-height.js +562 -0
- package/lib/formats/link.js +251 -0
- package/lib/formats/list.js +635 -0
- package/lib/formats/strike.js +31 -0
- package/lib/formats/subscript.js +40 -0
- package/lib/formats/superscript.js +39 -0
- package/lib/formats/table.js +293 -0
- package/lib/formats/tag.js +304 -0
- package/lib/formats/text-align.js +422 -0
- package/lib/formats/text-size.js +498 -0
- package/lib/formats/underline.js +30 -0
- package/lib/formats/video.js +381 -0
- package/lib/modules/block-toolbar.js +639 -0
- package/lib/modules/code-view.js +447 -0
- package/lib/modules/find-replace.js +273 -0
- package/lib/modules/history.js +425 -0
- package/lib/modules/resize-handles.js +701 -0
- package/lib/modules/slash-menu.js +183 -0
- package/lib/modules/table-toolbar.js +635 -0
- package/lib/modules/toolbar.js +607 -0
- package/lib/styles-loader.js +142 -0
- package/{dist → lib}/styles.css +1285 -35
- package/lib/styles.css.js +2 -0
- package/lib/styles.min.css +1 -0
- package/lib/ui/color-picker.js +296 -0
- package/lib/ui/customselect.js +351 -0
- package/lib/ui/emoji-picker.js +196 -0
- package/lib/ui/icons.js +145 -0
- package/lib/ui/image-popup.js +435 -0
- package/lib/ui/import-popup.js +288 -0
- package/lib/ui/link-popup.js +139 -0
- package/lib/ui/list-picker.js +307 -0
- package/lib/ui/select-button.js +68 -0
- package/lib/ui/table-popup.js +171 -0
- package/lib/ui/tag-popup.js +249 -0
- package/lib/ui/text-align-picker.js +278 -0
- package/lib/ui/video-popup.js +413 -0
- package/lib/utils/exec-command.js +72 -0
- package/lib/utils/history-helper.js +50 -0
- package/lib/utils/popup-helper.js +219 -0
- package/lib/utils/popup-positioning.js +234 -0
- package/lib/utils/sanitize.js +164 -0
- package/package.json +51 -32
- package/umd-entry.js +18 -0
package/{dist → lib}/styles.css
RENAMED
|
@@ -70,19 +70,25 @@
|
|
|
70
70
|
position: relative;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
/* Placeholder styles for contentEditable
|
|
73
|
+
/* Placeholder styles for contentEditable.
|
|
74
|
+
Inherit the editor's padding + font so the placeholder lands exactly on the
|
|
75
|
+
content origin (where the caret/first character sits) at ANY padding/size —
|
|
76
|
+
instead of hardcoded offsets that drifted out of alignment. */
|
|
74
77
|
.yjd-rich-editor .rich-editor-area[data-placeholder]:before {
|
|
75
78
|
content: attr(data-placeholder);
|
|
76
79
|
color: #9ca3af;
|
|
77
80
|
pointer-events: none;
|
|
78
81
|
position: absolute;
|
|
79
|
-
top:
|
|
80
|
-
left:
|
|
82
|
+
top: 0;
|
|
83
|
+
left: 0;
|
|
84
|
+
right: 0;
|
|
85
|
+
padding: inherit;
|
|
86
|
+
box-sizing: border-box;
|
|
87
|
+
font: inherit;
|
|
81
88
|
font-style: italic;
|
|
89
|
+
line-height: inherit;
|
|
82
90
|
display: none;
|
|
83
91
|
z-index: 1;
|
|
84
|
-
font-size: 16px;
|
|
85
|
-
line-height: 1.7;
|
|
86
92
|
}
|
|
87
93
|
|
|
88
94
|
.yjd-rich-editor .rich-editor-area[data-placeholder].placeholder-visible:before {
|
|
@@ -333,34 +339,9 @@
|
|
|
333
339
|
background: #EEEEEE !important;
|
|
334
340
|
cursor: pointer;
|
|
335
341
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
.yjd-rich-editor .rich-editor-toolbar-btn.active svg,
|
|
342
|
-
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg {
|
|
343
|
-
fill: #136FDF !important;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
.yjd-rich-editor .rich-editor-toolbar-btn.active svg path,
|
|
347
|
-
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg path {
|
|
348
|
-
fill: #136FDF !important;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
/* Specific icon styles for better visibility */
|
|
354
|
-
.yjd-rich-editor .rich-editor-toolbar-btn.list-btn .icon svg,
|
|
355
|
-
.yjd-rich-editor .rich-editor-toolbar-btn.emoji-btn .icon svg,
|
|
356
|
-
.yjd-rich-editor .rich-editor-toolbar-btn.image-btn .icon svg,
|
|
357
|
-
.yjd-rich-editor .rich-editor-toolbar-btn.video-btn .icon svg,
|
|
358
|
-
.yjd-rich-editor .rich-editor-toolbar-btn.tag-btn .icon svg,
|
|
359
|
-
.yjd-rich-editor .rich-editor-toolbar-btn.import-btn .icon svg {
|
|
360
|
-
width: 16px;
|
|
361
|
-
height: 16px;
|
|
362
|
-
fill: #454545;
|
|
363
|
-
}
|
|
342
|
+
/* Active toolbar-button + icon colours are owned by the design-system layer
|
|
343
|
+
(accent), and icon sizing/stroke by the outline-icon layer — the old blue
|
|
344
|
+
(#136FDF) / grey (#454545) overrides have been removed. */
|
|
364
345
|
|
|
365
346
|
/*block toolbar*/
|
|
366
347
|
.yjd-rich-editor .block-toolbar-btn{
|
|
@@ -579,6 +560,18 @@
|
|
|
579
560
|
display: inline-flex !important;
|
|
580
561
|
align-items: center ;
|
|
581
562
|
justify-content: center ;
|
|
563
|
+
width: 16px;
|
|
564
|
+
height: 16px;
|
|
565
|
+
flex: 0 0 auto;
|
|
566
|
+
}
|
|
567
|
+
/* The chevron SVG keeps the `dropdown-icon` class (not `.icon`), so size it
|
|
568
|
+
explicitly here — otherwise it has no dimensions and the arrow disappears. */
|
|
569
|
+
.yjd-rich-editor .dropdown-icon svg{
|
|
570
|
+
width: 16px;
|
|
571
|
+
height: 16px;
|
|
572
|
+
display: block;
|
|
573
|
+
stroke: currentColor;
|
|
574
|
+
fill: none;
|
|
582
575
|
}
|
|
583
576
|
|
|
584
577
|
|
|
@@ -891,20 +884,27 @@
|
|
|
891
884
|
.yjd-rich-editor .rich-editor-table {
|
|
892
885
|
border-collapse: collapse;
|
|
893
886
|
width: 100%;
|
|
887
|
+
/* Never exceed the editor's content width, even mid-resize. */
|
|
888
|
+
max-width: 100%;
|
|
889
|
+
box-sizing: border-box;
|
|
894
890
|
margin: 16px 0;
|
|
895
891
|
font-size: 14px;
|
|
896
892
|
line-height: 1.5;
|
|
897
893
|
position: relative;
|
|
898
894
|
display: table;
|
|
899
|
-
table-layout:
|
|
895
|
+
table-layout: fixed;
|
|
900
896
|
}
|
|
901
897
|
|
|
902
898
|
.yjd-rich-editor .rich-editor-table td {
|
|
899
|
+
/* border-box so a cell's min-width includes its padding+border — otherwise
|
|
900
|
+
padding/borders push the table past the width set during resize. */
|
|
901
|
+
box-sizing: border-box;
|
|
903
902
|
border: 1px solid #d1d5db;
|
|
904
903
|
padding: 8px 12px;
|
|
905
904
|
min-height: 28px;
|
|
906
905
|
vertical-align: top;
|
|
907
906
|
background: #fff;
|
|
907
|
+
overflow-wrap: break-word;
|
|
908
908
|
}
|
|
909
909
|
|
|
910
910
|
.yjd-rich-editor .rich-editor-table td:focus {
|
|
@@ -2120,4 +2120,1254 @@
|
|
|
2120
2120
|
.yjd-rich-editor .rich-editor-popup-container .custom-select-popup {
|
|
2121
2121
|
position: absolute !important;
|
|
2122
2122
|
z-index: 1001 !important;
|
|
2123
|
-
}
|
|
2123
|
+
}
|
|
2124
|
+
/* =====================================================================
|
|
2125
|
+
DESIGN SYSTEM v2 — "Calm writing studio"
|
|
2126
|
+
A friendly, cohesive theme. Everything below is driven by tokens so
|
|
2127
|
+
every surface (toolbar, popups, find/replace, tables, floating tools)
|
|
2128
|
+
shares the same palette, radius, shadow and motion.
|
|
2129
|
+
This block is appended last so it themes the components above.
|
|
2130
|
+
===================================================================== */
|
|
2131
|
+
|
|
2132
|
+
.yjd-rich-editor {
|
|
2133
|
+
/* Palette */
|
|
2134
|
+
--rte-bg: #ffffff;
|
|
2135
|
+
--rte-chrome: #fbfbfd;
|
|
2136
|
+
--rte-chrome-2: #f2f2f7;
|
|
2137
|
+
--rte-border: #e9e9f1;
|
|
2138
|
+
--rte-border-strong: #dadae6;
|
|
2139
|
+
--rte-ink: #20242f;
|
|
2140
|
+
--rte-muted: #767c8e;
|
|
2141
|
+
--rte-accent: #6d5efc;
|
|
2142
|
+
--rte-accent-ink: #5a48ee;
|
|
2143
|
+
--rte-accent-weak: #efedff;
|
|
2144
|
+
--rte-accent-ring: rgba(109, 94, 252, 0.28);
|
|
2145
|
+
--rte-danger: #e5484d;
|
|
2146
|
+
/* Shape & depth */
|
|
2147
|
+
--rte-radius: 14px;
|
|
2148
|
+
--rte-radius-md: 11px;
|
|
2149
|
+
--rte-radius-sm: 8px;
|
|
2150
|
+
--rte-shadow-sm: 0 1px 2px rgba(20, 24, 46, 0.06);
|
|
2151
|
+
--rte-shadow: 0 12px 32px -8px rgba(20, 24, 46, 0.20), 0 4px 10px -4px rgba(20, 24, 46, 0.10);
|
|
2152
|
+
--rte-t: 140ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
2153
|
+
|
|
2154
|
+
border: 1px solid var(--rte-border) !important;
|
|
2155
|
+
border-radius: var(--rte-radius) !important;
|
|
2156
|
+
background: var(--rte-bg);
|
|
2157
|
+
color: var(--rte-ink);
|
|
2158
|
+
box-shadow: var(--rte-shadow-sm);
|
|
2159
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
/* Use a friendly system stack everywhere (overrides the forced "Inter") */
|
|
2163
|
+
.yjd-rich-editor .toolbar-container button,
|
|
2164
|
+
.yjd-rich-editor .toolbar-container input,
|
|
2165
|
+
.yjd-rich-editor .toolbar-container select,
|
|
2166
|
+
.yjd-rich-editor .toolbar-container textarea,
|
|
2167
|
+
.yjd-rich-editor .rich-editor-popup-container button,
|
|
2168
|
+
.yjd-rich-editor .rich-editor-popup-container input,
|
|
2169
|
+
.yjd-rich-editor .rich-editor-popup-container select,
|
|
2170
|
+
.yjd-rich-editor .rich-editor-popup-container textarea {
|
|
2171
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
/* ---------- Toolbar ---------- */
|
|
2175
|
+
.yjd-rich-editor .rich-editor-toolbar-container {
|
|
2176
|
+
background: var(--rte-chrome);
|
|
2177
|
+
border-bottom: 1px solid var(--rte-border);
|
|
2178
|
+
}
|
|
2179
|
+
.yjd-rich-editor .rich-editor-toolbar-1,
|
|
2180
|
+
.yjd-rich-editor .rich-editor-toolbar-2 {
|
|
2181
|
+
display: flex;
|
|
2182
|
+
flex-wrap: wrap;
|
|
2183
|
+
align-items: center;
|
|
2184
|
+
justify-content: flex-start; /* pack left; override legacy space-between */
|
|
2185
|
+
column-gap: 0;
|
|
2186
|
+
row-gap: 4px;
|
|
2187
|
+
padding: 8px 12px;
|
|
2188
|
+
}
|
|
2189
|
+
.yjd-rich-editor .rich-editor-toolbar-2.visible {
|
|
2190
|
+
border-top: 1px solid var(--rte-border);
|
|
2191
|
+
}
|
|
2192
|
+
/* Group by spacing, not dividers: tight within a group, airy between groups. */
|
|
2193
|
+
.yjd-rich-editor .toolbar-group {
|
|
2194
|
+
display: flex;
|
|
2195
|
+
align-items: center;
|
|
2196
|
+
gap: 2px;
|
|
2197
|
+
border-right: none;
|
|
2198
|
+
margin: 0;
|
|
2199
|
+
padding: 0;
|
|
2200
|
+
}
|
|
2201
|
+
.yjd-rich-editor .toolbar-group + .toolbar-group {
|
|
2202
|
+
margin-left: 12px;
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
/* ---------- Buttons (toolbar + dropdown triggers) ---------- */
|
|
2206
|
+
.yjd-rich-editor .rich-editor-toolbar-btn,
|
|
2207
|
+
.yjd-rich-editor .custom-select-button {
|
|
2208
|
+
display: inline-flex;
|
|
2209
|
+
align-items: center;
|
|
2210
|
+
justify-content: center;
|
|
2211
|
+
gap: 6px;
|
|
2212
|
+
min-width: 32px;
|
|
2213
|
+
height: 32px;
|
|
2214
|
+
padding: 0 8px;
|
|
2215
|
+
border: 1px solid transparent;
|
|
2216
|
+
border-radius: var(--rte-radius-sm);
|
|
2217
|
+
background: transparent;
|
|
2218
|
+
color: var(--rte-ink);
|
|
2219
|
+
cursor: pointer;
|
|
2220
|
+
box-shadow: none;
|
|
2221
|
+
transition: background var(--rte-t), color var(--rte-t),
|
|
2222
|
+
box-shadow var(--rte-t), border-color var(--rte-t);
|
|
2223
|
+
}
|
|
2224
|
+
.yjd-rich-editor .rich-editor-toolbar-btn:hover,
|
|
2225
|
+
.yjd-rich-editor .custom-select-button:hover {
|
|
2226
|
+
background: var(--rte-chrome-2);
|
|
2227
|
+
color: var(--rte-ink);
|
|
2228
|
+
}
|
|
2229
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active {
|
|
2230
|
+
background: var(--rte-accent-weak);
|
|
2231
|
+
color: var(--rte-accent-ink);
|
|
2232
|
+
border-color: transparent;
|
|
2233
|
+
}
|
|
2234
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg,
|
|
2235
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg path {
|
|
2236
|
+
fill: var(--rte-accent-ink);
|
|
2237
|
+
color: var(--rte-accent-ink);
|
|
2238
|
+
}
|
|
2239
|
+
.yjd-rich-editor .rich-editor-toolbar-btn:disabled,
|
|
2240
|
+
.yjd-rich-editor .rich-editor-toolbar-btn[disabled] {
|
|
2241
|
+
opacity: 0.38 !important;
|
|
2242
|
+
cursor: not-allowed !important;
|
|
2243
|
+
}
|
|
2244
|
+
.yjd-rich-editor .rich-editor-toolbar-btn:focus-visible,
|
|
2245
|
+
.yjd-rich-editor .custom-select-button:focus-visible {
|
|
2246
|
+
outline: none;
|
|
2247
|
+
border-color: var(--rte-accent);
|
|
2248
|
+
box-shadow: 0 0 0 3px var(--rte-accent-ring);
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
/* ---------- Status bar ---------- */
|
|
2252
|
+
.yjd-rich-editor .rich-editor-statusbar {
|
|
2253
|
+
display: flex;
|
|
2254
|
+
align-items: center;
|
|
2255
|
+
justify-content: space-between;
|
|
2256
|
+
gap: 12px;
|
|
2257
|
+
padding: 7px 14px;
|
|
2258
|
+
background: var(--rte-chrome);
|
|
2259
|
+
border-top: 1px solid var(--rte-border);
|
|
2260
|
+
}
|
|
2261
|
+
.yjd-rich-editor .rich-editor-breadcrumb,
|
|
2262
|
+
.yjd-rich-editor .wordcount {
|
|
2263
|
+
color: var(--rte-muted);
|
|
2264
|
+
font-size: 12px;
|
|
2265
|
+
letter-spacing: 0.01em;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
/* ---------- Editor surface ---------- */
|
|
2269
|
+
.yjd-rich-editor .rich-editor-area {
|
|
2270
|
+
color: var(--rte-ink);
|
|
2271
|
+
font-size: 16px;
|
|
2272
|
+
line-height: 1.75;
|
|
2273
|
+
padding: 22px 24px;
|
|
2274
|
+
}
|
|
2275
|
+
.yjd-rich-editor .rich-editor-area a {
|
|
2276
|
+
color: var(--rte-accent-ink);
|
|
2277
|
+
text-decoration-color: var(--rte-accent-ring);
|
|
2278
|
+
text-underline-offset: 2px;
|
|
2279
|
+
}
|
|
2280
|
+
.yjd-rich-editor .rich-editor-area[data-placeholder].placeholder-visible:before {
|
|
2281
|
+
color: var(--rte-muted);
|
|
2282
|
+
opacity: 0.55;
|
|
2283
|
+
}
|
|
2284
|
+
.yjd-rich-editor .rich-editor-area blockquote {
|
|
2285
|
+
border-left: 3px solid var(--rte-accent);
|
|
2286
|
+
background: var(--rte-accent-weak);
|
|
2287
|
+
border-radius: 0 var(--rte-radius-sm) var(--rte-radius-sm) 0;
|
|
2288
|
+
padding: 8px 16px;
|
|
2289
|
+
color: var(--rte-ink);
|
|
2290
|
+
margin: 12px 0;
|
|
2291
|
+
}
|
|
2292
|
+
.yjd-rich-editor .rich-editor-area code {
|
|
2293
|
+
background: var(--rte-chrome-2);
|
|
2294
|
+
border-radius: 6px;
|
|
2295
|
+
padding: 2px 6px;
|
|
2296
|
+
font-size: 0.9em;
|
|
2297
|
+
}
|
|
2298
|
+
.yjd-rich-editor .rich-editor-area pre {
|
|
2299
|
+
background: #20242f;
|
|
2300
|
+
color: #ececf5;
|
|
2301
|
+
border-radius: var(--rte-radius-md);
|
|
2302
|
+
padding: 14px 16px;
|
|
2303
|
+
border: none;
|
|
2304
|
+
}
|
|
2305
|
+
.yjd-rich-editor .rich-editor-area pre code {
|
|
2306
|
+
background: transparent;
|
|
2307
|
+
color: inherit;
|
|
2308
|
+
padding: 0;
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
/* ---------- Popups (shared shell) ---------- */
|
|
2312
|
+
.yjd-rich-editor .color-picker-popup,
|
|
2313
|
+
.yjd-rich-editor .custom-select-popup,
|
|
2314
|
+
.yjd-rich-editor .heading-select-popup,
|
|
2315
|
+
.yjd-rich-editor .capitalization-select-popup,
|
|
2316
|
+
.yjd-rich-editor .font-family-select-popup,
|
|
2317
|
+
.yjd-rich-editor .line-height-select-popup,
|
|
2318
|
+
.yjd-rich-editor .text-size-select-popup,
|
|
2319
|
+
.yjd-rich-editor .link-popup,
|
|
2320
|
+
.yjd-rich-editor .image-popup,
|
|
2321
|
+
.yjd-rich-editor .video-popup,
|
|
2322
|
+
.yjd-rich-editor .tag-popup,
|
|
2323
|
+
.yjd-rich-editor .import-popup,
|
|
2324
|
+
.yjd-rich-editor .table-popup,
|
|
2325
|
+
.yjd-rich-editor .text-align-picker-popup,
|
|
2326
|
+
.yjd-rich-editor .emoji-picker-popup {
|
|
2327
|
+
background: var(--rte-bg);
|
|
2328
|
+
border: 1px solid var(--rte-border);
|
|
2329
|
+
border-radius: var(--rte-radius-md);
|
|
2330
|
+
box-shadow: var(--rte-shadow);
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
/* Dropdown list items */
|
|
2334
|
+
.yjd-rich-editor .custom-select-item-button {
|
|
2335
|
+
border-radius: var(--rte-radius-sm);
|
|
2336
|
+
color: var(--rte-ink);
|
|
2337
|
+
transition: background var(--rte-t), color var(--rte-t);
|
|
2338
|
+
}
|
|
2339
|
+
.yjd-rich-editor .custom-select-item-button:hover {
|
|
2340
|
+
background: var(--rte-chrome-2);
|
|
2341
|
+
}
|
|
2342
|
+
.yjd-rich-editor .custom-select-item-button.current {
|
|
2343
|
+
background: var(--rte-accent-weak);
|
|
2344
|
+
color: var(--rte-accent-ink);
|
|
2345
|
+
}
|
|
2346
|
+
.yjd-rich-editor .custom-select-item-button.current .item-checkmark {
|
|
2347
|
+
color: var(--rte-accent-ink);
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
/* ---------- Forms inside popups ---------- */
|
|
2351
|
+
.yjd-rich-editor .yjd-input,
|
|
2352
|
+
.yjd-rich-editor .yjd-select-input {
|
|
2353
|
+
border: 1px solid var(--rte-border-strong);
|
|
2354
|
+
border-radius: var(--rte-radius-sm);
|
|
2355
|
+
color: var(--rte-ink);
|
|
2356
|
+
transition: border-color var(--rte-t), box-shadow var(--rte-t);
|
|
2357
|
+
}
|
|
2358
|
+
.yjd-rich-editor .yjd-input:focus,
|
|
2359
|
+
.yjd-rich-editor .yjd-select-input:focus {
|
|
2360
|
+
outline: none;
|
|
2361
|
+
border-color: var(--rte-accent);
|
|
2362
|
+
box-shadow: 0 0 0 3px var(--rte-accent-ring);
|
|
2363
|
+
}
|
|
2364
|
+
.yjd-rich-editor .yjd-input-title {
|
|
2365
|
+
color: var(--rte-ink);
|
|
2366
|
+
font-weight: 600;
|
|
2367
|
+
}
|
|
2368
|
+
.yjd-rich-editor .yjd-input-label {
|
|
2369
|
+
color: var(--rte-muted);
|
|
2370
|
+
}
|
|
2371
|
+
.yjd-rich-editor .yjd-button-confirm {
|
|
2372
|
+
background: var(--rte-accent);
|
|
2373
|
+
color: #fff;
|
|
2374
|
+
border: none;
|
|
2375
|
+
border-radius: var(--rte-radius-sm);
|
|
2376
|
+
transition: background var(--rte-t);
|
|
2377
|
+
}
|
|
2378
|
+
.yjd-rich-editor .yjd-button-confirm:hover {
|
|
2379
|
+
background: var(--rte-accent-ink);
|
|
2380
|
+
}
|
|
2381
|
+
.yjd-rich-editor .yjd-button-cancel {
|
|
2382
|
+
background: var(--rte-chrome-2);
|
|
2383
|
+
color: var(--rte-ink);
|
|
2384
|
+
border: 1px solid var(--rte-border);
|
|
2385
|
+
border-radius: var(--rte-radius-sm);
|
|
2386
|
+
transition: background var(--rte-t);
|
|
2387
|
+
}
|
|
2388
|
+
.yjd-rich-editor .yjd-button-cancel:hover {
|
|
2389
|
+
background: #e9e9f2;
|
|
2390
|
+
}
|
|
2391
|
+
.yjd-rich-editor .yjd-custom-upload-button {
|
|
2392
|
+
border-radius: var(--rte-radius-sm);
|
|
2393
|
+
border: 1px dashed var(--rte-border-strong);
|
|
2394
|
+
color: var(--rte-accent-ink);
|
|
2395
|
+
background: var(--rte-accent-weak);
|
|
2396
|
+
transition: background var(--rte-t), border-color var(--rte-t);
|
|
2397
|
+
}
|
|
2398
|
+
.yjd-rich-editor .yjd-custom-upload-button:hover {
|
|
2399
|
+
border-color: var(--rte-accent);
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
/* ---------- Floating toolbars (block + table) ---------- */
|
|
2403
|
+
.yjd-rich-editor .block-toolbar-container,
|
|
2404
|
+
.yjd-rich-editor .table-toolbar-container {
|
|
2405
|
+
background: var(--rte-bg);
|
|
2406
|
+
border: 1px solid var(--rte-border);
|
|
2407
|
+
border-radius: var(--rte-radius-md);
|
|
2408
|
+
box-shadow: var(--rte-shadow);
|
|
2409
|
+
padding: 4px;
|
|
2410
|
+
gap: 2px;
|
|
2411
|
+
}
|
|
2412
|
+
.yjd-rich-editor .block-toolbar-btn,
|
|
2413
|
+
.yjd-rich-editor .table-toolbar-btn {
|
|
2414
|
+
border: 1px solid transparent;
|
|
2415
|
+
border-radius: var(--rte-radius-sm);
|
|
2416
|
+
background: transparent;
|
|
2417
|
+
color: var(--rte-ink);
|
|
2418
|
+
transition: background var(--rte-t), color var(--rte-t);
|
|
2419
|
+
}
|
|
2420
|
+
.yjd-rich-editor .block-toolbar-btn:hover,
|
|
2421
|
+
.yjd-rich-editor .table-toolbar-btn:hover {
|
|
2422
|
+
background: var(--rte-chrome-2);
|
|
2423
|
+
}
|
|
2424
|
+
.yjd-rich-editor .block-toolbar-btn.active {
|
|
2425
|
+
background: var(--rte-accent-weak);
|
|
2426
|
+
color: var(--rte-accent-ink);
|
|
2427
|
+
}
|
|
2428
|
+
.yjd-rich-editor .block-toolbar-btn.active .icon svg,
|
|
2429
|
+
.yjd-rich-editor .block-toolbar-btn.active .icon svg path {
|
|
2430
|
+
fill: var(--rte-accent-ink);
|
|
2431
|
+
}
|
|
2432
|
+
|
|
2433
|
+
/* ---------- Tables ---------- */
|
|
2434
|
+
.yjd-rich-editor .rich-editor-table td {
|
|
2435
|
+
border: 1px solid var(--rte-border-strong) !important;
|
|
2436
|
+
}
|
|
2437
|
+
.yjd-rich-editor .rich-editor-table td:focus {
|
|
2438
|
+
outline: none;
|
|
2439
|
+
box-shadow: inset 0 0 0 2px var(--rte-accent);
|
|
2440
|
+
background: var(--rte-accent-weak);
|
|
2441
|
+
}
|
|
2442
|
+
.yjd-rich-editor .table-grid-cell.highlighted {
|
|
2443
|
+
background: var(--rte-accent);
|
|
2444
|
+
border-color: var(--rte-accent);
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
/* ---------- Resize handles ---------- */
|
|
2448
|
+
.yjd-rich-editor .resize-handle {
|
|
2449
|
+
background: var(--rte-accent) !important;
|
|
2450
|
+
border: 2px solid #fff !important;
|
|
2451
|
+
border-radius: 50% !important;
|
|
2452
|
+
box-shadow: var(--rte-shadow-sm) !important;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
/* ---------- Find & Replace panel ---------- */
|
|
2456
|
+
.yjd-rich-editor .yjd-find-replace {
|
|
2457
|
+
position: absolute;
|
|
2458
|
+
top: 10px;
|
|
2459
|
+
right: 10px;
|
|
2460
|
+
z-index: 1100;
|
|
2461
|
+
display: none;
|
|
2462
|
+
flex-direction: column;
|
|
2463
|
+
gap: 8px;
|
|
2464
|
+
padding: 10px;
|
|
2465
|
+
background: var(--rte-bg);
|
|
2466
|
+
border: 1px solid var(--rte-border);
|
|
2467
|
+
border-radius: var(--rte-radius-md);
|
|
2468
|
+
box-shadow: var(--rte-shadow);
|
|
2469
|
+
font: 13px/1.4 system-ui, -apple-system, sans-serif;
|
|
2470
|
+
max-width: calc(100% - 20px);
|
|
2471
|
+
}
|
|
2472
|
+
.yjd-rich-editor .yjd-find-replace.open {
|
|
2473
|
+
display: flex;
|
|
2474
|
+
}
|
|
2475
|
+
.yjd-rich-editor .yjd-find-row {
|
|
2476
|
+
display: flex;
|
|
2477
|
+
align-items: center;
|
|
2478
|
+
gap: 6px;
|
|
2479
|
+
}
|
|
2480
|
+
.yjd-rich-editor .yjd-find-input {
|
|
2481
|
+
flex: 1 1 auto;
|
|
2482
|
+
min-width: 150px;
|
|
2483
|
+
height: 30px;
|
|
2484
|
+
padding: 0 9px;
|
|
2485
|
+
border: 1px solid var(--rte-border-strong);
|
|
2486
|
+
border-radius: var(--rte-radius-sm);
|
|
2487
|
+
color: var(--rte-ink);
|
|
2488
|
+
background: var(--rte-bg);
|
|
2489
|
+
transition: border-color var(--rte-t), box-shadow var(--rte-t);
|
|
2490
|
+
}
|
|
2491
|
+
.yjd-rich-editor .yjd-find-input:focus {
|
|
2492
|
+
outline: none;
|
|
2493
|
+
border-color: var(--rte-accent);
|
|
2494
|
+
box-shadow: 0 0 0 3px var(--rte-accent-ring);
|
|
2495
|
+
}
|
|
2496
|
+
.yjd-rich-editor .yjd-find-count {
|
|
2497
|
+
min-width: 46px;
|
|
2498
|
+
text-align: center;
|
|
2499
|
+
color: var(--rte-muted);
|
|
2500
|
+
font-variant-numeric: tabular-nums;
|
|
2501
|
+
}
|
|
2502
|
+
.yjd-rich-editor .yjd-find-btn {
|
|
2503
|
+
height: 30px;
|
|
2504
|
+
padding: 0 12px;
|
|
2505
|
+
border: 1px solid var(--rte-border);
|
|
2506
|
+
border-radius: var(--rte-radius-sm);
|
|
2507
|
+
background: var(--rte-chrome);
|
|
2508
|
+
color: var(--rte-ink);
|
|
2509
|
+
cursor: pointer;
|
|
2510
|
+
transition: background var(--rte-t), color var(--rte-t), border-color var(--rte-t),
|
|
2511
|
+
box-shadow var(--rte-t);
|
|
2512
|
+
}
|
|
2513
|
+
.yjd-rich-editor .yjd-find-btn:hover {
|
|
2514
|
+
background: var(--rte-chrome-2);
|
|
2515
|
+
}
|
|
2516
|
+
.yjd-rich-editor .yjd-find-btn:focus-visible {
|
|
2517
|
+
outline: none;
|
|
2518
|
+
border-color: var(--rte-accent);
|
|
2519
|
+
box-shadow: 0 0 0 3px var(--rte-accent-ring);
|
|
2520
|
+
}
|
|
2521
|
+
.yjd-rich-editor .yjd-find-icon {
|
|
2522
|
+
width: 30px;
|
|
2523
|
+
padding: 0;
|
|
2524
|
+
font-size: 15px;
|
|
2525
|
+
line-height: 1;
|
|
2526
|
+
}
|
|
2527
|
+
.yjd-rich-editor .yjd-find-toggle.active {
|
|
2528
|
+
background: var(--rte-accent-weak);
|
|
2529
|
+
color: var(--rte-accent-ink);
|
|
2530
|
+
border-color: transparent;
|
|
2531
|
+
}
|
|
2532
|
+
.yjd-rich-editor .yjd-find-replace .yjd-find-btn.yjd-find-close:hover {
|
|
2533
|
+
background: #fdecec;
|
|
2534
|
+
color: var(--rte-danger);
|
|
2535
|
+
border-color: #f6caca;
|
|
2536
|
+
}
|
|
2537
|
+
.yjd-rich-editor .yjd-find-replace-input {
|
|
2538
|
+
flex: 1 1 auto;
|
|
2539
|
+
}
|
|
2540
|
+
.yjd-rich-editor .yjd-find-row .yjd-find-btn:not(.yjd-find-icon) {
|
|
2541
|
+
flex: 0 0 auto;
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
/* Match highlights */
|
|
2545
|
+
.yjd-rich-editor mark.yjd-find-hit {
|
|
2546
|
+
background: #fff1b8;
|
|
2547
|
+
color: inherit;
|
|
2548
|
+
border-radius: 3px;
|
|
2549
|
+
}
|
|
2550
|
+
.yjd-rich-editor mark.yjd-find-hit.active {
|
|
2551
|
+
background: var(--rte-accent);
|
|
2552
|
+
color: #fff;
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
/* ---------- Accessibility: respect reduced motion ---------- */
|
|
2556
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2557
|
+
.yjd-rich-editor * {
|
|
2558
|
+
transition-duration: 0.01ms !important;
|
|
2559
|
+
animation-duration: 0.01ms !important;
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
/* =====================================================================
|
|
2564
|
+
DESIGN SYSTEM v2.1 — minimal & light refinements
|
|
2565
|
+
Icon unification, friendlier popovers, lighter inputs & buttons.
|
|
2566
|
+
===================================================================== */
|
|
2567
|
+
|
|
2568
|
+
/* ---------- Icons: one size, one color ---------- */
|
|
2569
|
+
/* Convert the hard-coded greys to currentColor so every icon follows the
|
|
2570
|
+
button's text colour (and the accent on active). Outline icons (stroke)
|
|
2571
|
+
and the deliberately-coloured "no colour" swatch are left untouched. */
|
|
2572
|
+
.yjd-rich-editor .icon svg [fill="#454545"],
|
|
2573
|
+
.yjd-rich-editor .icon svg [fill="#231F20"],
|
|
2574
|
+
.yjd-rich-editor .icon svg [fill="#010101"],
|
|
2575
|
+
.yjd-rich-editor .icon svg[fill="#454545"],
|
|
2576
|
+
.yjd-rich-editor .block-toolbar-btn svg [fill="#454545"],
|
|
2577
|
+
.yjd-rich-editor .table-toolbar-btn svg [fill="#454545"] {
|
|
2578
|
+
fill: currentColor;
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
/* Consistent icon footprint — equal height, centered, never distorted. */
|
|
2582
|
+
.yjd-rich-editor .rich-editor-toolbar-btn .icon,
|
|
2583
|
+
.yjd-rich-editor .block-toolbar-btn .icon,
|
|
2584
|
+
.yjd-rich-editor .table-toolbar-btn .icon {
|
|
2585
|
+
display: inline-flex;
|
|
2586
|
+
align-items: center;
|
|
2587
|
+
justify-content: center;
|
|
2588
|
+
width: 18px;
|
|
2589
|
+
height: 18px;
|
|
2590
|
+
color: inherit;
|
|
2591
|
+
}
|
|
2592
|
+
.yjd-rich-editor .rich-editor-toolbar-btn .icon svg,
|
|
2593
|
+
.yjd-rich-editor .block-toolbar-btn .icon svg,
|
|
2594
|
+
.yjd-rich-editor .table-toolbar-btn .icon svg {
|
|
2595
|
+
width: auto !important;
|
|
2596
|
+
height: 16px !important;
|
|
2597
|
+
max-width: 18px;
|
|
2598
|
+
display: block;
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
/* Default icon colour = quiet ink; active = accent (overrides legacy blue). */
|
|
2602
|
+
.yjd-rich-editor .rich-editor-toolbar-btn .icon svg,
|
|
2603
|
+
.yjd-rich-editor .rich-editor-toolbar-btn .icon svg path {
|
|
2604
|
+
fill: currentColor;
|
|
2605
|
+
}
|
|
2606
|
+
.yjd-rich-editor .rich-editor-toolbar-btn { color: #4b5060; }
|
|
2607
|
+
.yjd-rich-editor .rich-editor-toolbar-btn:hover { color: var(--rte-ink); }
|
|
2608
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active,
|
|
2609
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg,
|
|
2610
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg path,
|
|
2611
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg [fill] {
|
|
2612
|
+
color: var(--rte-accent-ink) !important;
|
|
2613
|
+
fill: var(--rte-accent-ink) !important;
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2616
|
+
/* ---------- Toolbar: lighter weight ---------- */
|
|
2617
|
+
.yjd-rich-editor .rich-editor-toolbar-btn,
|
|
2618
|
+
.yjd-rich-editor .custom-select-button {
|
|
2619
|
+
box-shadow: none;
|
|
2620
|
+
}
|
|
2621
|
+
.yjd-rich-editor .custom-select-button {
|
|
2622
|
+
border-color: var(--rte-border);
|
|
2623
|
+
background: var(--rte-bg);
|
|
2624
|
+
color: var(--rte-ink);
|
|
2625
|
+
font-weight: 500;
|
|
2626
|
+
}
|
|
2627
|
+
.yjd-rich-editor .custom-select-button:hover {
|
|
2628
|
+
border-color: var(--rte-border-strong);
|
|
2629
|
+
background: var(--rte-bg);
|
|
2630
|
+
}
|
|
2631
|
+
.yjd-rich-editor .dropdown-icon { color: var(--rte-muted); }
|
|
2632
|
+
|
|
2633
|
+
/* ---------- Popovers: friendly & airy ---------- */
|
|
2634
|
+
.yjd-rich-editor .color-picker-popup,
|
|
2635
|
+
.yjd-rich-editor .custom-select-popup,
|
|
2636
|
+
.yjd-rich-editor .heading-select-popup,
|
|
2637
|
+
.yjd-rich-editor .capitalization-select-popup,
|
|
2638
|
+
.yjd-rich-editor .font-family-select-popup,
|
|
2639
|
+
.yjd-rich-editor .line-height-select-popup,
|
|
2640
|
+
.yjd-rich-editor .text-size-select-popup,
|
|
2641
|
+
.yjd-rich-editor .link-popup,
|
|
2642
|
+
.yjd-rich-editor .image-popup,
|
|
2643
|
+
.yjd-rich-editor .video-popup,
|
|
2644
|
+
.yjd-rich-editor .tag-popup,
|
|
2645
|
+
.yjd-rich-editor .import-popup,
|
|
2646
|
+
.yjd-rich-editor .table-popup,
|
|
2647
|
+
.yjd-rich-editor .text-align-picker-popup,
|
|
2648
|
+
.yjd-rich-editor .emoji-picker-popup {
|
|
2649
|
+
border-color: var(--rte-border);
|
|
2650
|
+
border-radius: var(--rte-radius-md);
|
|
2651
|
+
box-shadow: 0 10px 30px -10px rgba(20, 24, 46, 0.18), 0 2px 6px -2px rgba(20, 24, 46, 0.08);
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
/* roomier dropdown lists */
|
|
2655
|
+
.yjd-rich-editor .custom-select-popup,
|
|
2656
|
+
.yjd-rich-editor .heading-select-popup,
|
|
2657
|
+
.yjd-rich-editor .capitalization-select-popup,
|
|
2658
|
+
.yjd-rich-editor .font-family-select-popup,
|
|
2659
|
+
.yjd-rich-editor .line-height-select-popup,
|
|
2660
|
+
.yjd-rich-editor .text-size-select-popup {
|
|
2661
|
+
padding: 6px;
|
|
2662
|
+
}
|
|
2663
|
+
.yjd-rich-editor .custom-select-item-button {
|
|
2664
|
+
padding: 8px 10px;
|
|
2665
|
+
}
|
|
2666
|
+
|
|
2667
|
+
/* gentle entrance for popovers (respects reduced motion below) */
|
|
2668
|
+
.yjd-rich-editor .color-picker-popup.visible,
|
|
2669
|
+
.yjd-rich-editor .custom-select-popup.visible,
|
|
2670
|
+
.yjd-rich-editor .heading-select-popup.visible,
|
|
2671
|
+
.yjd-rich-editor .font-family-select-popup.visible,
|
|
2672
|
+
.yjd-rich-editor .line-height-select-popup.visible,
|
|
2673
|
+
.yjd-rich-editor .capitalization-select-popup.visible,
|
|
2674
|
+
.yjd-rich-editor .text-size-select-popup.visible,
|
|
2675
|
+
.yjd-rich-editor .link-popup.visible,
|
|
2676
|
+
.yjd-rich-editor .image-popup.visible,
|
|
2677
|
+
.yjd-rich-editor .video-popup.visible,
|
|
2678
|
+
.yjd-rich-editor .tag-popup.visible,
|
|
2679
|
+
.yjd-rich-editor .table-popup.visible,
|
|
2680
|
+
.yjd-rich-editor .text-align-picker-popup.visible,
|
|
2681
|
+
.yjd-rich-editor .yjd-find-replace.open {
|
|
2682
|
+
animation: rte-pop-in 90ms ease-out;
|
|
2683
|
+
}
|
|
2684
|
+
@keyframes rte-pop-in {
|
|
2685
|
+
from { opacity: 0; transform: translateY(-2px); }
|
|
2686
|
+
to { opacity: 1; transform: none; }
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2689
|
+
/* ---------- Inputs: minimal & light ---------- */
|
|
2690
|
+
.yjd-rich-editor .yjd-input,
|
|
2691
|
+
.yjd-rich-editor .yjd-select-input,
|
|
2692
|
+
.yjd-rich-editor .yjd-find-input {
|
|
2693
|
+
height: 36px;
|
|
2694
|
+
padding: 0 12px;
|
|
2695
|
+
border: 1px solid var(--rte-border);
|
|
2696
|
+
border-radius: var(--rte-radius-sm);
|
|
2697
|
+
background: var(--rte-bg);
|
|
2698
|
+
color: var(--rte-ink);
|
|
2699
|
+
font-size: 14px;
|
|
2700
|
+
}
|
|
2701
|
+
.yjd-rich-editor .yjd-input::placeholder,
|
|
2702
|
+
.yjd-rich-editor .yjd-select-input::placeholder,
|
|
2703
|
+
.yjd-rich-editor .yjd-find-input::placeholder {
|
|
2704
|
+
color: var(--rte-muted);
|
|
2705
|
+
opacity: 0.7;
|
|
2706
|
+
}
|
|
2707
|
+
.yjd-rich-editor .yjd-input:focus,
|
|
2708
|
+
.yjd-rich-editor .yjd-select-input:focus,
|
|
2709
|
+
.yjd-rich-editor .yjd-find-input:focus {
|
|
2710
|
+
border-color: var(--rte-accent);
|
|
2711
|
+
box-shadow: 0 0 0 3px var(--rte-accent-ring);
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
/* ---------- Buttons: minimal & light ---------- */
|
|
2715
|
+
.yjd-rich-editor .yjd-button-confirm,
|
|
2716
|
+
.yjd-rich-editor .yjd-button-cancel,
|
|
2717
|
+
.yjd-rich-editor .yjd-find-btn {
|
|
2718
|
+
height: 36px;
|
|
2719
|
+
padding: 0 16px;
|
|
2720
|
+
font-size: 14px;
|
|
2721
|
+
font-weight: 500;
|
|
2722
|
+
border-radius: var(--rte-radius-sm);
|
|
2723
|
+
box-shadow: none;
|
|
2724
|
+
transition: background var(--rte-t), color var(--rte-t), border-color var(--rte-t);
|
|
2725
|
+
}
|
|
2726
|
+
.yjd-rich-editor .yjd-button-confirm {
|
|
2727
|
+
background: var(--rte-accent);
|
|
2728
|
+
border: 1px solid var(--rte-accent);
|
|
2729
|
+
color: #fff;
|
|
2730
|
+
}
|
|
2731
|
+
.yjd-rich-editor .yjd-button-confirm:hover {
|
|
2732
|
+
background: var(--rte-accent-ink);
|
|
2733
|
+
border-color: var(--rte-accent-ink);
|
|
2734
|
+
}
|
|
2735
|
+
/* Cancel & secondary find buttons → quiet, text-like */
|
|
2736
|
+
.yjd-rich-editor .yjd-button-cancel {
|
|
2737
|
+
background: transparent;
|
|
2738
|
+
border: 1px solid var(--rte-border);
|
|
2739
|
+
color: var(--rte-muted);
|
|
2740
|
+
}
|
|
2741
|
+
.yjd-rich-editor .yjd-button-cancel:hover {
|
|
2742
|
+
background: var(--rte-chrome-2);
|
|
2743
|
+
color: var(--rte-ink);
|
|
2744
|
+
}
|
|
2745
|
+
.yjd-rich-editor .yjd-find-btn:not(.yjd-find-icon) {
|
|
2746
|
+
background: transparent;
|
|
2747
|
+
border: 1px solid var(--rte-border);
|
|
2748
|
+
color: var(--rte-ink);
|
|
2749
|
+
}
|
|
2750
|
+
.yjd-rich-editor .yjd-find-btn:not(.yjd-find-icon):hover {
|
|
2751
|
+
background: var(--rte-chrome-2);
|
|
2752
|
+
}
|
|
2753
|
+
.yjd-rich-editor .yjd-find-btn.yjd-find-icon {
|
|
2754
|
+
height: 32px;
|
|
2755
|
+
width: 32px;
|
|
2756
|
+
color: var(--rte-muted);
|
|
2757
|
+
background: transparent;
|
|
2758
|
+
border: 1px solid transparent;
|
|
2759
|
+
}
|
|
2760
|
+
.yjd-rich-editor .yjd-find-btn.yjd-find-icon:hover {
|
|
2761
|
+
background: var(--rte-chrome-2);
|
|
2762
|
+
color: var(--rte-ink);
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2765
|
+
/* ---------- Reduced motion ---------- */
|
|
2766
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2767
|
+
.yjd-rich-editor .color-picker-popup.visible,
|
|
2768
|
+
.yjd-rich-editor [class*="select-popup"].visible,
|
|
2769
|
+
.yjd-rich-editor [class$="-popup"].visible,
|
|
2770
|
+
.yjd-rich-editor .yjd-find-replace.open {
|
|
2771
|
+
animation: none !important;
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2775
|
+
/* =====================================================================
|
|
2776
|
+
DESIGN SYSTEM v2.2 — outline icon set rendering
|
|
2777
|
+
Icons are now stroke-based (Lucide-style). Render them as outlines and
|
|
2778
|
+
neutralise the legacy fill-based rules above.
|
|
2779
|
+
===================================================================== */
|
|
2780
|
+
.yjd-rich-editor .icon svg {
|
|
2781
|
+
width: auto !important;
|
|
2782
|
+
height: 16px !important;
|
|
2783
|
+
max-width: 20px;
|
|
2784
|
+
display: block;
|
|
2785
|
+
fill: none !important;
|
|
2786
|
+
stroke: currentColor;
|
|
2787
|
+
stroke-width: 2;
|
|
2788
|
+
stroke-linecap: round;
|
|
2789
|
+
stroke-linejoin: round;
|
|
2790
|
+
overflow: visible;
|
|
2791
|
+
}
|
|
2792
|
+
/* outline paths never fill */
|
|
2793
|
+
.yjd-rich-editor .icon svg path,
|
|
2794
|
+
.yjd-rich-editor .icon svg line,
|
|
2795
|
+
.yjd-rich-editor .icon svg polyline,
|
|
2796
|
+
.yjd-rich-editor .icon svg rect {
|
|
2797
|
+
fill: none !important;
|
|
2798
|
+
stroke: currentColor;
|
|
2799
|
+
}
|
|
2800
|
+
/* solid accents (dots) keep their fill, no stroke */
|
|
2801
|
+
.yjd-rich-editor .icon svg [fill="currentColor"] {
|
|
2802
|
+
fill: currentColor !important;
|
|
2803
|
+
stroke: none !important;
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2806
|
+
/* quiet default colour, accent on active */
|
|
2807
|
+
.yjd-rich-editor .rich-editor-toolbar-btn .icon svg { color: #565b6b; }
|
|
2808
|
+
.yjd-rich-editor .rich-editor-toolbar-btn:hover .icon svg { color: var(--rte-ink); }
|
|
2809
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg,
|
|
2810
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg path,
|
|
2811
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg line,
|
|
2812
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg polyline,
|
|
2813
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg rect {
|
|
2814
|
+
color: var(--rte-accent-ink) !important;
|
|
2815
|
+
stroke: var(--rte-accent-ink) !important;
|
|
2816
|
+
fill: none !important;
|
|
2817
|
+
}
|
|
2818
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.active .icon svg [fill="currentColor"] {
|
|
2819
|
+
fill: var(--rte-accent-ink) !important;
|
|
2820
|
+
stroke: none !important;
|
|
2821
|
+
}
|
|
2822
|
+
.yjd-rich-editor .block-toolbar-btn.active .icon svg,
|
|
2823
|
+
.yjd-rich-editor .block-toolbar-btn.active .icon svg path {
|
|
2824
|
+
stroke: var(--rte-accent-ink) !important;
|
|
2825
|
+
fill: none !important;
|
|
2826
|
+
}
|
|
2827
|
+
|
|
2828
|
+
/* =====================================================================
|
|
2829
|
+
DESIGN SYSTEM v2.4 — sync the list-picker popover with the others
|
|
2830
|
+
===================================================================== */
|
|
2831
|
+
.yjd-rich-editor .list-picker-popup {
|
|
2832
|
+
background: var(--rte-bg);
|
|
2833
|
+
border: 1px solid var(--rte-border);
|
|
2834
|
+
border-radius: var(--rte-radius-md);
|
|
2835
|
+
box-shadow: var(--rte-shadow);
|
|
2836
|
+
padding: 6px;
|
|
2837
|
+
}
|
|
2838
|
+
.yjd-rich-editor .list-picker-popup.visible {
|
|
2839
|
+
animation: rte-pop-in 90ms ease-out;
|
|
2840
|
+
}
|
|
2841
|
+
.yjd-rich-editor .list-button-container {
|
|
2842
|
+
display: flex;
|
|
2843
|
+
align-items: center;
|
|
2844
|
+
gap: 2px;
|
|
2845
|
+
}
|
|
2846
|
+
.yjd-rich-editor .list-button {
|
|
2847
|
+
display: inline-flex;
|
|
2848
|
+
align-items: center;
|
|
2849
|
+
justify-content: center;
|
|
2850
|
+
width: 34px;
|
|
2851
|
+
height: 32px;
|
|
2852
|
+
padding: 0;
|
|
2853
|
+
border: 1px solid transparent;
|
|
2854
|
+
border-radius: var(--rte-radius-sm);
|
|
2855
|
+
background: transparent;
|
|
2856
|
+
color: #565b6b;
|
|
2857
|
+
cursor: pointer;
|
|
2858
|
+
transition: background var(--rte-t), color var(--rte-t);
|
|
2859
|
+
}
|
|
2860
|
+
.yjd-rich-editor .list-button:hover {
|
|
2861
|
+
background: var(--rte-chrome-2);
|
|
2862
|
+
color: var(--rte-ink);
|
|
2863
|
+
}
|
|
2864
|
+
.yjd-rich-editor .list-button.active {
|
|
2865
|
+
background: var(--rte-accent-weak);
|
|
2866
|
+
color: var(--rte-accent-ink);
|
|
2867
|
+
}
|
|
2868
|
+
.yjd-rich-editor .list-button svg {
|
|
2869
|
+
width: auto !important;
|
|
2870
|
+
height: 16px !important;
|
|
2871
|
+
max-width: 20px;
|
|
2872
|
+
fill: none !important;
|
|
2873
|
+
stroke: currentColor;
|
|
2874
|
+
stroke-width: 2;
|
|
2875
|
+
stroke-linecap: round;
|
|
2876
|
+
stroke-linejoin: round;
|
|
2877
|
+
}
|
|
2878
|
+
.yjd-rich-editor .list-button svg [fill="currentColor"] {
|
|
2879
|
+
fill: currentColor !important;
|
|
2880
|
+
stroke: none !important;
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
/* =====================================================================
|
|
2884
|
+
DESIGN SYSTEM v2.5 — table-toolbar icons
|
|
2885
|
+
These buttons inject the SVG directly (no .icon wrapper), so size/stroke
|
|
2886
|
+
them here too. Outline icons only carry a viewBox, so without this the SVG
|
|
2887
|
+
blows up to its default size and gets clipped (icons appeared "missing").
|
|
2888
|
+
===================================================================== */
|
|
2889
|
+
.yjd-rich-editor .table-toolbar-btn svg {
|
|
2890
|
+
width: auto !important;
|
|
2891
|
+
height: 16px !important;
|
|
2892
|
+
max-width: 20px;
|
|
2893
|
+
display: block;
|
|
2894
|
+
fill: none !important;
|
|
2895
|
+
stroke: currentColor;
|
|
2896
|
+
stroke-width: 2;
|
|
2897
|
+
stroke-linecap: round;
|
|
2898
|
+
stroke-linejoin: round;
|
|
2899
|
+
}
|
|
2900
|
+
.yjd-rich-editor .table-toolbar-btn svg [fill="currentColor"] {
|
|
2901
|
+
fill: currentColor !important;
|
|
2902
|
+
stroke: none !important;
|
|
2903
|
+
}
|
|
2904
|
+
.yjd-rich-editor .table-toolbar-btn { color: #565b6b; }
|
|
2905
|
+
.yjd-rich-editor .table-toolbar-btn:hover { color: var(--rte-ink); }
|
|
2906
|
+
|
|
2907
|
+
/* =====================================================================
|
|
2908
|
+
DESIGN SYSTEM v2.6 — final popover consistency pass
|
|
2909
|
+
===================================================================== */
|
|
2910
|
+
/* Text-align picker items: match the other dropdown lists */
|
|
2911
|
+
.yjd-rich-editor .align-button {
|
|
2912
|
+
height: auto;
|
|
2913
|
+
min-height: 32px;
|
|
2914
|
+
padding: 6px 10px;
|
|
2915
|
+
gap: 8px;
|
|
2916
|
+
border-radius: var(--rte-radius-sm);
|
|
2917
|
+
background: transparent;
|
|
2918
|
+
color: var(--rte-ink);
|
|
2919
|
+
transition: background var(--rte-t), color var(--rte-t);
|
|
2920
|
+
}
|
|
2921
|
+
.yjd-rich-editor .align-button:hover {
|
|
2922
|
+
background: var(--rte-chrome-2);
|
|
2923
|
+
border-color: transparent;
|
|
2924
|
+
}
|
|
2925
|
+
.yjd-rich-editor .align-button.active {
|
|
2926
|
+
background: var(--rte-accent-weak);
|
|
2927
|
+
color: var(--rte-accent-ink);
|
|
2928
|
+
border-color: transparent;
|
|
2929
|
+
}
|
|
2930
|
+
.yjd-rich-editor .align-button svg {
|
|
2931
|
+
width: auto !important;
|
|
2932
|
+
height: 16px !important;
|
|
2933
|
+
color: inherit;
|
|
2934
|
+
fill: none !important;
|
|
2935
|
+
stroke: currentColor;
|
|
2936
|
+
stroke-width: 2;
|
|
2937
|
+
stroke-linecap: round;
|
|
2938
|
+
stroke-linejoin: round;
|
|
2939
|
+
}
|
|
2940
|
+
.yjd-rich-editor .align-button.active svg { color: var(--rte-accent-ink); }
|
|
2941
|
+
|
|
2942
|
+
/* Upload affordance icon (outline) → accent, matches the dashed accent button */
|
|
2943
|
+
.yjd-rich-editor .yjd-custom-upload-button svg {
|
|
2944
|
+
width: 17px;
|
|
2945
|
+
height: 17px;
|
|
2946
|
+
fill: none;
|
|
2947
|
+
stroke: var(--rte-accent-ink);
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
/* keep align-picker labels on one line */
|
|
2951
|
+
.yjd-rich-editor .text-align-picker-popup { min-width: 168px; }
|
|
2952
|
+
.yjd-rich-editor .align-button { white-space: nowrap; }
|
|
2953
|
+
.yjd-rich-editor .align-button .label-text { white-space: nowrap; }
|
|
2954
|
+
|
|
2955
|
+
/* =====================================================================
|
|
2956
|
+
DESIGN SYSTEM v2.7 — responsive toolbar (no wrapping; overflow -> "more")
|
|
2957
|
+
===================================================================== */
|
|
2958
|
+
.yjd-rich-editor .rich-editor-toolbar-1 {
|
|
2959
|
+
flex-wrap: nowrap !important;
|
|
2960
|
+
overflow: hidden;
|
|
2961
|
+
}
|
|
2962
|
+
.yjd-rich-editor .rich-editor-toolbar-2 {
|
|
2963
|
+
flex-wrap: wrap;
|
|
2964
|
+
border-top: 1px solid var(--rte-border);
|
|
2965
|
+
}
|
|
2966
|
+
.yjd-rich-editor .toolbar-group,
|
|
2967
|
+
.yjd-rich-editor .rich-editor-toolbar-btn,
|
|
2968
|
+
.yjd-rich-editor .custom-select-button {
|
|
2969
|
+
flex: 0 0 auto;
|
|
2970
|
+
}
|
|
2971
|
+
.yjd-rich-editor .rich-editor-toolbar-1 .more-btn {
|
|
2972
|
+
margin-left: 12px;
|
|
2973
|
+
}
|
|
2974
|
+
|
|
2975
|
+
/* =====================================================================
|
|
2976
|
+
DESIGN SYSTEM v2.8 — remove the triangle pointer on floating toolbars
|
|
2977
|
+
===================================================================== */
|
|
2978
|
+
.yjd-rich-editor .block-toolbar-arrow,
|
|
2979
|
+
.yjd-rich-editor .table-toolbar-arrow {
|
|
2980
|
+
display: none !important;
|
|
2981
|
+
}
|
|
2982
|
+
|
|
2983
|
+
/* =====================================================================
|
|
2984
|
+
DESIGN SYSTEM v2.9 — slash command menu (rendered on <body>, so unscoped)
|
|
2985
|
+
===================================================================== */
|
|
2986
|
+
.yjd-slash-menu {
|
|
2987
|
+
position: absolute;
|
|
2988
|
+
z-index: 2000;
|
|
2989
|
+
min-width: 264px;
|
|
2990
|
+
max-width: 320px;
|
|
2991
|
+
max-height: 320px;
|
|
2992
|
+
overflow-y: auto;
|
|
2993
|
+
padding: 6px;
|
|
2994
|
+
background: #ffffff;
|
|
2995
|
+
border: 1px solid #e9e9f1;
|
|
2996
|
+
border-radius: 12px;
|
|
2997
|
+
box-shadow: 0 12px 32px -8px rgba(20, 24, 46, 0.20), 0 4px 10px -4px rgba(20, 24, 46, 0.10);
|
|
2998
|
+
font: 14px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
2999
|
+
animation: yjd-slash-in 90ms ease-out;
|
|
3000
|
+
}
|
|
3001
|
+
@keyframes yjd-slash-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
|
|
3002
|
+
.yjd-slash-item {
|
|
3003
|
+
display: flex;
|
|
3004
|
+
align-items: center;
|
|
3005
|
+
gap: 10px;
|
|
3006
|
+
width: 100%;
|
|
3007
|
+
padding: 8px 10px;
|
|
3008
|
+
border: none;
|
|
3009
|
+
background: transparent;
|
|
3010
|
+
border-radius: 8px;
|
|
3011
|
+
cursor: pointer;
|
|
3012
|
+
text-align: left;
|
|
3013
|
+
color: #20242f;
|
|
3014
|
+
}
|
|
3015
|
+
.yjd-slash-item:hover,
|
|
3016
|
+
.yjd-slash-item.active { background: #efedff; color: #5a48ee; }
|
|
3017
|
+
.yjd-slash-icon {
|
|
3018
|
+
display: inline-flex;
|
|
3019
|
+
align-items: center;
|
|
3020
|
+
justify-content: center;
|
|
3021
|
+
width: 28px;
|
|
3022
|
+
height: 28px;
|
|
3023
|
+
flex: 0 0 auto;
|
|
3024
|
+
border-radius: 7px;
|
|
3025
|
+
background: #f2f2f7;
|
|
3026
|
+
color: inherit;
|
|
3027
|
+
}
|
|
3028
|
+
.yjd-slash-item.active .yjd-slash-icon { background: #ffffff; }
|
|
3029
|
+
.yjd-slash-icon svg {
|
|
3030
|
+
width: auto;
|
|
3031
|
+
height: 16px;
|
|
3032
|
+
fill: none;
|
|
3033
|
+
stroke: currentColor;
|
|
3034
|
+
stroke-width: 2;
|
|
3035
|
+
stroke-linecap: round;
|
|
3036
|
+
stroke-linejoin: round;
|
|
3037
|
+
}
|
|
3038
|
+
.yjd-slash-icon svg [fill="currentColor"] { fill: currentColor; stroke: none; }
|
|
3039
|
+
.yjd-slash-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
|
|
3040
|
+
.yjd-slash-label { font-weight: 500; }
|
|
3041
|
+
.yjd-slash-hint { font-size: 12px; color: #767c8e; }
|
|
3042
|
+
.yjd-slash-item.active .yjd-slash-hint { color: #8b7ff0; }
|
|
3043
|
+
@media (prefers-reduced-motion: reduce) { .yjd-slash-menu { animation: none; } }
|
|
3044
|
+
|
|
3045
|
+
/* ── Colour button swatch (v2.10) ─────────────────────────────────────────
|
|
3046
|
+
The text-colour and background-colour buttons carry a small bar that
|
|
3047
|
+
reflects the colour currently applied at the caret. */
|
|
3048
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.color-btn,
|
|
3049
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.background-btn {
|
|
3050
|
+
position: relative;
|
|
3051
|
+
}
|
|
3052
|
+
.yjd-rich-editor .rich-editor-toolbar-btn .rte-swatch {
|
|
3053
|
+
position: absolute;
|
|
3054
|
+
left: 50%;
|
|
3055
|
+
bottom: 5px;
|
|
3056
|
+
transform: translateX(-50%);
|
|
3057
|
+
width: 16px;
|
|
3058
|
+
height: 3px;
|
|
3059
|
+
border-radius: 2px;
|
|
3060
|
+
background: var(--rte-ink, #20242f);
|
|
3061
|
+
pointer-events: none;
|
|
3062
|
+
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
|
|
3063
|
+
}
|
|
3064
|
+
/* Background swatch defaults to a "no fill" look until a colour is chosen. */
|
|
3065
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.background-btn .rte-swatch {
|
|
3066
|
+
background: transparent;
|
|
3067
|
+
box-shadow: inset 0 0 0 1px var(--rte-border, #e9e9f1);
|
|
3068
|
+
}
|
|
3069
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.background-btn.has-color .rte-swatch {
|
|
3070
|
+
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
|
|
3071
|
+
}
|
|
3072
|
+
/* Nudge the icon up slightly so the swatch bar has room. */
|
|
3073
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.color-btn .icon,
|
|
3074
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.background-btn .icon {
|
|
3075
|
+
transform: translateY(-1px);
|
|
3076
|
+
}
|
|
3077
|
+
|
|
3078
|
+
/* ── Inline link popup (v2.11) ────────────────────────────────────────────
|
|
3079
|
+
Compact link input anchored right at the selected text. */
|
|
3080
|
+
.yjd-rich-editor .link-popup.link-popup--inline {
|
|
3081
|
+
width: auto;
|
|
3082
|
+
min-width: 320px;
|
|
3083
|
+
max-width: min(92vw, 420px);
|
|
3084
|
+
padding: 10px;
|
|
3085
|
+
}
|
|
3086
|
+
.yjd-rich-editor .link-popup--inline .link-popup-content {
|
|
3087
|
+
display: flex;
|
|
3088
|
+
flex-direction: column;
|
|
3089
|
+
gap: 8px;
|
|
3090
|
+
}
|
|
3091
|
+
.yjd-rich-editor .link-popup--inline .link-popup-row {
|
|
3092
|
+
display: flex;
|
|
3093
|
+
align-items: center;
|
|
3094
|
+
gap: 8px;
|
|
3095
|
+
}
|
|
3096
|
+
.yjd-rich-editor .link-popup--inline .link-popup-row .yjd-input {
|
|
3097
|
+
flex: 1;
|
|
3098
|
+
min-width: 0;
|
|
3099
|
+
margin: 0;
|
|
3100
|
+
}
|
|
3101
|
+
.yjd-rich-editor .link-popup--inline .link-popup-apply {
|
|
3102
|
+
flex: 0 0 auto;
|
|
3103
|
+
white-space: nowrap;
|
|
3104
|
+
padding: 8px 16px;
|
|
3105
|
+
margin: 0;
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
/* ── Inputs, selects & options — design polish (v2.12) ────────────────────── */
|
|
3109
|
+
|
|
3110
|
+
/* Uniform, comfortable dropdown option rows (Heading / Font / Size / …). */
|
|
3111
|
+
.yjd-rich-editor .custom-select-item-button {
|
|
3112
|
+
min-height: 34px;
|
|
3113
|
+
padding: 6px 10px !important;
|
|
3114
|
+
gap: 10px;
|
|
3115
|
+
border-radius: var(--rte-radius-sm) !important;
|
|
3116
|
+
}
|
|
3117
|
+
.yjd-rich-editor .custom-select-item-button:hover {
|
|
3118
|
+
background: var(--rte-accent-weak) !important;
|
|
3119
|
+
color: var(--rte-accent-ink) !important;
|
|
3120
|
+
}
|
|
3121
|
+
.yjd-rich-editor .custom-select-item-button.current {
|
|
3122
|
+
background: var(--rte-accent-weak) !important;
|
|
3123
|
+
color: var(--rte-accent-ink) !important;
|
|
3124
|
+
font-weight: 600;
|
|
3125
|
+
}
|
|
3126
|
+
/* Keep the size previews from breaking the row rhythm. */
|
|
3127
|
+
.yjd-rich-editor .heading-select-popup .custom-select-item-button,
|
|
3128
|
+
.yjd-rich-editor .font-family-select-popup .custom-select-item-button,
|
|
3129
|
+
.yjd-rich-editor .text-size-select-popup .custom-select-item-button {
|
|
3130
|
+
line-height: 1.15;
|
|
3131
|
+
}
|
|
3132
|
+
|
|
3133
|
+
/* Native <select> — make it look like the themed inputs, with a custom chevron
|
|
3134
|
+
(the OS-default control was the loudest mismatch among the popups). */
|
|
3135
|
+
.yjd-rich-editor select,
|
|
3136
|
+
.yjd-rich-editor .yjd-select-input,
|
|
3137
|
+
.yjd-rich-editor .tag-type-select,
|
|
3138
|
+
.yjd-rich-editor .import-type-select {
|
|
3139
|
+
-webkit-appearance: none;
|
|
3140
|
+
-moz-appearance: none;
|
|
3141
|
+
appearance: none;
|
|
3142
|
+
width: 100%;
|
|
3143
|
+
box-sizing: border-box;
|
|
3144
|
+
padding: 10px 36px 10px 12px;
|
|
3145
|
+
font: 500 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
3146
|
+
color: var(--rte-ink);
|
|
3147
|
+
background-color: var(--rte-bg);
|
|
3148
|
+
background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23767c8e'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m6%209%206%206%206-6'/%3E%3C/svg%3E");
|
|
3149
|
+
background-repeat: no-repeat;
|
|
3150
|
+
background-position: right 12px center;
|
|
3151
|
+
background-size: 16px;
|
|
3152
|
+
border: 1px solid var(--rte-border-strong);
|
|
3153
|
+
border-radius: var(--rte-radius-sm);
|
|
3154
|
+
cursor: pointer;
|
|
3155
|
+
transition: border-color var(--rte-t), box-shadow var(--rte-t);
|
|
3156
|
+
}
|
|
3157
|
+
.yjd-rich-editor select:hover,
|
|
3158
|
+
.yjd-rich-editor .yjd-select-input:hover,
|
|
3159
|
+
.yjd-rich-editor .tag-type-select:hover,
|
|
3160
|
+
.yjd-rich-editor .import-type-select:hover {
|
|
3161
|
+
border-color: var(--rte-accent);
|
|
3162
|
+
}
|
|
3163
|
+
.yjd-rich-editor select:focus,
|
|
3164
|
+
.yjd-rich-editor .yjd-select-input:focus,
|
|
3165
|
+
.yjd-rich-editor .tag-type-select:focus,
|
|
3166
|
+
.yjd-rich-editor .import-type-select:focus {
|
|
3167
|
+
outline: none;
|
|
3168
|
+
border-color: var(--rte-accent);
|
|
3169
|
+
box-shadow: 0 0 0 3px var(--rte-accent-ring);
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3172
|
+
/* Consistent text-input metrics across every popup. */
|
|
3173
|
+
.yjd-rich-editor .yjd-input,
|
|
3174
|
+
.yjd-rich-editor .yjd-find-input {
|
|
3175
|
+
box-sizing: border-box;
|
|
3176
|
+
padding: 10px 12px;
|
|
3177
|
+
font-size: 14px;
|
|
3178
|
+
line-height: 1.4;
|
|
3179
|
+
}
|
|
3180
|
+
|
|
3181
|
+
/* Table size picker — accent (not grey) on hover, matching the highlight. */
|
|
3182
|
+
.yjd-rich-editor .table-grid-cell:hover {
|
|
3183
|
+
background: var(--rte-accent-weak) !important;
|
|
3184
|
+
border-color: var(--rte-accent) !important;
|
|
3185
|
+
}
|
|
3186
|
+
|
|
3187
|
+
/* ── Toolbar layout (v2.13) ───────────────────────────────────────────────
|
|
3188
|
+
Keep icon groups packed tight on the left and push only "More" to the right
|
|
3189
|
+
edge. This uses the full bar width (More is flush right) WITHOUT scattering
|
|
3190
|
+
big gaps between every group — which looked empty on mobile / narrow bars. */
|
|
3191
|
+
.yjd-rich-editor .rich-editor-toolbar-1 {
|
|
3192
|
+
justify-content: flex-start !important;
|
|
3193
|
+
}
|
|
3194
|
+
.yjd-rich-editor .rich-editor-toolbar-1 .more-btn {
|
|
3195
|
+
margin-left: auto !important;
|
|
3196
|
+
}
|
|
3197
|
+
|
|
3198
|
+
/* ── Mobile toolbar: one horizontal-scroll row (v2.14) ────────────────────
|
|
3199
|
+
Instead of wrapping every tool into a cramped multi-row "More" panel, mobile
|
|
3200
|
+
shows a single row you swipe sideways — the pattern used by Google Docs,
|
|
3201
|
+
Notion, etc. (The reflow JS keeps all groups in row 1 at this width.) */
|
|
3202
|
+
@media (max-width: 640px) {
|
|
3203
|
+
.yjd-rich-editor .rich-editor-toolbar-1 {
|
|
3204
|
+
flex-wrap: nowrap !important;
|
|
3205
|
+
overflow-x: auto !important;
|
|
3206
|
+
overflow-y: hidden;
|
|
3207
|
+
-webkit-overflow-scrolling: touch;
|
|
3208
|
+
scrollbar-width: none; /* Firefox */
|
|
3209
|
+
justify-content: flex-start !important;
|
|
3210
|
+
padding: 6px 8px;
|
|
3211
|
+
scroll-padding: 8px;
|
|
3212
|
+
}
|
|
3213
|
+
.yjd-rich-editor .rich-editor-toolbar-1::-webkit-scrollbar {
|
|
3214
|
+
display: none; /* WebKit/Blink */
|
|
3215
|
+
}
|
|
3216
|
+
/* The overflow row + "More" button aren't used on mobile. */
|
|
3217
|
+
.yjd-rich-editor .rich-editor-toolbar-2,
|
|
3218
|
+
.yjd-rich-editor .rich-editor-toolbar-1 .more-btn {
|
|
3219
|
+
display: none !important;
|
|
3220
|
+
}
|
|
3221
|
+
/* Keep every group/button on one line and let the row scroll. */
|
|
3222
|
+
.yjd-rich-editor .toolbar-group {
|
|
3223
|
+
flex: 0 0 auto;
|
|
3224
|
+
}
|
|
3225
|
+
.yjd-rich-editor .toolbar-group + .toolbar-group {
|
|
3226
|
+
margin-left: 8px;
|
|
3227
|
+
}
|
|
3228
|
+
.yjd-rich-editor .rich-editor-toolbar-btn,
|
|
3229
|
+
.yjd-rich-editor .custom-select-button {
|
|
3230
|
+
min-width: 32px;
|
|
3231
|
+
height: 32px;
|
|
3232
|
+
padding: 0 8px;
|
|
3233
|
+
flex: 0 0 auto;
|
|
3234
|
+
}
|
|
3235
|
+
/* Selects keep their label readable (no truncation) — the row scrolls. */
|
|
3236
|
+
.yjd-rich-editor .custom-select-button {
|
|
3237
|
+
max-width: none;
|
|
3238
|
+
}
|
|
3239
|
+
}
|
|
3240
|
+
|
|
3241
|
+
/* Toolbar buttons hidden until usable (e.g. undo/redo before any history). */
|
|
3242
|
+
.yjd-rich-editor .rich-editor-toolbar-btn.rte-hidden { display: none !important; }
|
|
3243
|
+
|
|
3244
|
+
/* ── First/last block margin reset (v2.15) ────────────────────────────────
|
|
3245
|
+
The first block must sit exactly at the content origin (top padding) so the
|
|
3246
|
+
caret/text aligns with the placeholder — on mobile, `p { margin: .8em 0 }`
|
|
3247
|
+
was pushing the first line ~13px below the placeholder. */
|
|
3248
|
+
.yjd-rich-editor .rich-editor-area > :first-child { margin-top: 0 !important; }
|
|
3249
|
+
.yjd-rich-editor .rich-editor-area > :last-child { margin-bottom: 0 !important; }
|
|
3250
|
+
|
|
3251
|
+
/* ── Align picker: icon-only, compact row (v2.16) ─────────────────────────
|
|
3252
|
+
Labels removed (tooltip carries the name) → lay the 4 alignment icons out
|
|
3253
|
+
as a tight horizontal row of square buttons instead of wide list rows. */
|
|
3254
|
+
.yjd-rich-editor .align-button-container {
|
|
3255
|
+
flex-direction: row !important;
|
|
3256
|
+
width: auto !important;
|
|
3257
|
+
height: auto !important;
|
|
3258
|
+
gap: 4px;
|
|
3259
|
+
}
|
|
3260
|
+
.yjd-rich-editor .align-button {
|
|
3261
|
+
width: 34px !important;
|
|
3262
|
+
min-height: 34px !important;
|
|
3263
|
+
height: 34px !important;
|
|
3264
|
+
padding: 0 !important;
|
|
3265
|
+
gap: 0 !important;
|
|
3266
|
+
justify-content: center !important;
|
|
3267
|
+
}
|
|
3268
|
+
.yjd-rich-editor .text-align-picker-popup {
|
|
3269
|
+
width: auto !important;
|
|
3270
|
+
}
|
|
3271
|
+
|
|
3272
|
+
/* ── "More" overflow = one extra row, not a crammed wrap (v2.17) ───────────
|
|
3273
|
+
The secondary toolbar stays hidden until "More" is pressed; when shown it's
|
|
3274
|
+
a single tidy row (scrolls sideways if it ever exceeds the width) instead of
|
|
3275
|
+
wrapping its groups into several stacked rows. */
|
|
3276
|
+
.yjd-rich-editor .rich-editor-toolbar-2 {
|
|
3277
|
+
flex-wrap: nowrap !important;
|
|
3278
|
+
overflow-x: auto;
|
|
3279
|
+
overflow-y: hidden;
|
|
3280
|
+
-webkit-overflow-scrolling: touch;
|
|
3281
|
+
scrollbar-width: none;
|
|
3282
|
+
}
|
|
3283
|
+
.yjd-rich-editor .rich-editor-toolbar-2::-webkit-scrollbar { display: none; }
|
|
3284
|
+
.yjd-rich-editor .rich-editor-toolbar-2 .toolbar-group { flex: 0 0 auto; }
|
|
3285
|
+
|
|
3286
|
+
/* ── Labelled selects (v2.18) ─────────────────────────────────────────────
|
|
3287
|
+
A small header at the top of each dropdown + a leading icon on the trigger,
|
|
3288
|
+
so it's clear what Paragraph / Font / Size / Line-height / Case control. */
|
|
3289
|
+
.yjd-rich-editor .custom-select-header {
|
|
3290
|
+
padding: 8px 12px 6px;
|
|
3291
|
+
font-size: 11px;
|
|
3292
|
+
font-weight: 600;
|
|
3293
|
+
letter-spacing: 0.05em;
|
|
3294
|
+
text-transform: uppercase;
|
|
3295
|
+
color: var(--rte-muted);
|
|
3296
|
+
border-bottom: 1px solid var(--rte-border);
|
|
3297
|
+
margin-bottom: 4px;
|
|
3298
|
+
white-space: nowrap;
|
|
3299
|
+
}
|
|
3300
|
+
.yjd-rich-editor .custom-select-button .select-lead-icon {
|
|
3301
|
+
width: 16px;
|
|
3302
|
+
height: 16px;
|
|
3303
|
+
flex: 0 0 auto;
|
|
3304
|
+
display: inline-flex;
|
|
3305
|
+
align-items: center;
|
|
3306
|
+
justify-content: center;
|
|
3307
|
+
color: var(--rte-muted);
|
|
3308
|
+
margin-right: 4px;
|
|
3309
|
+
}
|
|
3310
|
+
.yjd-rich-editor .custom-select-button .select-lead-icon svg {
|
|
3311
|
+
width: 16px;
|
|
3312
|
+
height: 16px;
|
|
3313
|
+
display: block;
|
|
3314
|
+
stroke: currentColor;
|
|
3315
|
+
fill: none;
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3318
|
+
|
|
3319
|
+
/* ── Select trigger: keep value on one line (v2.20) ───────────────────────
|
|
3320
|
+
Long values (e.g. "Times New Roman") must not wrap to a 2nd line and break
|
|
3321
|
+
the button height — clamp to one line with an ellipsis; icon + chevron stay. */
|
|
3322
|
+
.yjd-rich-editor .custom-select-button {
|
|
3323
|
+
white-space: nowrap;
|
|
3324
|
+
overflow: hidden;
|
|
3325
|
+
}
|
|
3326
|
+
.yjd-rich-editor .custom-select-button .button-text {
|
|
3327
|
+
flex: 1 1 auto;
|
|
3328
|
+
min-width: 0;
|
|
3329
|
+
white-space: nowrap;
|
|
3330
|
+
overflow: hidden;
|
|
3331
|
+
text-overflow: ellipsis;
|
|
3332
|
+
}
|
|
3333
|
+
.yjd-rich-editor .custom-select-button .select-lead-icon,
|
|
3334
|
+
.yjd-rich-editor .custom-select-button .dropdown-icon {
|
|
3335
|
+
flex: 0 0 auto;
|
|
3336
|
+
}
|
|
3337
|
+
|
|
3338
|
+
/* ── Align popover: match the other popovers (v2.21) ───────────────────────
|
|
3339
|
+
It had asymmetric padding (bottom 0) + a one-off radius, so it looked out of
|
|
3340
|
+
sync. Use the shared shell's symmetric padding + token radius. */
|
|
3341
|
+
.yjd-rich-editor .text-align-picker-popup {
|
|
3342
|
+
padding: 6px !important;
|
|
3343
|
+
border-radius: var(--rte-radius-md) !important;
|
|
3344
|
+
}
|
|
3345
|
+
.yjd-rich-editor .align-button-container {
|
|
3346
|
+
padding: 0 !important;
|
|
3347
|
+
}
|
|
3348
|
+
|
|
3349
|
+
/* ── A11y: statusbar text contrast (v2.22) ────────────────────────────────
|
|
3350
|
+
--rte-muted (#767c8e) on the near-white statusbar was only 4.02:1; darken
|
|
3351
|
+
the breadcrumb + word-count to meet WCAG AA (>=4.5:1). */
|
|
3352
|
+
.yjd-rich-editor .rich-editor-breadcrumb,
|
|
3353
|
+
.yjd-rich-editor .wordcount {
|
|
3354
|
+
color: #5b6373;
|
|
3355
|
+
}
|
|
3356
|
+
|
|
3357
|
+
/* ── Find & Replace: icon buttons (v2.23) ─────────────────────────────────
|
|
3358
|
+
Center the SVG icons (prev/next/close) in the square nav buttons. */
|
|
3359
|
+
.yjd-rich-editor .yjd-find-btn {
|
|
3360
|
+
display: inline-flex;
|
|
3361
|
+
align-items: center;
|
|
3362
|
+
justify-content: center;
|
|
3363
|
+
}
|
|
3364
|
+
.yjd-rich-editor .yjd-find-icon .icon,
|
|
3365
|
+
.yjd-rich-editor .yjd-find-icon .icon svg {
|
|
3366
|
+
width: 16px;
|
|
3367
|
+
height: 16px;
|
|
3368
|
+
display: block;
|
|
3369
|
+
}
|
|
3370
|
+
.yjd-rich-editor .yjd-find-icon .icon svg {
|
|
3371
|
+
stroke: currentColor;
|
|
3372
|
+
fill: none;
|
|
3373
|
+
}
|