1

I am using this following code to make my header as editable text.

<h1 contentEditable="true">Hello</h1>

But it pulls the cursor in the beginning of the text, as in |Hello. I want it to be at right. Is there any way to do that? Specially Without javascript?

sadaf2605
  • 7,332
  • 8
  • 60
  • 103

1 Answers1

0

There is no way that I know of to do this without javascript. The problem is that the browsers determine where to put the caret when the field is opened. However, if you choose to do a javascript solution, I would recommend looking Tim Down's answer on this post. It works great!

Community
  • 1
  • 1
Matthew R.
  • 4,332
  • 1
  • 24
  • 39