Implemented "Hard wrap" option
This commit is contained in:
@@ -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
|
||||
a list of open draft messages to be continued.
|
||||
</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>
|
||||
<p>
|
||||
<a name="themes" id="themes"></a>
|
||||
|
||||
+11
-4
@@ -11455,10 +11455,17 @@ void show_edit_form(LOGBOOK *lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
||||
|
||||
} else {
|
||||
|
||||
if (enc_selected == 1)
|
||||
/* use hard wrapping only for plain text */
|
||||
rsprintf("<textarea rows=%d cols=%d wrap=hard name=\"Text\">\n", height, width);
|
||||
else
|
||||
if (enc_selected == 1) {
|
||||
/* use hard wrapping only for plain text if configured */
|
||||
int hard_wrap = 1;
|
||||
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
|
||||
("<textarea rows=%d cols=%d name=\"Text\" style=\"width:100%%;\">\n", height, width);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user