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