@richscripts/richtexteditor 2.4.1 → 2.5.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.
@@ -283,7 +283,13 @@ rte-codebox {
283
283
  previously hardcoded #d5d5d5 stayed light-gray on the dark surface. */
284
284
  border: 1px solid var(--rte-border, #d5d5d5);
285
285
  border-radius: 10px;
286
- overflow: hidden;
286
+ /* Deliberately NOT overflow:hidden. Toolbar dropdown panels
287
+ (rte-dropdown-panel) are absolutely positioned children of this element,
288
+ so clipping here cut off any panel anchored near the right edge: Line
289
+ Height rendered only the "1" of "100%", Paragraphs and Document Outline
290
+ lost 91px. Corner rounding does not depend on this clip - the toolbar and
291
+ status bar round their own corners (see the rule below). */
292
+ overflow: visible;
287
293
  background-clip: padding-box;
288
294
  }
289
295
 
@@ -1429,7 +1435,12 @@ rte-dropdown-panel.rte-panel-insertimage rte-tabui-toolbar, rte-dropdown-panel.r
1429
1435
  }
1430
1436
 
1431
1437
  .rte-panel-general rte-dialog-header {
1432
- margin: -10px -15px 10px;
1438
+ /* Cancel exactly the panel's own padding, whatever it is. A hard -15px
1439
+ here made the header wider than the panel that contains it. */
1440
+ margin: calc(var(--rte-panel-pad, 8px) * -1) calc(var(--rte-panel-pad, 8px) * -1) 10px;
1441
+ padding: 12px 14px;
1442
+ border-top-left-radius: inherit;
1443
+ border-top-right-radius: inherit;
1433
1444
  }
1434
1445
 
1435
1446
  rte-inserttable-panel {
@@ -1570,14 +1581,14 @@ rte-dropdown-panel.rte-panel-backcolor rte-dialog-item-color[rte-tooltip]:hover
1570
1581
  border-color: rgba(0,0,0,.08) !important;
1571
1582
  }
1572
1583
 
1573
- rte-dropdown-panel.rte-panel-forecolor rte-dialog-item-color[role="menuitem"]:focus-visible,
1574
- rte-dropdown-panel.rte-panel-backcolor rte-dialog-item-color[role="menuitem"]:focus-visible {
1575
- outline: 2px solid #1a73e8 !important;
1576
- outline-offset: 2px !important;
1577
- transform: scale(1.15) !important;
1578
- position: relative !important;
1579
- z-index: 2 !important;
1580
- }
1584
+ rte-dropdown-panel.rte-panel-forecolor rte-dialog-item-color[role="menuitem"]:focus-visible,
1585
+ rte-dropdown-panel.rte-panel-backcolor rte-dialog-item-color[role="menuitem"]:focus-visible {
1586
+ outline: 2px solid #1a73e8 !important;
1587
+ outline-offset: 2px !important;
1588
+ transform: scale(1.15) !important;
1589
+ position: relative !important;
1590
+ z-index: 2 !important;
1591
+ }
1581
1592
  rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-auto,
1582
1593
  rte-dropdown-panel.rte-panel-backcolor rte-dialog-line-auto,
1583
1594
  rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-more,
@@ -1599,14 +1610,14 @@ rte-dropdown-panel.rte-panel-backcolor rte-dialog-line-more:hover {
1599
1610
  border: 0 !important;
1600
1611
  }
1601
1612
 
1602
- rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-auto:focus-visible,
1603
- rte-dropdown-panel.rte-panel-backcolor rte-dialog-line-auto:focus-visible,
1604
- rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-more:focus-visible,
1605
- rte-dropdown-panel.rte-panel-backcolor rte-dialog-line-more:focus-visible {
1606
- outline: 2px solid #1a73e8 !important;
1607
- outline-offset: 1px !important;
1608
- background: #f1f5f9 !important;
1609
- }
1613
+ rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-auto:focus-visible,
1614
+ rte-dropdown-panel.rte-panel-backcolor rte-dialog-line-auto:focus-visible,
1615
+ rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-more:focus-visible,
1616
+ rte-dropdown-panel.rte-panel-backcolor rte-dialog-line-more:focus-visible {
1617
+ outline: 2px solid #1a73e8 !important;
1618
+ outline-offset: 1px !important;
1619
+ background: #f1f5f9 !important;
1620
+ }
1610
1621
  rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-auto rte-dialog-item-label,
