[CKEditor] How to reduce the spacing between 2 lines in ckeditor?

Forge Component
(22)
Published on 8 May by leonardo.fernandes
22 votes
Published on 8 May by leonardo.fernandes

Hello,

I am using CKEditor and found that there is too much space between 2 lines.

Can we reduce the space between 2 lines?

Please advice.

Thanks and Regards,

Suraj Borade

Hi Suraj,


Yes you can. Just edit the CSS of the paragraph for the component editor.


Best regards,

Márcio Lima

Suraj Borade wrote:

Hello,

I am using CKEditor and found that there is too much space between 2 lines.

Can we reduce the space between 2 lines?

Please advice.

Thanks and Regards,

Suraj Borade


Hi Suraj,

use the below code it will work.

SyntaxEditor Code Snippet

p {
    margin: 0;
}


Regards,

Pankaj

Did you try shift-enter instead of enter when trying a new line?

Niels Favreau wrote:

Did you try shift-enter instead of enter when trying a new line?

Hey Niels,

That's kind of a weird suggestion. :)

"Hey users, just press shift when writing a new paragraph."


Márcio Lima wrote:

Niels Favreau wrote:

Did you try shift-enter instead of enter when trying a new line?

Hey Niels,

That's kind of a weird suggestion. :)

"Hey users, just press shift when writing a new paragraph."


True, was just trying to say that there are 2 different types of 'Enters'


Márcio Lima wrote:

Hi Suraj,


Yes you can. Just edit the CSS of the paragraph for the component editor.


Best regards,

Márcio Lima


Hi Marcio,

Are you suggesting that I should open CK Editor and edit hiss CSS? Or can I add this css in application which is consuming the CKEditor?

Thanks

Where to add this?

Niels Favreau wrote:

Márcio Lima wrote:

Niels Favreau wrote:

Did you try shift-enter instead of enter when trying a new line?

Hey Niels,

That's kind of a weird suggestion. :)

"Hey users, just press shift when writing a new paragraph."


True, was just trying to say that there are 2 different types of 'Enters'


Shift + Enter works fine but I cannot recommend this to users.


Suraj,

Just change content.css that I've attached at the CKEditor resources.

I've added the paragraph margin:

p
{
    margin:2px;
}



Thanks Marcio. I will give it a try.

You're welcome. 

Just make sure you clear your browser cache, otherwise you might be served the old version of the file.