Skip to content

Commit fdd1852

Browse files
committed
MC-4965: Text Wrapping Inside Inline WYSIWYG Editors Will Break On Words (Storefront as well for Slide & Banner)
- add word wrapping to content editable items, banner, slide, tabs, text
1 parent 511ec8f commit fdd1852

File tree

10 files changed

+16
-7
lines changed

10 files changed

+16
-7
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/_preview.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[contenteditable=true] {
1111
-webkit-user-select: text;
1212
user-select: text;
13-
word-break: break-all;
13+
overflow-wrap: break-word;
1414

1515
b {
1616
font-weight: normal;

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/banner/_default.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
-webkit-transition: all 500ms ease;
3232
cursor: default;
3333
margin: @margin 0 0 0;
34+
max-width: 100%;
3435
opacity: 1;
3536
transition: all 500ms ease;
36-
word-break: break-all;
3737

3838
span[contenteditable=true] {
3939
display: block;

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/slide/_default.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
-webkit-transition: all 500ms ease;
3030
cursor: default;
3131
margin: @margin 0 0 0;
32+
max-width: 100%;
3233
opacity: 1;
3334
transition: all 500ms ease;
34-
word-break: break-all;
3535

3636
span[contenteditable=true] {
3737
display: block;

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/slide/_poster.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
justify-content: center;
3737

3838
.pagebuilder-poster-content {
39+
max-width: 100%;
3940
text-align: center;
4041
}
4142
}

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/tabs/_default.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ div[data-role='tabs'],
2929
border-bottom-right-radius: 0 !important;
3030
display: inline-block;
3131
margin: 0;
32+
max-width: 100%;
33+
overflow-wrap: break-word;
3234
position: relative;
3335

3436
a.tab-title {

app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/banner/_default.less

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
background-clip: padding-box;
3030
border-radius: inherit;
3131
box-sizing: border-box;
32-
word-break: break-all;
32+
overflow-wrap: break-word;
3333

3434
.pagebuilder-overlay {
3535
-moz-transition: background-color 500ms ease;
@@ -52,15 +52,16 @@
5252

5353
[data-element='content'] {
5454
min-height: 50px;
55-
word-wrap: break-word;
5655
}
5756

5857
.pagebuilder-banner-button {
5958
-moz-transition: opacity 500ms ease;
6059
-o-transition: opacity 500ms ease;
6160
-webkit-transition: opacity 500ms ease;
6261
margin: 20px 0 0 0;
62+
max-width: 100%;
6363
transition: opacity 500ms ease;
64+
word-break: break-word;
6465
}
6566
}
6667

app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/banner/_poster.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
.pagebuilder-banner-wrapper {
1111
.pagebuilder-poster-content {
12+
max-width: 100%;
1213
text-align: center;
1314
}
1415
}

app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/slide/_default.less

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
.pagebuilder-slide-wrapper {
3434
border-radius: inherit;
3535
box-sizing: border-box;
36-
word-break: break-all;
36+
overflow-wrap: break-word;
3737

3838
.pagebuilder-overlay {
3939
-moz-transition: background-color 500ms ease;
@@ -64,7 +64,9 @@
6464
-o-transition: opacity 500ms ease;
6565
-webkit-transition: opacity 500ms ease;
6666
margin: 20px 0 0 0;
67+
max-width: 100%;
6768
transition: opacity 500ms ease;
69+
word-break: break-word;
6870
}
6971
}
7072

app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/slide/_poster.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
.pagebuilder-slide-wrapper {
1111
.pagebuilder-poster-content {
12+
max-width: 100%;
1213
text-align: center;
1314
}
1415
}

app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/tabs/_default.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ div[data-role='tabs'] {
2626
border-bottom-right-radius: 0 !important;
2727
display: inline-block;
2828
margin: 0;
29+
max-width: 100%;
30+
overflow-wrap: break-word;
2931
position: relative;
3032
z-index: 1;
3133

@@ -45,7 +47,6 @@ div[data-role='tabs'] {
4547
transition: all .3s;
4648
vertical-align: middle;
4749
white-space: normal;
48-
word-break: break-all;
4950

5051
span.tab-title {
5152
display: block;

0 commit comments

Comments
 (0)