Hi,
I'm using CKEditor 4 (latest release 2 days ago) with IE8 and Classic Asp.
I've got the editor working but I'm having problems with the saved HTML.
Every time I save, I'm getting additional "<p> </p>" tags in my document, with random commas included at the end of the file. Every time I save, the number of these tags increases exponentially.
I've customized the toolbar with the following changes to config.js:
CKEDITOR.editorConfig = function(config) {
// Base config page for CKEditor in MyEditor.asp.
config.toolbar = [
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'Undo', 'Redo' ] },
{ name: 'styles', items: [ 'Styles', 'Format'] },
{ name: 'basicstyles', groups: ['basicstyles'], items: ['Bold', 'Italic', 'Underline'] },
{ name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align'], items: ['Indent', 'Outdent', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] },
{ name: 'insert', items: [ 'NumberedList', 'BulletedList', 'Table', 'Image', 'Link', 'Unlink', 'Find', 'SpecialChar'] }
];
config.toolbarGroups = [
{ name: 'clipboard', groups: ['clipboard', 'undo'] },
{ name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align'] }
];
};
Also, how do you get rid of the "body p" detail in the footer?
Regards,
Jules

Please note, I've replicated this page in VS2010
Please note, I've replicated the page in VS2010 and no problems there (still with IE8).
Try adding this to config.js
Try adding this to config.js
Also check this link.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Tried that and it's still happening.
Hi Seb,
Tried that and it's still happening.
This is the HTML that I'm putting in the CKEditor:
<h1>More Tests</h1>
<p>This is the first paragraph.</p>
<p>This is the second paragraph.</p>
After saving this, this is the HTML (note the trailing comma:
<h1>More Tests</h1>
<p> This is the first paragraph.</p>
<p>This is the second paragraph.</p>
,
When I go back into the edit screen, this is the HTML that I get:
<h1>More Tests</h1>
<br/>
<br/>
<p> This is the first paragraph.</p>
<br/>
<br/>
<p>This is the second paragraph.</p>
<br/>
,
Still with trailing comma.
One point, I'm using the class name "ckeditor" on the textarea (like with MVC4 and CKEditor) and just submitting the form.
Would using JavaScript (I.E. GetData / SetData) in Classic ASP be better?
Could this be causing some of the problems above.
Sorry about the long post.
Regards,
Jules
Also
Every time I save, the generated HTML gets bigger and bigger.
Still getting a trailing comma
Hi Seb,
I'm still getting a trailing comma every time I save.
Any ideas?
Jules
1. Also, how do you get rid
1. Also, how do you get rid of the "body p" detail in the footer?
Please use var editor = CKEDITOR.replace( 'editor1', { removePlugins : 'elementspath' });
2. Please use:
var editor = CKEDITOR.replace( 'editor1', { removePlugins : 'elementspath' });
editor.on( 'instanceReady', function( evt )
{
console.log(CKEDITOR.instances.editor1.getData());
});
on your page and tell me if you get this comma then. I'm asking this because editor has nothing to do with saving data and this comma can be added later to data you submit. For example it can be added on server side because you have error in code extracting data.
I don't know what method of saving you use but (perhaps you could send us whole ASP page) but most likely CKEditor is not responsible and something in your application is attaching this comma.
Trailing comma
HI,
Thanks for your reply.
Yes, it seems the trailing comma is down to us :-)
Sorry, I'm at a client and I can't share the code.
As for the first point, the editor is adding p and br tags everytime I save.
Any ideas?
What code you insert into
What code you insert into editor that produces such result and what configuration settings have you got?
This is the code
If you look at my post above (Fri, 08/23/2013 - 14:53), you will see the output.
The config settings are as below:
/**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function(config) {
// Base config page for CKEditor in MyEditor.asp.
config.toolbar = [
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: ['Cut', 'Copy', 'Paste', 'Undo', 'Redo'] },
{ name: 'styles', items: [ 'Styles', 'Format'] },
{ name: 'basicstyles', groups: ['basicstyles'], items: ['Bold', 'Italic', 'Underline'] },
{ name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align'], items: ['Indent', 'Outdent', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] },
{ name: 'insert', items: [ 'NumberedList', 'BulletedList', 'Table', 'Image', 'Link', 'Unlink', 'Find', 'SpecialChar'] }
];
config.toolbarGroups = [
{ name: 'clipboard', groups: ['clipboard', 'undo'] },
{ name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align'] }
];
};
Thanks for your help.
Solved
Hi,
The trailing comma was down to the remnants of the MSHTML control we had previously (If you're migrating from this, delete all the hidden text areas from that control).
I've managed to sort out the additionally generated HTML by setting rules for the relevent html tags (h1, p, br).
Thanks for your help (and please close this).