Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Wasn't sure how to search for this so I'm not sure if it's been answered but every time I just put regular text into the wysiwyg editor for a "type='richtext'" editable the text after saving automatically gets paragraph tags surrounded it adding un-wanted space above the text.
Is it possible to force it to not ever do this?

I know you didn't make the wysiwyg but I figured I'd ask here if you knew a work around before I go looking into the wysiwyg's docs.
Hi,

You can configure CKEditor to output '<br/>'s instead (or wrap the elements using '<div>' instead of the '<p>', but I don't think you'd want that).

Please find the following file -
couch\includes\ckeditor\config.js

Find the following line in the file
config.language = 'en';

and add this line immediately below the line found above
config.enterMode = CKEDITOR.ENTER_BR;

Finally, clear the cache of your browser for CKEditor to pickup the modified file.

I should add that CKEditor docs do not recommend this behaviour, citing 'semantic incorrectness'. However, if it works for you, go for it :)

Let me know if this helped.
Thanks.
perfect, <br /> is so much better... haha thank you.
You could just apply "margin-top:0;padding-top:0" to 'p' tags or create a custom style for ckeditor with your custom 'p' tag css class. If you just want text with line break tags, it would appear that a textarea editable region together with the couch 'nl2br' tag would be more appropriate.
4 posts Page 1 of 1