Search code examples
htmlcssckeditor

ckeditor line break using <p>


I am using ckeditor and it breaks new line by using <p>.

ckeditor

But I want to output to html using bootstrap. It doesn't line break on image.

screenshot of page

And I tried to use <br> and ckeditor replaced it with <p>.

How can write css for images within <p> tag to be line break?


Solution

  • .block {
      padding-top: 20px;
      display: block;
    }
    p {
      font-size: 16px;
    }
    <div class="block">
      <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,</p>
      <img src="https://image.ibb.co/k18JpK/images_20.jpg">
    </div>

    Please check the above code, If you take block property its come in block form otherwise you have to take this
    tag in HTML for breaking the line.