After looking at http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#getData, I have tried a few variations in place of editor1 in:
var editor_contents = CKEDITOR.instances.editor1.getData();
Chrome's console reports that it cannot read property getData of undefined. I've tried the line as quoted, and editor0 and scratchpad (the latter being the HTML ID of the TEXTAREA I fed to CKEDITOR). They all get the same error.
How should (or should?) I be invoking getData() to obtain the contents of the TEXTAREA with HTML ID 'scratchpad'? I tried querying jQuery('#scratchpad'), but the return value I got from that was the value used to initially populate #scratchpad, and didn't show subsequent editing.
I'd love to know how to programmatically query the live contents of a CKEDITOR widget.
Thanks,
--EDIT--
I tried inspecting the element, and based on that tried the following:
var editor_contents = jQuery('td#cke_contents_scratchpad iframe body.cke_show_borders').html();
Got an undefined value. My guess is that Chrome's inspector presents iframes in a convenient way but not in a way paralleled by jQuery. (Is that guess off-base?)