title: Positioning caret in JavaFX HTMLEditor
body: <p>Having done next to none JavaScript before, I've tried several ways to position the caret (to end) in a JavaFX HTMLEditor without success.</p>
  
  <p>For example, I've tried this: <a href="https://stackoverflow.com/questions/4233265/contenteditable-set-caret-at-the-end-of-the-text-cross-browser">contenteditable, set caret at the end of the text (cross-browser)</a> by adding the function <code>placeCaretAtEnd(el)</code> in the <code>&lt;script&gt;</code>-section, something like this (I omitted the <code>&lt;script&gt;</code> section here):</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;style&gt;
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body onLoad='document.body.focus();' onfocus='placeCaretAtEnd(document.body);' contenteditable='true'&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>(I set this via HTMLEditor.setHtmlText)</p>
  
  <p>But the caret stays at the beginning.. has anyone successfully positioned the caret in a JavaFX HTMLEditor?</p>