css: fix wrapping, using normal white space and break-word

Wrong config was causing copy paste to lose style attributes, and ep_align
justify to not work properly.
pull/4010/head
Sebastian Castro 2020-05-14 17:08:04 +02:00 committed by muxator
parent 08930fae05
commit ac850bfd47
1 changed files with 8 additions and 33 deletions

View File

@ -28,6 +28,14 @@ html.inner-editor {
padding: 10px;
overflow: hidden;
background-color: white;
/* Be careful editing following rules. Longs words should not overflow, ep_align justify should work,
Test on chrome, firefox and safari... Copy / Paste a word inside a sentence should not add line-breaks
and preserve the style */
display: block; /* for safari and firefox, otherwise the break-word does not work */
white-space: normal;
word-wrap: break-word;
overflow-wrap: break-word;
}
#innerdocbody, #sidediv {
padding-top: 10px; /* Both must have same top padding, so line number are aligned with the rows */
@ -69,38 +77,6 @@ body.mozilla, body.safari {
}
/* -------------- */
/* -- WRAPPING -- */
/* -------------- */
body {
white-space: nowrap;
word-wrap: normal;
}
body.doesWrap {
display: block !important;
/* white-space: pre-wrap; */
/*
Must be pre-wrap to keep trailing spaces. Otherwise you get a zombie caret,
walking around your screen (see #1766).
WARNING: Enabling this causes Paste as plain text in Chrome to remove line breaks
this is probably undesirable
WARNING: This causes copy & paste events to lose bold etc. attributes
NOTE: The walking-zombie caret issue seems to have been fixed in FF upstream
so let's try diabling pre-wrap and see how we get on now.
For more details see: https://github.com/ether/etherpad-lite/issues/2574
*/
word-wrap: break-word; /* fix for issue #1648 - firefox not wrapping long lines (without spaces) correctly */
}
.noprewrap{
white-space: normal;
}
body.doesWrap:not(.noprewrap) > div {
/* Related to #1766 */
white-space: pre-wrap;
}
/* ------------------------------------------ */
/* -- SIDEDIV (line number, text author..) -- */
/* ------------------------------------------ */
@ -158,7 +134,6 @@ body.doesWrap:not(.noprewrap) > div {
}
#innerdocbody a {
cursor: pointer !important;
white-space:pre-wrap;
}
body.grayedout {
background-color: #eee !important