title: Capitalize first letter of sentence in CKeditor
body: <p>I wish to capitalize the first letter of a sentence, on-the-fly, as the user types the text in a CKEditor content instance.</p>
  
  <p>The strategy consists in catching each keystroke and try to replace it when necessary, that is for instance, when the inserted character follows a dot and a space. I'm fine with catching the event, but can't find a way to parse characters surrounding the caret position:</p>
  
  <pre class="lang-js prettyprint-override"><code>var instance = CKEDITOR.instances.htmlarea
  instance.document.getBody().on('keyup', function(event) {
      console.log(event);
      // Would like to parse here from the event object...
      event.data.preventDefault();
  });
  </code></pre>
  
  <p>Any help would be much appreciated including a strategy alternative.</p>