JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test" contenteditable="true" class="edit-box">
How to style the span element<span class="lb"></span><div class="newline">so it's possible to place the cursor at the beginning of this line, before "S".</div>
</div>

CSS

.lb{
  display:inline;
}

.lb:after{
  content: "\21B2\A";
  word-wrap: break-word;
      white-space: pre-line;

}
.edit-box{
  border: 1px solid black;
  padding: 10px;
}