fix comment deletion detection when using html format (and ckeditor)
authorraph
Thu, 22 Apr 2010 18:09:44 +0200
changeset 264 b545c82610df
parent 263 cac40bfebe4b
child 265 1d4299775ec9
fix comment deletion detection when using html format (and ckeditor)
src/cm/media/js/site/text_edit.js
--- a/src/cm/media/js/site/text_edit.js	Thu Apr 22 12:48:02 2010 +0200
+++ b/src/cm/media/js/site/text_edit.js	Thu Apr 22 18:09:44 2010 +0200
@@ -3,6 +3,10 @@
     var commentsKept = $('#id_keep_comments').attr('checked') ;
 
     var new_content = $('#id_content').val() ;
+    
+    var o=CKEDITOR.instances['id_content'];
+    if (o) new_content=o.getData();
+    
     var new_format = $('#id_format').val() ;
     var mess = gettext( 'Should these comments be detached (i.e. kept with no scope) or removed from new version?') ;