Cursor Position for New Rich Text Element

I played a bit with it and you can actually insert text in the rich text input and keep the cursor at the right point.
Here is the result:
chrome_5OnbBhUu8P

It works also inside styled text:
chrome_Y2gJvQnAJa

Because it is not an extension to the text editor it has some limitation:

  • only insert text in the tag where the cursor is.
  • needs to change focus in another element to have keyboard events not interfering with the text editor

Of course an extension to the text editor is still the best way to go.