1611
1622
  rte-dropdown-panel.rte-panel-backcolor rte-dialog-line-auto rte-dialog-item-label,
1612
1623
  rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-more rte-dialog-item-label,
@@ -1986,6 +1997,21 @@ rte-menuspliter {
1986
1997
  margin: 3px 0px 3px 28px;
1987
1998
  }
1988
1999
 
2000
+ /* The panel is shrink-to-fit, so its width is decided by its widest preview —
2001
+ "Headline 1" at 32px — and measured 187px of text inside 187px of space:
2002
+ ZERO tolerance. Whenever the font used at layout time is a hair narrower than
2003
+ the one finally painted (a fallback still in place during a webfont swap, a
2004
+ different platform's metrics), the label overflows and the last character is
2005
+ cut off. Reported from the wild with "Headline 1" clipped.
2006
+
2007
+ A min-width gives the panel slack that does not depend on font metrics
2008
+ matching to the pixel; the previews are nowrap, so slack is the only thing
2009
+ that can absorb the variance. */
2010
+ .rte-dropdown-panel.rte_command_paragraphs,
2011
+ rte-dropdown-panel.rte_command_paragraphs {
2012
+ min-width: 292px;
2013
+ }
2014
+
1989
2015
  .rte_command_paragraphs rte-toolbar-dropdown-item div {
1990
2016
  font-size: 15px;
1991
2017
  margin: 0px;
@@ -2367,6 +2393,31 @@ rte-content::-webkit-scrollbar-thumb:hover {
2367
2393
  }
2368
2394
 
2369
2395
  .rte-dialog-browser,
2396
+ /* Upload failure notice. Deliberately a banner above the grid rather than a
2397
+ replacement for it: a rejected file used to blank the whole browser, leaving
2398
+ the dialog reading "0 items" with an error while the footer still said an
2399
+ image was ready to insert. */
2400
+ .rte-gallery-browser-error {
2401
+ display: flex;
2402
+ align-items: flex-start;
2403
+ gap: 8px;
2404
+ margin-bottom: 10px;
2405
+ padding: 10px 12px;
2406
+ border-radius: 10px;
2407
+ font-size: 13px;
2408
+ line-height: 1.5;
2409
+ color: #9f1239;
2410
+ background: #fff1f2;
2411
+ box-shadow: inset 0 0 0 1px rgba(190, 18, 60, 0.18);
2412
+ }
2413
+
2414
+ /* Accepted-format hint under the dialog subtitle. */
2415
+ .rte-dialog-browser-accept {
2416
+ margin-top: 4px;
2417
+ font-size: 12px;
2418
+ color: #64748b;
2419
+ }
2420
+
2370
2421
  .rte-gallery-browser {
2371
2422
  display: flex;
2372
2423
  flex-direction: column;
@@ -2559,25 +2610,25 @@ rte-content::-webkit-scrollbar-thumb:hover {
2559
2610
  flex-wrap: wrap;
2560
2611
  }
2561
2612
 
2562
- /* The toolbar is a flex row whose children are these two groups. Without a
2563
- display on the groups themselves the buttons stack vertically and the row
2564
- collapses to the width of its widest label -- which is exactly what shipped
2565
- when these rules went missing. */
2566
- .rte-gallery-browser-toolbar-group {
2567
- display: flex;
2568
- align-items: center;
2569
- gap: 8px;
2570
- min-width: 0;
2571
- flex: 1 1 auto;
2572
- flex-wrap: wrap;
2573
- }
2574
-
2575
- .rte-gallery-browser-toolbar-group-right {
2576
- flex: 0 1 auto;
2577
- justify-content: flex-end;
2578
- margin-left: auto;
2579
- }
2580
-
2613
+ /* The toolbar is a flex row whose children are these two groups. Without a
2614
+ display on the groups themselves the buttons stack vertically and the row
2615
+ collapses to the width of its widest label -- which is exactly what shipped
2616
+ when these rules went missing. */
2617
+ .rte-gallery-browser-toolbar-group {
2618
+ display: flex;
2619
+ align-items: center;
2620
+ gap: 8px;
2621
+ min-width: 0;
2622
+ flex: 1 1 auto;
2623
+ flex-wrap: wrap;
2624
+ }
2625
+
2626
+ .rte-gallery-browser-toolbar-group-right {
2627
+ flex: 0 1 auto;
2628
+ justify-content: flex-end;
2629
+ margin-left: auto;
2630
+ }
2631
+
2581
2632
  .rte-gallery-browser-button {
2582
2633
  border: 1px solid rgba(116, 135, 162, 0.28);
2583
2634
  border-radius: 999px;
@@ -2712,44 +2763,44 @@ rte-content::-webkit-scrollbar-thumb:hover {
2712
2763
  overflow: hidden;
2713
2764
  }
2714
2765
 
2715
- /* Folders sit in their own container above the image listbox, so the two are
2716
- separated by a rule rather than running together in one grid. */
2717
- .rte-gallery-browser-grid-folders {
2718
- margin-bottom: 14px;
2719
- padding-bottom: 14px;
2720
- border-bottom: 1px solid rgba(116, 135, 162, 0.16);
2721
- }
2722
-
2723
- /* Folder tiles have no image to show, so the icon is drawn in CSS. The plugin
2724
- emits an empty div for it -- with no rule here the tile renders blank. */
2725
- .rte-gallery-browser-thumbnail-folder {
2726
- background: linear-gradient(180deg, #fffaea 0%, #fdeec4 100%);
2727
- border-color: rgba(197, 158, 61, 0.32);
2728
- }
2729
-
2730
- .rte-gallery-browser-folder-icon {
2731
- position: relative;
2732
- width: 60px;
2733
- height: 42px;
2734
- border: 1px solid rgba(178, 138, 45, 0.7);
2735
- border-radius: 7px;
2736
- background: linear-gradient(180deg, #ffe6a1 0%, #f3c957 100%);
2737
- box-shadow: 0 8px 16px rgba(140, 100, 20, 0.18);
2738
- }
2739
-
2740
- .rte-gallery-browser-folder-icon:before {
2741
- content: "";
2742
- position: absolute;
2743
- left: 7px;
2744
- top: -9px;
2745
- width: 25px;
2746
- height: 13px;
2747
- border: 1px solid rgba(178, 138, 45, 0.7);
2748
- border-bottom: 0;
2749
- border-radius: 6px 6px 0 0;
2750
- background: linear-gradient(180deg, #fff1c4 0%, #f8d97c 100%);
2751
- }
2752
-
2766
+ /* Folders sit in their own container above the image listbox, so the two are
2767
+ separated by a rule rather than running together in one grid. */
2768
+ .rte-gallery-browser-grid-folders {
2769
+ margin-bottom: 14px;
2770
+ padding-bottom: 14px;
2771
+ border-bottom: 1px solid rgba(116, 135, 162, 0.16);
2772
+ }
2773
+
2774
+ /* Folder tiles have no image to show, so the icon is drawn in CSS. The plugin
2775
+ emits an empty div for it -- with no rule here the tile renders blank. */
2776
+ .rte-gallery-browser-thumbnail-folder {
2777
+ background: linear-gradient(180deg, #fffaea 0%, #fdeec4 100%);
2778
+ border-color: rgba(197, 158, 61, 0.32);
2779
+ }
2780
+
2781
+ .rte-gallery-browser-folder-icon {
2782
+ position: relative;
2783
+ width: 60px;
2784
+ height: 42px;
2785
+ border: 1px solid rgba(178, 138, 45, 0.7);
2786
+ border-radius: 7px;
2787
+ background: linear-gradient(180deg, #ffe6a1 0%, #f3c957 100%);
2788
+ box-shadow: 0 8px 16px rgba(140, 100, 20, 0.18);
2789
+ }
2790
+
2791
+ .rte-gallery-browser-folder-icon:before {
2792
+ content: "";
2793
+ position: absolute;
2794
+ left: 7px;
2795
+ top: -9px;
2796
+ width: 25px;
2797
+ height: 13px;
2798
+ border: 1px solid rgba(178, 138, 45, 0.7);
2799
+ border-bottom: 0;
2800
+ border-radius: 6px 6px 0 0;
2801
+ background: linear-gradient(180deg, #fff1c4 0%, #f8d97c 100%);
2802
+ }
2803
+
2753
2804
  .rte-gallery-browser-thumbnail-image {
2754
2805
  max-width: 100%;
2755
2806
  max-height: 100%;
@@ -3580,10 +3631,16 @@ rte-dialog-outer rte-dialog-header-close {
3580
3631
 
3581
3632
  rte-dropdown-panel {
3582
3633
  gap: 2px;
3583
- padding: 8px !important;
3634
+ /* Published as a variable so the full-bleed header below can cancel
3635
+ exactly this much padding instead of guessing at it. */
3636
+ --rte-panel-pad: 8px;
3637
+ padding: var(--rte-panel-pad) !important;
3584
3638
  max-width: min(520px, calc(100vw - 20px));
3585
3639
  max-height: min(420px, calc(100vh - 76px));
3586
- overflow: auto;
3640
+ /* Vertical only: a tall panel should scroll, but nothing in a panel is
3641
+ meant to be reachable sideways - a horizontal bar here is always a bug. */
3642
+ overflow-x: hidden;
3643
+ overflow-y: auto;
3587
3644
  scrollbar-width: thin;
3588
3645
  }
3589
3646
 
@@ -4735,8 +4792,8 @@ rte-dropdown-panel .rte-dialog-button:active {
4735
4792
  .richtexteditor.rte-modern.rte-desktop rte-toolbar.rte-toolbar-desktop rte-toolbar-splitbutton svg {
4736
4793
  display: block !important;
4737
4794
  flex: 0 0 auto;
4738
- width: 20px !important;
4739
- height: 20px !important;
4795
+ width: 20px !important;
4796
+ height: 20px !important;
4740
4797
  margin: 0 !important;
4741
4798
  align-self: center !important;
4742
4799
  color: currentColor;
@@ -4754,10 +4811,10 @@ rte-dropdown-panel .rte-dialog-button:active {
4754
4811
  pointer-events: none;
4755
4812
  }
4756
4813
 
4757
- .rte-modern rte-dropdown-panel rte-toolbar-button svg {
4758
- width: 20px !important;
4759
- height: 20px !important;
4760
- }
4814
+ .rte-modern rte-dropdown-panel rte-toolbar-button svg {
4815
+ width: 20px !important;
4816
+ height: 20px !important;
4817
+ }
4761
4818
 
4762
4819
  .richtexteditor.rte-modern.rte-desktop rte-toolbar.rte-toolbar-desktop rte-toolbar-button:hover,
4763
4820
  .richtexteditor.rte-modern.rte-desktop rte-toolbar.rte-toolbar-desktop rte-toolbar-arrowbutton:hover,
@@ -4895,3 +4952,14 @@ rte-dialog-float rte-dialog-inner {
4895
4952
  max-height: calc(100vh - max(104px, calc(var(--rte-dialog-effective-top-chrome) + 32px)));
4896
4953
  overflow: auto;
4897
4954
  }
4955
+
4956
+ /* WCAG 1.4.10 Reflow: rte-bottom
4957
+ The editor footer is a flex row (word count, tag list, "powered by", resize
4958
+ grip). With flex-wrap:nowrap and non-shrinking children it overflowed the
4959
+ editor AND the viewport at 320px - measured on the live home page as document
4960
+ scrollWidth 349 against a 320 viewport - which is the horizontal scrolling
4961
+ WCAG 1.4.10 (AA) prohibits. Wrapping keeps every control reachable instead of
4962
+ clipping it. Appended rather than merged into the existing rule because tier
4963
+ themes have diverged and a surgical edit risks corrupting them. */
4964
+ rte-bottom { flex-wrap: wrap; }
4965
+ rte-bottom > * { min-width: 0; }