JSFiddle - React, Tailwind, and code Playground

HTML

<div contenteditable>
    <b>1</b>
    <i>2</i>
    <u>3</u>
    Simple text
</div>