I'm trying to set the location of the cursor to the end of the text in my editor.
Please let me know how I can achieve this goal.
See the help topic on how to use ranges to set the location of the cursor. For focusing the last node in the editor, use the last element in the editable content.
This would be editor.body.lastChild, or the end of its previousSibling.