mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
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.
This commit is contained in:
parent
08930fae05
commit
ac850bfd47
1 changed files with 8 additions and 33 deletions
|
@ -28,6 +28,14 @@ html.inner-editor {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: white;
|
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 {
|
#innerdocbody, #sidediv {
|
||||||
padding-top: 10px; /* Both must have same top padding, so line number are aligned with the rows */
|
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..) -- */
|
/* -- SIDEDIV (line number, text author..) -- */
|
||||||
/* ------------------------------------------ */
|
/* ------------------------------------------ */
|
||||||
|
@ -158,7 +134,6 @@ body.doesWrap:not(.noprewrap) > div {
|
||||||
}
|
}
|
||||||
#innerdocbody a {
|
#innerdocbody a {
|
||||||
cursor: pointer !important;
|
cursor: pointer !important;
|
||||||
white-space:pre-wrap;
|
|
||||||
}
|
}
|
||||||
body.grayedout {
|
body.grayedout {
|
||||||
background-color: #eee !important
|
background-color: #eee !important
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue