sanny
sanny

Reputation: 156

CKEditor inserts <br /> twice on keypress enter

With ckeditor I always get two <br /> tags when I press enter. I want to keep the line break tags, but I don't want to insert them twice.

My configuration for the enter key in the config.js:

config.enterMode = CKEDITOR.ENTER_BR;

How can I make CKEditor only insert it once?

EDIT: Right now I am solving it with css line-height property. Any more elegant solution would be great.

Upvotes: 1

Views: 1525

Answers (1)

Bioto
Bioto

Reputation: 1117

Try changing: CKEDITOR.ENTER_BR to CKEDITOR.ENTER_P

By default paragraphs are treated as 2 lines (because of the margin).

What you need to do is set it back to the default settings and change your p tag CSS to remove the margins so it allows it to be on one line.

Upvotes: 1

Related Questions