Log in or register to post comments
Last post
how to avoid two spaces by pressing enter key in fck editor?
iam using html editor in my application....iam using asp.net,fckconfig.js,ckeditor-config.js,styles,enterkeypress.html so many files are there .....

my issue is when i press enter key in fck editor it is taking two spaces....i want only 1 spce when i press enter key.....how to avoid two spaces by cling enter key in fck editor?
Re: how to avoid two spaces by pressing enter key in fck edi
I can tell you a way to do it in CKEditor. FCKeditor should have the same solution as it has enter modes and
and something like editor/css/fck_editorarea.css

There are two ways to avoid "two spaces" when enter is pressed.

1. Change Enter mode from default P to e.g. BR

​http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.enterMode
​http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.shiftEnterMode

2. Although the above is easy we recommend using ENTER_P as bowsers handle this mode best.
To make spaces for paragraphs smaller you can add rule to your contents.css file E.g.

p {
margin : 1px 0;
padding : 0;
}

Don't forget about clearing browsers cache after changing contents.css (CRTL+F5 might be not enough E.g. in IE)

Please also not that contents.css applies only to content area so if you later display this page somewhere else the styles for P will be gone. To keep them you should provide the same style in location where page is to be displayed.