JSFiddle - React, Tailwind, and code Playground

by AidanYoung

HTML

<p contenteditable="true" id="contenttxt">Some text in this paragraph tag</p>
<button onclick="changeBold()">
Bold selected text
</button>

JavaScript

function changeBold() {
          document.getElementById("contenttxt").style.fontWeight = "600";
}