Page 1 of 1

WYSIWYG editor leaves blank line

Posted: Sat Jan 18, 2014 2:15 pm
by lurch
When using the WYSIWYG editor after pressing return it goes down 2 lines ie

line 1

line 2

i've looked for anything that could be causing this as I assume it's something simple but I just can't find it.

Re: WYSIWYG editor leaves blank line

Posted: Sat Jan 18, 2014 2:57 pm
by Timbalu
Do you really mean WYSIWYG-Editor enabled in personal preferences?
I am not sure what you mean to happen actually ... but first read this about S9y WYSIWYG Editors
http://board.s9y.org/viewtopic.php?f=4&t=19354 (that might help)

Re: WYSIWYG editor leaves blank line

Posted: Sat Jan 18, 2014 3:15 pm
by lurch
yes, i've just install serendipity_event_ckeditor and it's doing the same thing

Image

evert time i press 'return' it goes down 2 lines

Re: WYSIWYG editor leaves blank line

Posted: Sat Jan 18, 2014 3:34 pm
by Timbalu
You mean in the editor itself - in wysiwyg-mode, right?
This is the normal usage of <p></p> = paragraph as the default newline (nl) replacer. (Has nothing to do with our nl2br (read nl-to-br, not two!) plugin though.)
See http://ckeditor.com/demo

Re: WYSIWYG editor leaves blank line

Posted: Sat Jan 18, 2014 3:41 pm
by lurch
yes that's right, is there anyway i can change this behavior?

i tried adding

Code: Select all

CKEDITOR.replace( 'textarea_id',
	{
		enterMode : CKEDITOR.ENTER_DIV
	});
to config.js but that didn't work

Re: WYSIWYG editor leaves blank line

Posted: Sat Jan 18, 2014 3:58 pm
by Timbalu
Yes and No. Since this is the WWW, you can tell the p tag to behave differently by CSS. But that would mean to change ckeditor CSS, Serendipity CSS and your templates CSS. Everyone used to this paragraph behaviour would moun and this is a fight against windmills. :wink:

But if you promise not to tell anbody, there is an (internal) option - open the custom cke_config.js (Line ~76) and set

Code: Select all

config.enterMode = CKEDITOR.ENTER_BR;
:lol:

Re: WYSIWYG editor leaves blank line

Posted: Sat Jan 18, 2014 4:01 pm
by garvinhicking
Hit Shift+Enter. :)

Re: WYSIWYG editor leaves blank line

Posted: Sat Jan 18, 2014 4:06 pm
by Timbalu
I'm impressed!!!!!!! :)

Edit: I added a cheatsheet plugin to ckeditor 3.2.0+, which will help to find hidden gems like this!