mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Implemented "Hard wrap" option
This commit is contained in:
parent
bcd7b50edd
commit
5095d90429
@ -2928,6 +2928,15 @@ Options Location = Main Building{a}, New Building{b}, Old Building{c}
|
|||||||
<b><code>New</code></b> menu item, in which case the system presents to the user
|
<b><code>New</code></b> menu item, in which case the system presents to the user
|
||||||
a list of open draft messages to be continued.
|
a list of open draft messages to be continued.
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<b><code>Hard wrap = 0|1</code></b><br>
|
||||||
|
If entries are entered in plain text mode, the browser adds automatically a
|
||||||
|
CRLF at the end of each line where the text wraps. This ensures that the submitted
|
||||||
|
entry has the same line breaks as in the edit box. If this behaviour is not
|
||||||
|
wanted, the adding of hard wraps can be turned off by setting this value to <b>0</b>.
|
||||||
|
If the user then enters a very long line without hitting the newline key,
|
||||||
|
the long line is preserved which can make it hard to read.
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
<a name="themes" id="themes"></a>
|
<a name="themes" id="themes"></a>
|
||||||
|
|||||||
@ -11455,10 +11455,17 @@ void show_edit_form(LOGBOOK *lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (enc_selected == 1)
|
if (enc_selected == 1) {
|
||||||
/* use hard wrapping only for plain text */
|
/* use hard wrapping only for plain text if configured */
|
||||||
rsprintf("<textarea rows=%d cols=%d wrap=hard name=\"Text\">\n", height, width);
|
int hard_wrap = 1;
|
||||||
else
|
if (getcfg(lbs->name, "Hard wrap", str, sizeof(str)))
|
||||||
|
hard_wrap = atoi(str);
|
||||||
|
|
||||||
|
if (hard_wrap)
|
||||||
|
rsprintf("<textarea rows=%d cols=%d wrap=hard name=\"Text\">\n", height, width);
|
||||||
|
else
|
||||||
|
rsprintf("<textarea rows=%d cols=%d name=\"Text\">\n", height, width);
|
||||||
|
} else
|
||||||
rsprintf
|
rsprintf
|
||||||
("<textarea rows=%d cols=%d name=\"Text\" style=\"width:100%%;\">\n", height, width);
|
("<textarea rows=%d cols=%d name=\"Text\" style=\"width:100%%;\">\n", height, width);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user