css - Bootstrap wysi html5 send me text in database with big line-height -


hello have next code

 <div class="form-group">                      <label>program</label>                      <!-- /.box-header -->                     <div class="box-body pad">                         <form>                             <textarea id="text-area-first" name="text-area-first" required class="textarea" placeholder="place text here" style="width: 50%; height: 150px; font-size: 14px; line-height: 0; border: 1px solid #dddddd; padding: 10px;"></textarea>                         </form>                     </div>                 </div> 

when i'm inserting text in texbox looks good, when go see result on page gives me big line-height , don't know why.

the result in database is:

<p>text:</p> <p>my text</p> <p>always text</p> 

what appears line-height here stems use of multiple "paragraph" tags, issue in definition itself, paragraph separates other paragraphs.

the way want output is

<p>     text:<br/>     text<br/>     text<br/> <p> 

it's practice avoid saving html in database possible. though you're using wysiwyg editor, solution can found in modifying css.

most wysiwyg editors allow ctrl+enter (cmd+enter) move new line (which create <br/> while staying within <p> parent, pressing enter alone create new paragraph tag; ergo, issue.

but ultimately, it's margin-bottom on <p> tag within bootstraps css


Comments