@richscripts/richtexteditor 2.5.0 → 2.5.2

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.
@@ -8,10 +8,12 @@
8
8
  --rte-icon-color: #5F6368; /* toolbar/dialog icon color */
9
9
  --rte-surface: #ffffff; /* editor + panel background */
10
10
  --rte-surface-raised: #ffffff; /* toolbar / status bar background */
11
- --rte-border: #dddddd; /* chrome borders */
11
+ --rte-border: #d0d7de; /* chrome borders */
12
12
  --rte-text: #333333; /* chrome text */
13
13
  --rte-hover-bg: #f2f2f2; /* button hover background */
14
14
  --rte-accent: #1d67ba; /* active/selected accent */
15
+ --rte-shadow: 0 1px 2px rgba(16,24,40,.04), 0 2px 6px rgba(16,24,40,.06); /* container elevation */
16
+ --rte-focus-ring: 0 0 0 3px rgba(29,103,186,.14); /* focus halo */
15
17
  }
16
18
 
17
19
  rte-toolbar-button, rte-toolbar-splitbutton, rte-toolbar-dropdown, rte-toolbar-arrowbutton, rte-toolbar-dropdown-input, rte-toolbar-dropdown-arrow {
@@ -23,16 +25,20 @@ rte-toolbar-button, rte-toolbar-splitbutton, rte-toolbar-dropdown, rte-toolbar-a
23
25
  flex-direction: column !important;
24
26
  position: relative !important;
25
27
  box-sizing: border-box !important;
26
- border: 1px solid #ddd;
27
- background-color: #fff;
28
+ border: 1px solid var(--rte-border, #d0d7de);
29
+ background-color: var(--rte-surface, #fff);
30
+ /* A flat hairline box reads as an unstyled control; a hint of elevation is
31
+ what separates it from the page it sits on. */
32
+ box-shadow: var(--rte-shadow, none);
33
+ transition: border-color .15s ease, box-shadow .15s ease;
28
34
  user-select: none;
29
35
  min-height: 200px;
30
36
  min-width: 200px;
31
- font-family: -apple-system, Helvetica, Arial, sans-serif;
37
+ font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
32
38
  }
33
39
 
34
40
  .richtexteditor, .rte-absolute, .rte-fixed, rte-dropdown-panel {
35
- font-family: -apple-system, Helvetica, Arial, sans-serif;
41
+ font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
36
42
  font-size: 14px;
37
43
  }
38
44
 
@@ -4952,14 +4958,26 @@ rte-dialog-float rte-dialog-inner {
4952
4958
  max-height: calc(100vh - max(104px, calc(var(--rte-dialog-effective-top-chrome) + 32px)));
4953
4959
  overflow: auto;
4954
4960
  }
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; }
4961
+
4962
+ /* WCAG 1.4.10 Reflow: rte-bottom
4963
+ The editor footer is a flex row (word count, tag list, "powered by", resize
4964
+ grip). With flex-wrap:nowrap and non-shrinking children it overflowed the
4965
+ editor AND the viewport at 320px - measured on the live home page as document
4966
+ scrollWidth 349 against a 320 viewport - which is the horizontal scrolling
4967
+ WCAG 1.4.10 (AA) prohibits. Wrapping keeps every control reachable instead of
4968
+ clipping it. Appended rather than merged into the existing rule because tier
4969
+ themes have diverged and a surgical edit risks corrupting them. */
4970
+ rte-bottom { flex-wrap: wrap; }
4971
+ rte-bottom > * { min-width: 0; }
4972
+ /* Editor focus state. rte.js has always toggled .rte-is-focused/.rte-is-blurred
4973
+ on the container, but nothing ever styled them, so focusing the editor gave no
4974
+ visual feedback at all. The halo mirrors the focus treatment of the individual
4975
+ controls, so the whole component behaves consistently. */
4976
+ .richtexteditor.rte-is-focused {
4977
+ border-color: var(--rte-accent, #1d67ba);
4978
+ box-shadow: var(--rte-shadow, none), var(--rte-focus-ring, none);
4979
+ }
4980
+
4981
+ @media (prefers-reduced-motion: reduce) {
4982
+ .richtexteditor { transition: none; }
4983
+ }
@@ -1,21 +1,27 @@
1
1
  
2
2
  /* TODO: use @import for your css */
3
3
 
4
+ /* This stylesheet is the customer-editable layer for the EDITING SURFACE.
5
+ It loads between the editor's built-in defaults and the editor's own
6
+ mechanics rules, so anything set here wins over the defaults. Values below
7
+ intentionally match those defaults - edit freely to match your own site. */
8
+
4
9
  body {
5
10
  overflow-y: hidden;
6
- padding: 0px;
7
- margin: 0px
11
+ /* Writing gutters come from RTE_DefaultConfig.editablePadding* (applied
12
+ inline, so setting padding here would have no effect). */
13
+ margin: 0;
8
14
  }
9
15
 
10
16
  body, table, p, div {
11
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
12
- color: #414141;
13
- font-size: 14px;
14
- line-height: 1.6;
17
+ font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
18
+ color: #1f2328;
19
+ font-size: 16px;
20
+ line-height: 1.7;
15
21
  }
16
22
 
17
23
  a {
18
- color: #377dff;
24
+ color: #0969da;
19
25
  text-decoration: none;
20
26
  -webkit-transition: color 0.2s ease 0s, text-decoration 0.2s ease 0s;
21
27
  -moz-transition: color 0.2s ease 0s, text-decoration 0.2s ease 0s;
@@ -24,8 +30,8 @@ a {
24
30
  }
25
31
 
26
32
  ::selection {
27
- background: #b5d6fd;
28
- color: #000030;
33
+ background: #b6dafd;
34
+ color: #06121f;
29
35
  }
30
36
 
31
37
  /*RTE_DefaultConfig.items_InlineClasses*/
@@ -98,11 +104,11 @@ table {
98
104
  }
99
105
 
100
106
  table[border="0"] td, table:not([border]) td, table[border="0"] th, table:not([border]) th {
101
- border: 1px solid #ddd;
107
+ border: 1px solid #d0d7de;
102
108
  }
103
109
 
104
110
  thead {
105
- background-color: #eee;
111
+ background-color: #f6f8fa;
106
112
  }
107
113
 
108
114
  .table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
@@ -129,9 +135,10 @@ video-container {
129
135
  }
130
136
 
131
137
  blockquote {
132
- border-left: 3px solid #ddd;
133
- padding: 5px 0 5px 10px;
134
- margin: 15px 0 15px 15px;
138
+ border-left: 3px solid #d0d7de;
139
+ padding: 0.2em 0 0.2em 1em;
140
+ margin: 1.2em 0;
141
+ color: #57606a;
135
142
  }
136
143
 
137
144
 
@@ -1,14 +1,16 @@
1
1
  
2
2
  /* TODO: use @import for your css */
3
3
 
4
+ /* Kept in step with the editing surface (runtime/richtexteditor_content.css) so
5
+ a previewed document looks like what was authored. */
4
6
  body, table, p, div {
5
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
6
- color: #414141;
7
- font-size: 14px;
8
- line-height: 1.6;
7
+ font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
8
+ color: #1f2328;
9
+ font-size: 16px;
10
+ line-height: 1.7;
9
11
  }
10
12
  a {
11
- color: #377dff;
13
+ color: #0969da;
12
14
  text-decoration: none;
13
15
  -webkit-transition: color 0.2s ease 0s, text-decoration 0.2s ease 0s;
14
16
  -moz-transition: color 0.2s ease 0s, text-decoration 0.2s ease 0s;