@richscripts/richtexteditor 2.4.2 → 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.
- package/package.json +1 -1
- package/richtexteditor/all_plugins.js +2837 -935
- package/richtexteditor/all_plugins.min.js +58 -58
- package/richtexteditor/plugins/accessibilitychecker.js +186 -1
- package/richtexteditor/plugins/aitoolkit.js +1 -1
- package/richtexteditor/plugins/all_plugins.js +2837 -935
- package/richtexteditor/plugins/all_plugins.min.js +58 -58
- package/richtexteditor/plugins/gapcursor.js +365 -0
- package/richtexteditor/plugins/imageeditor.js +30 -3
- package/richtexteditor/plugins/importstyles.js +312 -0
- package/richtexteditor/plugins/insertcode.js +81 -4
- package/richtexteditor/plugins/insertemoji.js +302 -229
- package/richtexteditor/plugins/insertgallery.js +34 -6
- package/richtexteditor/plugins/keyboarda11y.js +27 -1
- package/richtexteditor/plugins/multiroot.js +269 -0
- package/richtexteditor/plugins/revisionhistory.js +5 -0
- package/richtexteditor/plugins/textpartlanguage.js +504 -0
- package/richtexteditor/plugins/trackedchanges.js +716 -689
- package/richtexteditor/plugins/wordexport.js +1 -1
- package/richtexteditor/rte-config.js +2 -2
- package/richtexteditor/rte.js +55 -51
- package/richtexteditor/rte_theme_default.css +149 -102
|
@@ -283,11 +283,11 @@ 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
|
-
/* 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
|
|
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
291
|
status bar round their own corners (see the rule below). */
|
|
292
292
|
overflow: visible;
|
|
293
293
|
background-clip: padding-box;
|
|
@@ -1435,7 +1435,12 @@ rte-dropdown-panel.rte-panel-insertimage rte-tabui-toolbar, rte-dropdown-panel.r
|
|
|
1435
1435
|
}
|
|
1436
1436
|
|
|
1437
1437
|
.rte-panel-general rte-dialog-header {
|
|
1438
|
-
|
|
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;
|
|
1439
1444
|
}
|
|
1440
1445
|
|
|
1441
1446
|
rte-inserttable-panel {
|
|
@@ -1576,14 +1581,14 @@ rte-dropdown-panel.rte-panel-backcolor rte-dialog-item-color[rte-tooltip]:hover
|
|
|
1576
1581
|
border-color: rgba(0,0,0,.08) !important;
|
|
1577
1582
|
}
|
|
1578
1583
|
|
|
1579
|
-
rte-dropdown-panel.rte-panel-forecolor rte-dialog-item-color[role="menuitem"]:focus-visible,
|
|
1580
|
-
rte-dropdown-panel.rte-panel-backcolor rte-dialog-item-color[role="menuitem"]:focus-visible {
|
|
1581
|
-
outline: 2px solid #1a73e8 !important;
|
|
1582
|
-
outline-offset: 2px !important;
|
|
1583
|
-
transform: scale(1.15) !important;
|
|
1584
|
-
position: relative !important;
|
|
1585
|
-
z-index: 2 !important;
|
|
1586
|
-
}
|
|
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
|
+
}
|
|
1587
1592
|
rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-auto,
|
|
1588
1593
|
rte-dropdown-panel.rte-panel-backcolor rte-dialog-line-auto,
|
|
1589
1594
|
rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-more,
|
|
@@ -1605,14 +1610,14 @@ rte-dropdown-panel.rte-panel-backcolor rte-dialog-line-more:hover {
|
|
|
1605
1610
|
border: 0 !important;
|
|
1606
1611
|
}
|
|
1607
1612
|
|
|
1608
|
-
rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-auto:focus-visible,
|
|
1609
|
-
rte-dropdown-panel.rte-panel-backcolor rte-dialog-line-auto:focus-visible,
|
|
1610
|
-
rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-more:focus-visible,
|
|
1611
|
-
rte-dropdown-panel.rte-panel-backcolor rte-dialog-line-more:focus-visible {
|
|
1612
|
-
outline: 2px solid #1a73e8 !important;
|
|
1613
|
-
outline-offset: 1px !important;
|
|
1614
|
-
background: #f1f5f9 !important;
|
|
1615
|
-
}
|
|
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
|
+
}
|
|
1616
1621
|
rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-auto rte-dialog-item-label,
|
|
1617
1622
|
rte-dropdown-panel.rte-panel-backcolor rte-dialog-line-auto rte-dialog-item-label,
|
|
1618
1623
|
rte-dropdown-panel.rte-panel-forecolor rte-dialog-line-more rte-dialog-item-label,
|
|
@@ -1992,21 +1997,21 @@ rte-menuspliter {
|
|
|
1992
1997
|
margin: 3px 0px 3px 28px;
|
|
1993
1998
|
}
|
|
1994
1999
|
|
|
1995
|
-
/* The panel is shrink-to-fit, so its width is decided by its widest preview —
|
|
1996
|
-
"Headline 1" at 32px — and measured 187px of text inside 187px of space:
|
|
1997
|
-
ZERO tolerance. Whenever the font used at layout time is a hair narrower than
|
|
1998
|
-
the one finally painted (a fallback still in place during a webfont swap, a
|
|
1999
|
-
different platform's metrics), the label overflows and the last character is
|
|
2000
|
-
cut off. Reported from the wild with "Headline 1" clipped.
|
|
2001
|
-
|
|
2002
|
-
A min-width gives the panel slack that does not depend on font metrics
|
|
2003
|
-
matching to the pixel; the previews are nowrap, so slack is the only thing
|
|
2004
|
-
that can absorb the variance. */
|
|
2005
|
-
.rte-dropdown-panel.rte_command_paragraphs,
|
|
2006
|
-
rte-dropdown-panel.rte_command_paragraphs {
|
|
2007
|
-
min-width: 292px;
|
|
2008
|
-
}
|
|
2009
|
-
|
|
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
|
+
|
|
2010
2015
|
.rte_command_paragraphs rte-toolbar-dropdown-item div {
|
|
2011
2016
|
font-size: 15px;
|
|
2012
2017
|
margin: 0px;
|
|
@@ -2388,6 +2393,31 @@ rte-content::-webkit-scrollbar-thumb:hover {
|
|
|
2388
2393
|
}
|
|
2389
2394
|
|
|
2390
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
|
+
|
|
2391
2421
|
.rte-gallery-browser {
|
|
2392
2422
|
display: flex;
|
|
2393
2423
|
flex-direction: column;
|
|
@@ -2580,25 +2610,25 @@ rte-content::-webkit-scrollbar-thumb:hover {
|
|
|
2580
2610
|
flex-wrap: wrap;
|
|
2581
2611
|
}
|
|
2582
2612
|
|
|
2583
|
-
/* The toolbar is a flex row whose children are these two groups. Without a
|
|
2584
|
-
display on the groups themselves the buttons stack vertically and the row
|
|
2585
|
-
collapses to the width of its widest label -- which is exactly what shipped
|
|
2586
|
-
when these rules went missing. */
|
|
2587
|
-
.rte-gallery-browser-toolbar-group {
|
|
2588
|
-
display: flex;
|
|
2589
|
-
align-items: center;
|
|
2590
|
-
gap: 8px;
|
|
2591
|
-
min-width: 0;
|
|
2592
|
-
flex: 1 1 auto;
|
|
2593
|
-
flex-wrap: wrap;
|
|
2594
|
-
}
|
|
2595
|
-
|
|
2596
|
-
.rte-gallery-browser-toolbar-group-right {
|
|
2597
|
-
flex: 0 1 auto;
|
|
2598
|
-
justify-content: flex-end;
|
|
2599
|
-
margin-left: auto;
|
|
2600
|
-
}
|
|
2601
|
-
|
|
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
|
+
|
|
2602
2632
|
.rte-gallery-browser-button {
|
|
2603
2633
|
border: 1px solid rgba(116, 135, 162, 0.28);
|
|
2604
2634
|
border-radius: 999px;
|
|
@@ -2733,44 +2763,44 @@ rte-content::-webkit-scrollbar-thumb:hover {
|
|
|
2733
2763
|
overflow: hidden;
|
|
2734
2764
|
}
|
|
2735
2765
|
|
|
2736
|
-
/* Folders sit in their own container above the image listbox, so the two are
|
|
2737
|
-
separated by a rule rather than running together in one grid. */
|
|
2738
|
-
.rte-gallery-browser-grid-folders {
|
|
2739
|
-
margin-bottom: 14px;
|
|
2740
|
-
padding-bottom: 14px;
|
|
2741
|
-
border-bottom: 1px solid rgba(116, 135, 162, 0.16);
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
|
-
/* Folder tiles have no image to show, so the icon is drawn in CSS. The plugin
|
|
2745
|
-
emits an empty div for it -- with no rule here the tile renders blank. */
|
|
2746
|
-
.rte-gallery-browser-thumbnail-folder {
|
|
2747
|
-
background: linear-gradient(180deg, #fffaea 0%, #fdeec4 100%);
|
|
2748
|
-
border-color: rgba(197, 158, 61, 0.32);
|
|
2749
|
-
}
|
|
2750
|
-
|
|
2751
|
-
.rte-gallery-browser-folder-icon {
|
|
2752
|
-
position: relative;
|
|
2753
|
-
width: 60px;
|
|
2754
|
-
height: 42px;
|
|
2755
|
-
border: 1px solid rgba(178, 138, 45, 0.7);
|
|
2756
|
-
border-radius: 7px;
|
|
2757
|
-
background: linear-gradient(180deg, #ffe6a1 0%, #f3c957 100%);
|
|
2758
|
-
box-shadow: 0 8px 16px rgba(140, 100, 20, 0.18);
|
|
2759
|
-
}
|
|
2760
|
-
|
|
2761
|
-
.rte-gallery-browser-folder-icon:before {
|
|
2762
|
-
content: "";
|
|
2763
|
-
position: absolute;
|
|
2764
|
-
left: 7px;
|
|
2765
|
-
top: -9px;
|
|
2766
|
-
width: 25px;
|
|
2767
|
-
height: 13px;
|
|
2768
|
-
border: 1px solid rgba(178, 138, 45, 0.7);
|
|
2769
|
-
border-bottom: 0;
|
|
2770
|
-
border-radius: 6px 6px 0 0;
|
|
2771
|
-
background: linear-gradient(180deg, #fff1c4 0%, #f8d97c 100%);
|
|
2772
|
-
}
|
|
2773
|
-
|
|
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
|
+
|
|
2774
2804
|
.rte-gallery-browser-thumbnail-image {
|
|
2775
2805
|
max-width: 100%;
|
|
2776
2806
|
max-height: 100%;
|
|
@@ -3601,10 +3631,16 @@ rte-dialog-outer rte-dialog-header-close {
|
|
|
3601
3631
|
|
|
3602
3632
|
rte-dropdown-panel {
|
|
3603
3633
|
gap: 2px;
|
|
3604
|
-
|
|
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;
|
|
3605
3638
|
max-width: min(520px, calc(100vw - 20px));
|
|
3606
3639
|
max-height: min(420px, calc(100vh - 76px));
|
|
3607
|
-
|
|
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;
|
|
3608
3644
|
scrollbar-width: thin;
|
|
3609
3645
|
}
|
|
3610
3646
|
|
|
@@ -4756,8 +4792,8 @@ rte-dropdown-panel .rte-dialog-button:active {
|
|
|
4756
4792
|
.richtexteditor.rte-modern.rte-desktop rte-toolbar.rte-toolbar-desktop rte-toolbar-splitbutton svg {
|
|
4757
4793
|
display: block !important;
|
|
4758
4794
|
flex: 0 0 auto;
|
|
4759
|
-
width: 20px !important;
|
|
4760
|
-
height: 20px !important;
|
|
4795
|
+
width: 20px !important;
|
|
4796
|
+
height: 20px !important;
|
|
4761
4797
|
margin: 0 !important;
|
|
4762
4798
|
align-self: center !important;
|
|
4763
4799
|
color: currentColor;
|
|
@@ -4775,10 +4811,10 @@ rte-dropdown-panel .rte-dialog-button:active {
|
|
|
4775
4811
|
pointer-events: none;
|
|
4776
4812
|
}
|
|
4777
4813
|
|
|
4778
|
-
.rte-modern rte-dropdown-panel rte-toolbar-button svg {
|
|
4779
|
-
width: 20px !important;
|
|
4780
|
-
height: 20px !important;
|
|
4781
|
-
}
|
|
4814
|
+
.rte-modern rte-dropdown-panel rte-toolbar-button svg {
|
|
4815
|
+
width: 20px !important;
|
|
4816
|
+
height: 20px !important;
|
|
4817
|
+
}
|
|
4782
4818
|
|
|
4783
4819
|
.richtexteditor.rte-modern.rte-desktop rte-toolbar.rte-toolbar-desktop rte-toolbar-button:hover,
|
|
4784
4820
|
.richtexteditor.rte-modern.rte-desktop rte-toolbar.rte-toolbar-desktop rte-toolbar-arrowbutton:hover,
|
|
@@ -4916,3 +4952,14 @@ rte-dialog-float rte-dialog-inner {
|
|
|
4916
4952
|
max-height: calc(100vh - max(104px, calc(var(--rte-dialog-effective-top-chrome) + 32px)));
|
|
4917
4953
|
overflow: auto;
|
|
4918
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; }
|