Skip to content

Commit

Permalink
fix: for bug that would cause rich text input to incorrectly render n…
Browse files Browse the repository at this point in the history
…ested ordered/unordered lists
  • Loading branch information
adarleyjrr committed Jan 4, 2023
1 parent 1cdfcc2 commit a7bf792
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fixed a bug that would cause `WYSIWYGInput` component to incorrectly render nested ordered/unordered lists
- Tweaked default list style classes from `draft-js` to conform with list styles from class `pui-prose`

## [9.2.3] 2022-12-15

### Fixed
Expand Down
19 changes: 13 additions & 6 deletions src/components/WYSIWYGInput/draft.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
text-align: right;
}

/* .public-DraftStyleDefault-listLTR {
.public-DraftStyleDefault-listLTR {
direction: ltr;
}

Expand All @@ -108,7 +108,7 @@

.public-DraftStyleDefault-ol, .public-DraftStyleDefault-ul {
margin: 16px 0;
padding: 0;
padding: 0 !important;
}

.public-DraftStyleDefault-depth0 {
Expand Down Expand Up @@ -183,38 +183,45 @@
position: absolute;
text-align: right;
width: 30px;
font-weight: initial;
}

&.public-DraftStyleDefault-listRTL:before {
position: absolute;
right: -36px;
text-align: left;
width: 30px;
font-weight: initial;
}

&:before {
content: counter(ol0) ". ";
counter-increment: ol0;
font-weight: initial;
}

&.public-DraftStyleDefault-depth1:before {
content: counter(ol1, lower-alpha) ". ";
content: counter(ol1, initial) ". ";
counter-increment: ol1;
font-weight: initial;
}

&.public-DraftStyleDefault-depth2:before {
content: counter(ol2, lower-roman) ". ";
content: counter(ol2, initial) ". ";
counter-increment: ol2;
font-weight: initial;
}

&.public-DraftStyleDefault-depth3:before {
content: counter(ol3) ". ";
counter-increment: ol3;
font-weight: initial;
}

&.public-DraftStyleDefault-depth4:before {
content: counter(ol4, lower-alpha) ". ";
content: counter(ol4, initial) ". ";
counter-increment: ol4;
font-weight: initial;
}
}

Expand All @@ -237,4 +244,4 @@
.public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset {
counter-reset: ol4;
}
*/

0 comments on commit a7bf792

Please sign in to comment.