This question is for when user is actually typing the text in textarea and not for how to process it afterwards.
When I enter text in textarea and press Enter, and then do a "view source" I see newlines are translated to html paragraphs (<p> and </p>). This causes a big gap between two successive lines. Is there some way of forcing it to use line breaks (<br />)? I tried using CSS but nothing worked (neither it seems I can change font size and type!)
For storing this data in DB, I can replace all <p> with empty string and all </p> with <br /> before processing it so it would display correctly later.
Update I am using an Ajax HTML Text Editor:
<asp:TextBox runat="server" ID="edComment" TextMode="MultiLine" CssClass="Comment" />
<ajaxToolkit:HtmlEditorExtender runat="server" ID="heeComment"
TargetControlID="edComment"
EnableSanitization="false"
BehaviorID="heeComment"
DisplayPreviewTab="false"
DisplaySourceTab="false">
</ajaxToolkit:HtmlEditorExtender>
When I enter "blah<enter>blah<enter><enter>" and in code behind capture the text (i.e. edComment.Text), I see:
<p>blah</p><p>blah</p><p><br></p>
This is why when I (user), am typing the text, there is such a big gap between two blahs; because they are taken as paragraphs. I am wondering if his can be forced to use <br /> so I would have blah<br />blah<br />. Not after all is said and done but while I am typing the text.
` to `
– VDWWD Jul 11 '17 at 19:06` in a config file.