w8tcha/CKEditor-AutoSave-Plugin — pull request #35 by stefanmintert (2014-11-27 10:23:39+00:00)
Title: Exchanged getData() with getSnapshot().

I exchanged getData() with getSnapshot(). Reason:

getData() is the editor content AFTER transformation that might occur "onToDataFormat". getSnapshot() is the raw data without transformations.

http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getData
This part of the documentation reads 'The data will be in "raw" format.' That's wrong. The data is processed with e.editor.on( 'toDataFormat', function(event) {...}).

http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getSnapshot
From the documentation: 'Gets the "raw data" currently available in the editor. This is a fast method which returns the data as is, without processing, so it is not recommended to use it on resulting pages. Instead it can be used combined with the loadSnapshot method in order to automatically save the editor data from time to time while the user is using the editor, to avoid data loss, without risking performance issues.'