Jump to content

Using empty lines in CKEDitor


pwired
 Share

Recommended Posts

Hi,
I am using the body field for simple showing of text and pictures. Each time one line of text above a picture.
The client can add more pictures each with a line of text above it, simply by using the CKEditor.
It seems to be not possible to separate each picture with a text line with 2 or more empty lines.
Using the ENTER key results in <p>&nbsp;</p> but no matter how many times the ENTER key is used
there will be only 1 empty line that separates one picture with text with the next picture and text.
If I press 3 times the ENTER key and click on the SOURCE button in CKEditor I see 3 times <p>&nbsp;</p>
but still only 1 empty line shows up that separates one picture with text with the next picture and text.
How can I make it work to have more than 1 empty line for separation ? I tried to add <br> in extra allowed content
for the body field but that did not work also.

Link to comment
Share on other sites

Hi,

I am not familiar with the specific settings and configurations for the CKEditor, but I've found something:

Quote

Make sure that the field does not use a text formatter, the content type is set to "Markup/HTML" and ACF and HTML Purifier have been switched off.

Have you applied this to your field using the CKEditor?

Maybe <br /> works?

~Harmen

  • Like 1
Link to comment
Share on other sites

Thanks for the replies guys. Unchecking remove empty paragraph tags didnt do it. The thing is when I click on source in CKEditor I can actually see that multiple <p>&nbsp;</p> are there but they have no effect on the webpage. They should, but they dont and I dont know why. There is always one single empty line.

Quote

But better to solve this with CSS by adding some bottom margin to your images.

Yes, giving the images a bottom margin with css finally did it :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...