Search code examples
angularcsswysiwygckeditor4.x

Remove spacing between two paragraphs when displaying WYSIWIGS with ckeditor 4 in Angular


I'm using Angular 4 with ckeditor 4.x for WYSIWYG.

So when I'm displaying the code from database, the view is not the same in ckeditor, even if there's no style applying with paragraph.

I've tryed to reduce the line-height with CSS but no-way, it's the same result.

I removed the margin between lines but the same matters.

This is the code of the CSS where I've tryed to solve the problem:

p, p + p{
    color:rgb(51, 51, 51);
    display:block;
    font-family:sans-serif, Arial, Verdana, "Trebuchet MS";
    font-size:13px;
    line-height:normal;
    margin: 0;
    word-wrap:break-word;
    -webkit-margin-after:0px;
    -webkit-margin-before:0px;
    -webkit-margin-end:0px;
    -webkit-margin-start:0px;
}
<p>This one line</p> 
<p>this is the second lines</p> 
<p>And another one</p> 
<p>And a last lines</p>

This is the view:

enter image description here

Here's the computed code in dev tools

enter image description here


Solution

  • I solve the problem by removing the white-space:pre-wrap;. I Don't kwon why it's add a space between lines.