ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
69605
|
Wed Jan 4 11:39:39 2023 |
| Andrey Pashnin | kowaraj4stuff@gmail.com | Bug fix | All | ELOG V3.1.4-493 | wrap "pre" tag in a "div" with fixed width |
I'm sorry for being annoying...
but I have tried to wrap the <pre> tag in a <div> and it seems to do the trick
(the text is a single line with repeating aaa-b-cc sequence)
In the READ mode, the width is limited by the div's width
(see the first attachment)
In the EDIT mode, the width is only limited by the textarea width
(see the second attachment)
All this is with "wrap=hard" removed. |
Attachment 1: (READ)_single_long_line.png
|
|
Attachment 2: (EDIT)_single_long_line.png
|
|
69606
|
Wed Jan 4 11:43:00 2023 |
| Stefan Ritt | stefan.ritt@psi.ch | Bug fix | All | ELOG V3.1.4-493 | config option? |
Ok, I added an option
Hard wrap = 0 | 1
with the default being "1", so same behaviour as before. If you set this now to zero, you turn it off.
Now waiting for the first people complaining about the very long lines not being readable...
Best,
Stefan |
69607
|
Wed Jan 4 11:53:35 2023 |
| Andrey Pashnin | kowaraj4stuff@gmail.com | Bug fix | All | ELOG V3.1.4-493 | config option? |
That's great! Thank you very much. |
69608
|
Wed Jan 4 11:54:55 2023 |
| Andrey Pashnin | kowaraj4stuff@gmail.com | Bug report | Mac OSX | ELOG V3.1.4-493 | RESOLVED HERE: |
see https://elog.psi.ch/elogs/Forum/69594 |
69609
|
Wed Jan 4 11:58:19 2023 |
| Andrey Pashnin | kowaraj4stuff@gmail.com | Bug report | Mac OSX | ELOG V3.1.4-493 | please DELETE this thread |
I added a reply to my previous post about this issue (a few months ago) to point to the solution, but ELOG moved it to the top of the forum.
And I cannot delete this now, because I change my user name from "Andrey" to "Andrey Pashnin" :)
"Only user Andrey can delete this entry" |
69611
|
Wed Jan 4 12:17:46 2023 |
| Stefan Ritt | stefan.ritt@psi.ch | Bug fix | All | ELOG V3.1.4-493 | wrap "pre" tag in a "div" with fixed width |
Didn't work for me. The text is just truncated after the width and no extra lines are added. |
Attachment 1: Screenshot_2023-01-04_at_12.16.47_.png
|
|
69614
|
Wed Jan 4 14:05:25 2023 |
| Andrey Pashnin | kowaraj4stuff@gmail.com | Bug fix | All | ELOG V3.1.4-493 | wrap "pre" tag in a "div" with fixed width |
Sorry, I forgot to mention that I also added some styles to the <pre> tag:
style="white-space: normal"
(see the screenshot on my previous post) |
69615
|
Wed Jan 4 14:23:12 2023 |
| Stefan Ritt | stefan.ritt@psi.ch | Bug fix | All | ELOG V3.1.4-493 | wrap "pre" tag in a "div" with fixed width |
> Sorry, I forgot to mention that I also added some styles to the <pre> tag:
> style="white-space: normal"
> (see the screenshot on my previous post)
Actually the
style="white-space: normal"
makes the difference, the <div> is not necessary at all!
But I'm not sure that "white-space: normal" is what we want. All manual line breaks in an entry are collapsed and you get just one text block without any new line. See here
https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
I guess we want "white-space: pre-wrap" which keeps the old line breaks.
You can try that out by changing elog.css:
--- a/themes/default/elog.css
+++ b/themes/default/elog.css
@@ -475,6 +475,7 @@ td {
.messagepre {
font-family:'lucida console',courier,monospace;
+ white-space:pre-wrap;
}
and see the effect. If you like it, just keep it. No need to recompile elogd.cxx.
Stefan |