I had the same problem and I have fixed that now. I am using ckeditor version 4.4.1 full package. If you are experiencing the same problem please just copy the below code and paste it into you config.js file in the ckeditor folder.
Surprisingly ckeditor support is not very helpful. I was struggling a lot with the problem. So I bought the license from them to get technical support from them. but it was useless. they wasted a lot of time but could not provide any useful solution. they were asking same question again and again but they were not even close to the problem. Instead of poviding any useful solution their support team was trying to establish that "Its not the editors fault".
Though there are a number of people who are facing the same problem.
However I found a solution in another forum and applied that. That code worked for me. I just wasted the money in buying licence from them.
Re: CKEditor putting an extra line break after the final div
This is a known bug. One way to void it (at least from my experience) is to switch to Normal <DIV> paragraph format, or to add config.enterMode = CKEDITOR.ENTER_BR; to your config file.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: CKEditor putting an extra line break after the final div
Example:
I have the following code
If I use the maximise button then the code changes to
Hi
Hi
I had the same problem and I have fixed that now. I am using ckeditor version 4.4.1 full package. If you are experiencing the same problem please just copy the below code and paste it into you config.js file in the ckeditor folder.
Surprisingly ckeditor support is not very helpful. I was struggling a lot with the problem. So I bought the license from them to get technical support from them. but it was useless. they wasted a lot of time but could not provide any useful solution. they were asking same question again and again but they were not even close to the problem. Instead of poviding any useful solution their support team was trying to establish that "Its not the editors fault".
Though there are a number of people who are facing the same problem.
However I found a solution in another forum and applied that. That code worked for me. I just wasted the money in buying licence from them.
here is the code for config.js file
======================================================================
CKEDITOR.on('instanceReady', function (ev) {
var writer = ev.editor.dataProcessor.writer;
// The character sequence to use for every indentation step.
writer.indentationChars = ' ';
var dtd = CKEDITOR.dtd;
// Elements taken as an example are: block-level elements (div or p), list items (li, dd), and table elements (td, tbody).
for (var e in CKEDITOR.tools.extend({}, dtd.$block, dtd.$listItem, dtd.$tableContent)) {
ev.editor.dataProcessor.writer.setRules(e, {
// Indicates that an element creates indentation on line breaks that it contains.
indent: false,
// Inserts a line break before a tag.
breakBeforeOpen: false,
// Inserts a line break after a tag.
breakAfterOpen: false,
// Inserts a line break before the closing tag.
breakBeforeClose: false,
// Inserts a line break after the closing tag.
breakAfterClose: false
});
}
for (var e in CKEDITOR.tools.extend({}, dtd.$list, dtd.$listItem, dtd.$tableContent)) {
ev.editor.dataProcessor.writer.setRules(e, {
indent: true,
});
}
});
================================
Hope that helps other people.